From 5c6c6104b23589ca2d919e0dab06ec3a38cc291d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Hako=C5=A1?= Date: Wed, 2 Mar 2022 10:17:46 +0100 Subject: [PATCH 1/6] feat(admin): display form data in dynamic list component * added form data column in detailed view * added button to show all form data * generated latest openApi specification --- .../applications-dynamic-list.component.html | 25 +- .../applications-dynamic-list.component.ts | 32 +- .../vo-applications.component.ts | 1 + libs/perun/openapi/src/lib/api.module.ts | 39 +- libs/perun/openapi/src/lib/api/api.ts | 23 +- .../src/lib/api/attributesManager.service.ts | 25552 +++++++--------- .../lib/api/auditMessagesManager.service.ts | 1364 +- .../src/lib/api/authzResolver.service.ts | 3745 +-- .../src/lib/api/cabinetManager.service.ts | 3930 +-- .../src/lib/api/databaseManager.service.ts | 491 +- .../src/lib/api/extSourcesManager.service.ts | 1887 +- .../src/lib/api/facilitiesManager.service.ts | 14626 ++++----- ...facilitiesManagerByFacilityName.service.ts | 189 +- .../src/lib/api/groupsManager.service.ts | 6236 ++-- .../src/lib/api/integrationManager.service.ts | 168 +- .../src/lib/api/membersManager.service.ts | 7773 ++--- .../src/lib/api/ownersManager.service.ts | 701 +- .../src/lib/api/rTMessagesManager.service.ts | 772 +- .../src/lib/api/registrarManager.service.ts | 7450 ++--- .../src/lib/api/resourcesManager.service.ts | 12908 ++++---- .../src/lib/api/servicesManager.service.ts | 10011 +++--- .../src/lib/api/tasksManager.service.ts | 3044 +- .../src/lib/api/usersManager.service.ts | 8949 +++--- .../openapi/src/lib/api/utils.service.ts | 670 +- .../openapi/src/lib/api/vosManager.service.ts | 4817 ++- libs/perun/openapi/src/lib/configuration.ts | 143 +- libs/perun/openapi/src/lib/encoder.ts | 25 +- libs/perun/openapi/src/lib/index.ts | 2 +- .../perun/openapi/src/lib/model/actionType.ts | 14 +- .../src/lib/model/addUserExtSourceInput.ts | 8 +- libs/perun/openapi/src/lib/model/appState.ts | 10 +- libs/perun/openapi/src/lib/model/appType.ts | 8 +- .../openapi/src/lib/model/application.ts | 32 +- .../openapi/src/lib/model/applicationForm.ts | 18 +- .../src/lib/model/applicationFormItem.ts | 67 +- .../src/lib/model/applicationFormItemData.ts | 16 +- .../openapi/src/lib/model/applicationMail.ts | 16 +- .../src/lib/model/applicationsOrderColumn.ts | 25 +- .../src/lib/model/applicationsPageQuery.ts | 27 +- .../openapi/src/lib/model/assignedGroup.ts | 14 +- .../openapi/src/lib/model/assignedMember.ts | 8 +- .../openapi/src/lib/model/assignedResource.ts | 18 +- libs/perun/openapi/src/lib/model/attribute.ts | 14 +- .../openapi/src/lib/model/attributeAction.ts | 6 +- .../src/lib/model/attributeDefinition.ts | 24 +- .../openapi/src/lib/model/attributePolicy.ts | 12 +- .../lib/model/attributePolicyCollection.ts | 12 +- .../openapi/src/lib/model/attributeRights.ts | 10 +- .../perun/openapi/src/lib/model/auditEvent.ts | 32 +- .../openapi/src/lib/model/auditMessage.ts | 14 +- .../src/lib/model/auditMessagesPageQuery.ts | 10 +- libs/perun/openapi/src/lib/model/auditable.ts | 16 +- libs/perun/openapi/src/lib/model/author.ts | 18 +- .../perun/openapi/src/lib/model/authorship.ts | 14 +- libs/perun/openapi/src/lib/model/ban.ts | 8 +- .../openapi/src/lib/model/banOnFacility.ts | 8 +- .../openapi/src/lib/model/banOnResource.ts | 8 +- libs/perun/openapi/src/lib/model/banOnVo.ts | 8 +- libs/perun/openapi/src/lib/model/brand.ts | 10 +- libs/perun/openapi/src/lib/model/candidate.ts | 10 +- libs/perun/openapi/src/lib/model/category.ts | 8 +- .../openapi/src/lib/model/destination.ts | 10 +- .../lib/model/destinationPropagationType.ts | 8 +- .../openapi/src/lib/model/destinationType.ts | 31 +- .../openapi/src/lib/model/enrichedFacility.ts | 12 +- .../openapi/src/lib/model/enrichedGroup.ts | 8 +- .../openapi/src/lib/model/enrichedHost.ts | 8 +- .../openapi/src/lib/model/enrichedResource.ts | 8 +- libs/perun/openapi/src/lib/model/extSource.ts | 8 +- .../openapi/src/lib/model/extSourceObject.ts | 6 +- libs/perun/openapi/src/lib/model/facility.ts | 8 +- .../src/lib/model/facilityPropagationState.ts | 10 +- .../openapi/src/lib/model/facilityState.ts | 10 +- .../openapi/src/lib/model/genDataNode.ts | 10 +- .../src/lib/model/genMemberDataNode.ts | 6 +- libs/perun/openapi/src/lib/model/group.ts | 16 +- .../openapi/src/lib/model/groupMemberData.ts | 8 +- .../src/lib/model/groupMemberRelation.ts | 44 +- .../src/lib/model/groupResourceStatus.ts | 10 +- .../src/lib/model/groupsOrderColumn.ts | 8 +- .../openapi/src/lib/model/groupsPageQuery.ts | 16 +- .../openapi/src/lib/model/hashedGenData.ts | 8 +- libs/perun/openapi/src/lib/model/host.ts | 6 +- libs/perun/openapi/src/lib/model/identity.ts | 14 +- .../src/lib/model/inlineResponse200.ts | 19 +- .../model/inputAddApplicationMailForGroup.ts | 8 +- .../lib/model/inputAddApplicationMailForVo.ts | 8 +- .../inputAddDestinationToMultipleServices.ts | 14 +- ...AddDestinationsDefinedByHostsOnFacility.ts | 8 +- .../model/inputAssignResourceTagToResource.ts | 14 +- .../src/lib/model/inputAttributeDefinition.ts | 6 +- .../model/inputAttributePolicyCollections.ts | 6 +- .../src/lib/model/inputAttributeRights.ts | 6 +- .../src/lib/model/inputCopyResource.ts | 16 +- .../model/inputCreateAttributeDefinition.ts | 6 +- .../src/lib/model/inputCreateAuthorship.ts | 6 +- .../src/lib/model/inputCreateCategory.ts | 6 +- .../src/lib/model/inputCreateCategory1.ts | 20 +- .../model/inputCreateMemberForCandidate.ts | 10 +- .../src/lib/model/inputCreateMemberForUser.ts | 10 +- .../model/inputCreateMemberFromExtSource.ts | 16 +- .../openapi/src/lib/model/inputCreateOwner.ts | 39 +- .../src/lib/model/inputCreatePublication.ts | 6 +- .../lib/model/inputCreatePublicationSystem.ts | 6 +- .../inputCreateResourceTagWithResourceTag.ts | 14 +- .../src/lib/model/inputCreateService.ts | 6 +- .../src/lib/model/inputCreateServiceUser.ts | 8 +- .../lib/model/inputCreateServicesPackage.ts | 6 +- .../lib/model/inputCreateSponsoredMember.ts | 14 +- .../lib/model/inputCreateSponsoredMember1.ts | 24 +- .../inputCreateSponsoredMemberFromCSV.ts | 38 +- .../src/lib/model/inputCreateThanks.ts | 6 +- .../src/lib/model/inputCreateVoWithVo.ts | 6 +- .../src/lib/model/inputDeleteGroups.ts | 14 +- .../src/lib/model/inputDeleteResourceTag.ts | 6 +- .../src/lib/model/inputEntitylessAttribute.ts | 14 +- .../src/lib/model/inputFormItemData.ts | 14 +- .../src/lib/model/inputFormItemData1.ts | 14 +- .../inputGetAllResourcesByResourceTag.ts | 14 +- .../src/lib/model/inputGetMessagesPage.ts | 6 +- .../model/inputGetPaginatedApplications.ts | 8 +- .../src/lib/model/inputGetPaginatedGroups.ts | 10 +- .../src/lib/model/inputGetPaginatedMembers.ts | 10 +- .../lib/model/inputGetPaginatedSubgroups.ts | 10 +- .../src/lib/model/inputGetPaginatedUsers.ts | 8 +- .../src/lib/model/inputLockPublications.ts | 8 +- .../inputRemoveResourceTagFromResource.ts | 14 +- .../openapi/src/lib/model/inputSendMessage.ts | 22 +- .../openapi/src/lib/model/inputSetBan.ts | 6 +- .../lib/model/inputSetBanForUserOnFacility.ts | 6 +- .../lib/model/inputSetFacilityAttribute.ts | 14 +- .../lib/model/inputSetFacilityAttributes.ts | 14 +- ...cilityResourceGroupUserMemberAttributes.ts | 46 +- ...SetFacilityResourceUserMemberAttributes.ts | 38 +- .../model/inputSetFacilityUserAttributes.ts | 22 +- .../src/lib/model/inputSetGroupAttribute.ts | 14 +- .../src/lib/model/inputSetGroupAttributes.ts | 14 +- .../model/inputSetGroupResourceAttribute.ts | 22 +- .../model/inputSetGroupResourceAttributes.ts | 22 +- .../src/lib/model/inputSetHostAttribute.ts | 14 +- .../src/lib/model/inputSetHostAttributes.ts | 14 +- .../src/lib/model/inputSetMemberAttribute.ts | 14 +- .../src/lib/model/inputSetMemberAttributes.ts | 14 +- .../lib/model/inputSetMemberGroupAttribute.ts | 22 +- .../model/inputSetMemberGroupAttributes.ts | 22 +- .../inputSetMemberGroupWithUserAttributes.ts | 24 +- ...inputSetMemberResourceAndUserAttributes.ts | 24 +- .../model/inputSetMemberResourceAttribute.ts | 22 +- .../model/inputSetMemberResourceAttributes.ts | 22 +- .../model/inputSetMemberWithUserAttributes.ts | 16 +- .../lib/model/inputSetResourceAttribute.ts | 14 +- .../lib/model/inputSetResourceAttributes.ts | 14 +- .../model/inputSetResourceGroupAttributes.ts | 22 +- ...nputSetResourceGroupWithGroupAttributes.ts | 24 +- .../src/lib/model/inputSetSendingEnabled.ts | 8 +- .../src/lib/model/inputSetSponsoredMember.ts | 16 +- .../src/lib/model/inputSetUserAttribute.ts | 14 +- .../src/lib/model/inputSetUserAttributes.ts | 14 +- .../model/inputSetUserExtSourceAttribute.ts | 14 +- .../model/inputSetUserExtSourceAttributes.ts | 14 +- .../model/inputSetUserFacilityAttribute.ts | 22 +- .../model/inputSetUserFacilityAttributes.ts | 22 +- .../src/lib/model/inputSetVoAttribute.ts | 14 +- .../src/lib/model/inputSetVoAttributes.ts | 14 +- .../openapi/src/lib/model/inputSetVoBan.ts | 6 +- .../src/lib/model/inputSpecificMember.ts | 12 +- .../src/lib/model/inputSubmitApplication.ts | 8 +- .../lib/model/inputUpdateApplicationMail.ts | 6 +- .../openapi/src/lib/model/inputUpdateBan.ts | 6 +- .../lib/model/inputUpdateBanForFacility.ts | 6 +- .../src/lib/model/inputUpdateCategory.ts | 6 +- .../src/lib/model/inputUpdateFacility.ts | 6 +- .../openapi/src/lib/model/inputUpdateForm.ts | 6 +- .../lib/model/inputUpdateFormItemsForGroup.ts | 14 +- .../lib/model/inputUpdateFormItemsForVo.ts | 14 +- .../openapi/src/lib/model/inputUpdateGroup.ts | 6 +- .../src/lib/model/inputUpdatePublication.ts | 6 +- .../lib/model/inputUpdatePublicationSystem.ts | 6 +- .../src/lib/model/inputUpdateResource.ts | 6 +- .../src/lib/model/inputUpdateResourceTag.ts | 6 +- .../src/lib/model/inputUpdateService.ts | 6 +- .../lib/model/inputUpdateServicesPackage.ts | 6 +- .../openapi/src/lib/model/inputUpdateUser.ts | 6 +- .../openapi/src/lib/model/inputUpdateVo.ts | 6 +- libs/perun/openapi/src/lib/model/itemTexts.ts | 14 +- libs/perun/openapi/src/lib/model/mailText.ts | 10 +- libs/perun/openapi/src/lib/model/mailType.ts | 28 +- libs/perun/openapi/src/lib/model/member.ts | 20 +- .../openapi/src/lib/model/memberCandidate.ts | 10 +- .../src/lib/model/memberGroupStatus.ts | 6 +- .../src/lib/model/memberWithSponsors.ts | 8 +- .../src/lib/model/membersOrderColumn.ts | 6 +- .../openapi/src/lib/model/membersPageQuery.ts | 20 +- libs/perun/openapi/src/lib/model/models.ts | 3 +- .../openapi/src/lib/model/namespaceRules.ts | 18 +- libs/perun/openapi/src/lib/model/newApps.ts | 12 +- libs/perun/openapi/src/lib/model/owner.ts | 21 +- .../src/lib/model/paginatedAuditMessages.ts | 12 +- .../lib/model/paginatedRichApplications.ts | 21 + .../src/lib/model/paginatedRichGroups.ts | 12 +- .../src/lib/model/paginatedRichMembers.ts | 12 +- .../src/lib/model/paginatedRichUsers.ts | 12 +- .../openapi/src/lib/model/perunAppsConfig.ts | 6 +- libs/perun/openapi/src/lib/model/perunBean.ts | 8 +- .../openapi/src/lib/model/perunException.ts | 10 +- .../openapi/src/lib/model/perunPolicy.ts | 10 +- .../openapi/src/lib/model/perunPrincipal.ts | 22 +- .../openapi/src/lib/model/publication.ts | 32 +- .../src/lib/model/publicationForGUI.ts | 10 +- .../src/lib/model/publicationSystem.ts | 16 +- libs/perun/openapi/src/lib/model/rTMessage.ts | 8 +- libs/perun/openapi/src/lib/model/resource.ts | 14 +- .../openapi/src/lib/model/resourceState.ts | 8 +- .../openapi/src/lib/model/resourceTag.ts | 8 +- .../openapi/src/lib/model/richApplication.ts | 24 + .../openapi/src/lib/model/richDestination.ts | 10 +- .../openapi/src/lib/model/richFacility.ts | 6 +- libs/perun/openapi/src/lib/model/richGroup.ts | 6 +- .../perun/openapi/src/lib/model/richMember.ts | 12 +- .../openapi/src/lib/model/richResource.ts | 10 +- libs/perun/openapi/src/lib/model/richUser.ts | 8 +- .../src/lib/model/richUserExtSource.ts | 8 +- .../src/lib/model/roleManagementRules.ts | 16 +- .../perun/openapi/src/lib/model/roleObject.ts | 16 +- .../openapi/src/lib/model/securityTeam.ts | 8 +- libs/perun/openapi/src/lib/model/service.ts | 16 +- .../src/lib/model/serviceAttributes.ts | 8 +- .../openapi/src/lib/model/serviceForGUI.ts | 6 +- .../openapi/src/lib/model/serviceState.ts | 18 +- .../openapi/src/lib/model/servicesPackage.ts | 8 +- .../setRoleWithGroupComplementaryObject.ts | 16 +- .../setRoleWithUserComplementaryObject.ts | 16 +- .../openapi/src/lib/model/simpleAttribute.ts | 12 +- .../openapi/src/lib/model/sortingOrder.ts | 6 +- libs/perun/openapi/src/lib/model/sponsor.ts | 20 +- .../src/lib/model/sponsoredUserData.ts | 22 +- libs/perun/openapi/src/lib/model/task.ts | 38 +- .../lib/model/taskAndDestinationIdObject.ts | 20 +- .../lib/model/taskAndDestinationNameObject.ts | 28 +- .../openapi/src/lib/model/taskIdObject.ts | 12 +- .../perun/openapi/src/lib/model/taskResult.ts | 22 +- .../src/lib/model/taskResultIdObject.ts | 12 +- .../openapi/src/lib/model/taskResultStatus.ts | 10 +- .../perun/openapi/src/lib/model/taskStatus.ts | 34 +- libs/perun/openapi/src/lib/model/thanks.ts | 14 +- .../openapi/src/lib/model/thanksForGUI.ts | 6 +- libs/perun/openapi/src/lib/model/type.ts | 49 +- .../unsetRoleWithGroupComplementaryObject.ts | 16 +- .../unsetRoleWithUserComplementaryObject.ts | 16 +- libs/perun/openapi/src/lib/model/user.ts | 24 +- .../openapi/src/lib/model/userExtSource.ts | 22 +- .../openapi/src/lib/model/usersOrderColumn.ts | 6 +- .../openapi/src/lib/model/usersPageQuery.ts | 26 +- libs/perun/openapi/src/lib/model/vo.ts | 8 +- .../openapi/src/lib/model/voAdminRoles.ts | 8 +- .../openapi/src/lib/model/voMemberStatuses.ts | 10 +- libs/perun/openapi/src/lib/variables.ts | 10 +- .../src/lib/dynamic-paginating.service.ts | 10 +- .../services/src/lib/dynamicDataSource.ts | 24 +- 259 files changed, 50586 insertions(+), 68197 deletions(-) create mode 100644 libs/perun/openapi/src/lib/model/paginatedRichApplications.ts create mode 100644 libs/perun/openapi/src/lib/model/richApplication.ts diff --git a/apps/admin-gui/src/app/vos/components/applications-dynamic-list/applications-dynamic-list.component.html b/apps/admin-gui/src/app/vos/components/applications-dynamic-list/applications-dynamic-list.component.html index ff0f5e086..0842649d5 100644 --- a/apps/admin-gui/src/app/vos/components/applications-dynamic-list/applications-dynamic-list.component.html +++ b/apps/admin-gui/src/app/vos/components/applications-dynamic-list/applications-dynamic-list.component.html @@ -11,7 +11,7 @@ {{application.fedInfo}} + + + + + ; pageSizeOptions = TABLE_ITEMS_COUNT_OPTIONS; @@ -136,7 +141,8 @@ export class ApplicationsDynamicListComponent implements OnInit, OnChanges, Afte this.dateToString(this.dateTo), this.member?.userId ?? null, this.group?.id ?? null, - this.getVoId() + this.getVoId(), + true ); } @@ -195,6 +201,8 @@ export class ApplicationsDynamicListComponent implements OnInit, OnChanges, Afte return data.type; case 'fedInfo': return data.fedInfo; + case 'formData': + return this.stringify((data).formData); case 'state': return data.state; case 'extSourceName': @@ -273,4 +281,26 @@ export class ApplicationsDynamicListComponent implements OnInit, OnChanges, Afte return this.member.voId; } } + + stringify(obj: object) { + const removeNullUndefined = (toFilter: object) => + Object.entries(toFilter).reduce( + (a, [k, v]) => + a[k] instanceof Object + ? (a[k] = removeNullUndefined(a[k])) + : v == null || v === 'null' || (v).length === 0 + ? a + : ((a[k] = v), a), + {} + ); + + let str = JSON.stringify(removeNullUndefined(obj)); + str = str.replace('{', '['); + str = str.replace('}', ']'); + return str; + } + + getFormDataString(data: ApplicationFormItemData) { + return this.stringify(data.formItem); + } } diff --git a/apps/admin-gui/src/app/vos/pages/vo-detail-page/vo-applications/vo-applications.component.ts b/apps/admin-gui/src/app/vos/pages/vo-detail-page/vo-applications/vo-applications.component.ts index 0f1272443..f7bc09677 100644 --- a/apps/admin-gui/src/app/vos/pages/vo-detail-page/vo-applications/vo-applications.component.ts +++ b/apps/admin-gui/src/app/vos/pages/vo-detail-page/vo-applications/vo-applications.component.ts @@ -51,6 +51,7 @@ export class VoApplicationsComponent implements OnInit { 'modifiedBy', 'modifiedAt', 'fedInfo', + 'formData' ]; currentColumns: string[] = []; filterValue = ''; diff --git a/libs/perun/openapi/src/lib/api.module.ts b/libs/perun/openapi/src/lib/api.module.ts index 980895001..28e7ab21a 100644 --- a/libs/perun/openapi/src/lib/api.module.ts +++ b/libs/perun/openapi/src/lib/api.module.ts @@ -2,6 +2,7 @@ import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core import { Configuration } from './configuration'; import { HttpClient } from '@angular/common/http'; + import { AttributesManagerService } from './api/attributesManager.service'; import { AuditMessagesManagerService } from './api/auditMessagesManager.service'; import { AuthzResolverService } from './api/authzResolver.service'; @@ -24,9 +25,9 @@ import { UtilsService } from './api/utils.service'; import { VosManagerService } from './api/vosManager.service'; @NgModule({ - imports: [], + imports: [], declarations: [], - exports: [], + exports: [], providers: [ AttributesManagerService, AuditMessagesManagerService, @@ -47,26 +48,24 @@ import { VosManagerService } from './api/vosManager.service'; TasksManagerService, UsersManagerService, UtilsService, - VosManagerService, - ], + VosManagerService ] }) export class ApiModule { - public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders { - return { - ngModule: ApiModule, - providers: [{ provide: Configuration, useFactory: configurationFactory }], - }; - } - - constructor(@Optional() @SkipSelf() parentModule: ApiModule, @Optional() http: HttpClient) { - if (parentModule) { - throw new Error('ApiModule is already loaded. Import in your base AppModule only.'); + public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders { + return { + ngModule: ApiModule, + providers: [ { provide: Configuration, useFactory: configurationFactory } ] + }; } - if (!http) { - throw new Error( - 'You need to import the HttpClientModule in your AppModule! \n' + - 'See also https://github.com/angular/angular/issues/20575' - ); + + constructor( @Optional() @SkipSelf() parentModule: ApiModule, + @Optional() http: HttpClient) { + if (parentModule) { + throw new Error('ApiModule is already loaded. Import in your base AppModule only.'); + } + if (!http) { + throw new Error('You need to import the HttpClientModule in your AppModule! \n' + + 'See also https://github.com/angular/angular/issues/20575'); + } } - } } diff --git a/libs/perun/openapi/src/lib/api/api.ts b/libs/perun/openapi/src/lib/api/api.ts index 47a721102..1c66c72f4 100644 --- a/libs/perun/openapi/src/lib/api/api.ts +++ b/libs/perun/openapi/src/lib/api/api.ts @@ -38,25 +38,4 @@ export * from './utils.service'; import { UtilsService } from './utils.service'; export * from './vosManager.service'; import { VosManagerService } from './vosManager.service'; -export const APIS = [ - AttributesManagerService, - AuditMessagesManagerService, - AuthzResolverService, - CabinetManagerService, - DatabaseManagerService, - ExtSourcesManagerService, - FacilitiesManagerService, - FacilitiesManagerByFacilityNameService, - GroupsManagerService, - IntegrationManagerService, - MembersManagerService, - OwnersManagerService, - RTMessagesManagerService, - RegistrarManagerService, - ResourcesManagerService, - ServicesManagerService, - TasksManagerService, - UsersManagerService, - UtilsService, - VosManagerService, -]; +export const APIS = [AttributesManagerService, AuditMessagesManagerService, AuthzResolverService, CabinetManagerService, DatabaseManagerService, ExtSourcesManagerService, FacilitiesManagerService, FacilitiesManagerByFacilityNameService, GroupsManagerService, IntegrationManagerService, MembersManagerService, OwnersManagerService, RTMessagesManagerService, RegistrarManagerService, ResourcesManagerService, ServicesManagerService, TasksManagerService, UsersManagerService, UtilsService, VosManagerService]; diff --git a/libs/perun/openapi/src/lib/api/attributesManager.service.ts b/libs/perun/openapi/src/lib/api/attributesManager.service.ts index a66adabb4..a48da15bf 100644 --- a/libs/perun/openapi/src/lib/api/attributesManager.service.ts +++ b/libs/perun/openapi/src/lib/api/attributesManager.service.ts @@ -11,23 +11,19 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { Attribute } from '../model/attribute'; import { AttributeDefinition } from '../model/attributeDefinition'; +import { AttributePolicyCollection } from '../model/attributePolicyCollection'; import { AttributeRights } from '../model/attributeRights'; import { InlineResponse200 } from '../model/inlineResponse200'; import { InputAttributeDefinition } from '../model/inputAttributeDefinition'; +import { InputAttributePolicyCollections } from '../model/inputAttributePolicyCollections'; import { InputAttributeRights } from '../model/inputAttributeRights'; import { InputCreateAttributeDefinition } from '../model/inputCreateAttributeDefinition'; import { InputEntitylessAttribute } from '../model/inputEntitylessAttribute'; @@ -65,14840 +61,10710 @@ import { InputSetVoAttribute } from '../model/inputSetVoAttribute'; import { InputSetVoAttributes } from '../model/inputSetVoAttributes'; import { PerunException } from '../model/perunException'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class AttributesManagerService { - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration - ) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - /** - * Converts attribute to nonunique - unmarks unique flag from attribute definition, and deletes all values from a special table with unique constraint that ensures that all values remain unique. - * @param attributeDefinition id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public convertAttributeToNonunique( - attributeDefinition: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public convertAttributeToNonunique( - attributeDefinition: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public convertAttributeToNonunique( - attributeDefinition: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public convertAttributeToNonunique( - attributeDefinition: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (attributeDefinition === null || attributeDefinition === undefined) { - throw new Error( - 'Required parameter attributeDefinition was null or undefined when calling convertAttributeToNonunique.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (attributeDefinition !== undefined && attributeDefinition !== null) { - queryParameters = queryParameters.set('attributeDefinition', attributeDefinition); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/attributesManager/convertAttributeToNonunique`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Converts attribute to unique - marks its definition as unique and ensures that all its values are unique. Entityless attributes cannot be converted to unique, only attributes attached to PerunBeans or pairs of PerunBeans. - * @param attributeDefinition id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public convertAttributeToUnique( - attributeDefinition: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public convertAttributeToUnique( - attributeDefinition: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public convertAttributeToUnique( - attributeDefinition: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public convertAttributeToUnique( - attributeDefinition: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (attributeDefinition === null || attributeDefinition === undefined) { - throw new Error( - 'Required parameter attributeDefinition was null or undefined when calling convertAttributeToUnique.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (attributeDefinition !== undefined && attributeDefinition !== null) { - queryParameters = queryParameters.set('attributeDefinition', attributeDefinition); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/attributesManager/convertAttributeToUnique`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Creates AttributeDefinition. - * @param inputCreateAttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createAttributeDefinition( - inputCreateAttributeDefinition: InputCreateAttributeDefinition, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public createAttributeDefinition( - inputCreateAttributeDefinition: InputCreateAttributeDefinition, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public createAttributeDefinition( - inputCreateAttributeDefinition: InputCreateAttributeDefinition, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public createAttributeDefinition( - inputCreateAttributeDefinition: InputCreateAttributeDefinition, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputCreateAttributeDefinition === null || inputCreateAttributeDefinition === undefined) { - throw new Error( - 'Required parameter inputCreateAttributeDefinition was null or undefined when calling createAttributeDefinition.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/attributesManager/createAttribute`, - inputCreateAttributeDefinition, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Deletes attribute definition from Perun including all values set for any entity. - * @param attribute id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteAttributeDefinition( - attribute: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public deleteAttributeDefinition( - attribute: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deleteAttributeDefinition( - attribute: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deleteAttributeDefinition( - attribute: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (attribute === null || attribute === undefined) { - throw new Error( - 'Required parameter attribute was null or undefined when calling deleteAttributeDefinition.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (attribute !== undefined && attribute !== null) { - queryParameters = queryParameters.set('attribute', attribute); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/attributesManager/deleteAttribute`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Deletes attribute definitions from Perun including all values set for any entity. - * @param attributes list of attribute ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteAttributeDefinitions( - attributes: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public deleteAttributeDefinitions( - attributes: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deleteAttributeDefinitions( - attributes: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deleteAttributeDefinitions( - attributes: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (attributes === null || attributes === undefined) { - throw new Error( - 'Required parameter attributes was null or undefined when calling deleteAttributeDefinitions.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/attributesManager/deleteAttributes`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns all AttributeDefinitions. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllAttributeDefinitions( - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAllAttributeDefinitions( - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllAttributeDefinitions( - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAllAttributeDefinitions( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getAttributesDefinition`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns an Attribute by its name or id. - * This method cannot be fully described correctly in OpenID, because it cannot describe allowed combinations of parameters. One of attributeName, attributeId is required. The other parameters specify ids that can be combined in the following ways: (facility), (user), (user,facility), (vo), (member), (group), (resource), (member,group), (member,resource), (group,resource),(userExtSource), (host), (key) Use the specialized methods getFacilityAttributeByName(), getMemberResourceAttributeById() etc. - * @param attributeName full name of attribute (namespace + \':\' + friendlyName) - * @param attributeId id of attribute - * @param facility id of Facility - * @param user id of User - * @param vo id of Vo - * @param resource id of Resource - * @param member id of Member - * @param group id of Group - * @param host id of Host - * @param userExtSource id of UserExtSource - * @param key key for entityless attribute - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAttribute( - attributeName?: string, - attributeId?: number, - facility?: number, - user?: number, - vo?: number, - resource?: number, - member?: number, - group?: number, - host?: number, - userExtSource?: number, - key?: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getAttribute( - attributeName?: string, - attributeId?: number, - facility?: number, - user?: number, - vo?: number, - resource?: number, - member?: number, - group?: number, - host?: number, - userExtSource?: number, - key?: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getAttribute( - attributeName?: string, - attributeId?: number, - facility?: number, - user?: number, - vo?: number, - resource?: number, - member?: number, - group?: number, - host?: number, - userExtSource?: number, - key?: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getAttribute( - attributeName?: string, - attributeId?: number, - facility?: number, - user?: number, - vo?: number, - resource?: number, - member?: number, - group?: number, - host?: number, - userExtSource?: number, - key?: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (attributeName !== undefined && attributeName !== null) { - queryParameters = queryParameters.set('attributeName', attributeName); - } - if (attributeId !== undefined && attributeId !== null) { - queryParameters = queryParameters.set('attributeId', attributeId); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (host !== undefined && host !== null) { - queryParameters = queryParameters.set('host', host); - } - if (userExtSource !== undefined && userExtSource !== null) { - queryParameters = queryParameters.set('userExtSource', userExtSource); - } - if (key !== undefined && key !== null) { - queryParameters = queryParameters.set('key', key); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/attributesManager/getAttribute/any`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns an AttributeDefinition by its id. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAttributeDefinitionById( - id: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getAttributeDefinitionById( - id: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getAttributeDefinitionById( - id: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getAttributeDefinitionById( - id: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling getAttributeDefinitionById.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/attributesManager/getAttributeDefinitionById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns an AttributeDefinition by its name. - * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAttributeDefinitionByName( - attributeName: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getAttributeDefinitionByName( - attributeName: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getAttributeDefinitionByName( - attributeName: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getAttributeDefinitionByName( - attributeName: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (attributeName === null || attributeName === undefined) { - throw new Error( - 'Required parameter attributeName was null or undefined when calling getAttributeDefinitionByName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (attributeName !== undefined && attributeName !== null) { - queryParameters = queryParameters.set('attributeName', attributeName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/attributesManager/getAttributeDefinition`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns all AttributeDefinitions in a namespace. - * @param namespace name of namespace to obtain attribute definitions from - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAttributeDefinitionsByNamespace( - namespace: string, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAttributeDefinitionsByNamespace( - namespace: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAttributeDefinitionsByNamespace( - namespace: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAttributeDefinitionsByNamespace( - namespace: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (namespace === null || namespace === undefined) { - throw new Error( - 'Required parameter namespace was null or undefined when calling getAttributeDefinitionsByNamespace.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (namespace !== undefined && namespace !== null) { - queryParameters = queryParameters.set('namespace', namespace); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getAttributesDefinitionByNamespace`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Generates text file describing dependencies between attribute modules. The format of text file can be specified by parameter. Modules that has no dependency relations are omitted. - * @param format Currently supported formats are DOT and TGF. - * @param attrName Attribute name which dependencies will be found. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAttributeModulesDependenciesForAttributeGraphText( - format: 'DOT' | 'TGF', - attrName: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getAttributeModulesDependenciesForAttributeGraphText( - format: 'DOT' | 'TGF', - attrName: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getAttributeModulesDependenciesForAttributeGraphText( - format: 'DOT' | 'TGF', - attrName: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getAttributeModulesDependenciesForAttributeGraphText( - format: 'DOT' | 'TGF', - attrName: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (format === null || format === undefined) { - throw new Error( - 'Required parameter format was null or undefined when calling getAttributeModulesDependenciesForAttributeGraphText.' - ); - } - if (attrName === null || attrName === undefined) { - throw new Error( - 'Required parameter attrName was null or undefined when calling getAttributeModulesDependenciesForAttributeGraphText.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (format !== undefined && format !== null) { - queryParameters = queryParameters.set('format', format); - } - if (attrName !== undefined && attrName !== null) { - queryParameters = queryParameters.set('attrName', attrName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/attributesManager/getAttributeModulesDependenciesGraphText/for-attribute`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Generates text file describing dependencies between attribute modules. The format of text file can be specified by parameter. Modules that has no dependency relations are omitted. - * @param format Currently supported formats are DOT and TGF. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAttributeModulesDependenciesGraphText( - format: 'DOT' | 'TGF', - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getAttributeModulesDependenciesGraphText( - format: 'DOT' | 'TGF', - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getAttributeModulesDependenciesGraphText( - format: 'DOT' | 'TGF', - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getAttributeModulesDependenciesGraphText( - format: 'DOT' | 'TGF', - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (format === null || format === undefined) { - throw new Error( - 'Required parameter format was null or undefined when calling getAttributeModulesDependenciesGraphText.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (format !== undefined && format !== null) { - queryParameters = queryParameters.set('format', format); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/attributesManager/getAttributeModulesDependenciesGraphText`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets AttributeRights for specified Attribute. Rights specify which Role can do particular actions (read / write) with Attribute. Method always return rights for following roles: VOADMIN, GROUPADMIN, FACILITYADMIN, SELF. - * @param attributeId id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAttributeRights( - attributeId: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAttributeRights( - attributeId: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAttributeRights( - attributeId: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAttributeRights( - attributeId: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (attributeId === null || attributeId === undefined) { - throw new Error( - 'Required parameter attributeId was null or undefined when calling getAttributeRights.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (attributeId !== undefined && attributeId !== null) { - queryParameters = queryParameters.set('attributeId', attributeId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getAttributeRights`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns all AttributeDefinitions for every entity and possible combination of entities with rights. Only attribute definition of attributes user can read (or write) you will get. Combination of entities is based on provided parameters, which are optional (at least one must be present). - * @param member id of Member - * @param user id of User - * @param vo id of Vo - * @param group id of Group - * @param resource id of Resource - * @param facility id of Facility - * @param host id of Host - * @param userExtSource id of UserExtSource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAttributesDefinitionWithRights( - member?: number, - user?: number, - vo?: number, - group?: number, - resource?: number, - facility?: number, - host?: number, - userExtSource?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAttributesDefinitionWithRights( - member?: number, - user?: number, - vo?: number, - group?: number, - resource?: number, - facility?: number, - host?: number, - userExtSource?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAttributesDefinitionWithRights( - member?: number, - user?: number, - vo?: number, - group?: number, - resource?: number, - facility?: number, - host?: number, - userExtSource?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAttributesDefinitionWithRights( - member?: number, - user?: number, - vo?: number, - group?: number, - resource?: number, - facility?: number, - host?: number, - userExtSource?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (host !== undefined && host !== null) { - queryParameters = queryParameters.set('host', host); - } - if (userExtSource !== undefined && userExtSource !== null) { - queryParameters = queryParameters.set('userExtSource', userExtSource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/urlinjsonout/attributesManager/getAttributesDefinitionWithRights`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns an entityless Attribute by its name. - * This is an overloaded method getAttribute, specialized for entityless key and attribute name. - * @param key key for entityless attribute - * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getEntitylessAttributeByName( - key: string, - attributeName: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getEntitylessAttributeByName( - key: string, - attributeName: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getEntitylessAttributeByName( - key: string, - attributeName: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getEntitylessAttributeByName( - key: string, - attributeName: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (key === null || key === undefined) { - throw new Error( - 'Required parameter key was null or undefined when calling getEntitylessAttributeByName.' - ); - } - if (attributeName === null || attributeName === undefined) { - throw new Error( - 'Required parameter attributeName was null or undefined when calling getEntitylessAttributeByName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (key !== undefined && key !== null) { - queryParameters = queryParameters.set('key', key); - } - if (attributeName !== undefined && attributeName !== null) { - queryParameters = queryParameters.set('attributeName', attributeName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/attributesManager/getAttribute/name-entityless`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all entityless attributes with subject equaled String key. - * @param key key for entityless attributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getEntitylessAttributesByKey( - key: string, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getEntitylessAttributesByKey( - key: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getEntitylessAttributesByKey( - key: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getEntitylessAttributesByKey( - key: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (key === null || key === undefined) { - throw new Error( - 'Required parameter key was null or undefined when calling getEntitylessAttributesByKey.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (key !== undefined && key !== null) { - queryParameters = queryParameters.set('key', key); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getAttributes/key`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns all entityless attributes with attrName. - * @param attrName full name of attribute definition (namespace + \':\' + friendlyName) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getEntitylessAttributesByName( - attrName: string, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getEntitylessAttributesByName( - attrName: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getEntitylessAttributesByName( - attrName: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getEntitylessAttributesByName( - attrName: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (attrName === null || attrName === undefined) { - throw new Error( - 'Required parameter attrName was null or undefined when calling getEntitylessAttributesByName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (attrName !== undefined && attrName !== null) { - queryParameters = queryParameters.set('attrName', attrName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getEntitylessAttributes`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get entityless attributes mapped by their keys. - * @param attrName full name of attribute definition (namespace + \':\' + friendlyName) - * @param keys key for entityless attribute - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getEntitylessAttributesWithKeys( - attrName: string, - keys?: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable<{ [key: string]: Attribute }>; - public getEntitylessAttributesWithKeys( - attrName: string, - keys?: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getEntitylessAttributesWithKeys( - attrName: string, - keys?: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getEntitylessAttributesWithKeys( - attrName: string, - keys?: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (attrName === null || attrName === undefined) { - throw new Error( - 'Required parameter attrName was null or undefined when calling getEntitylessAttributesWithKeys.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (attrName !== undefined && attrName !== null) { - queryParameters = queryParameters.set('attrName', attrName); - } - if (keys) { - keys.forEach((element) => { - queryParameters = queryParameters.append('keys[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get<{ [key: string]: Attribute }>( - `${this.configuration.basePath}/json/attributesManager/getEntitylessAttributesWithKeys`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns list of Keys which fits the attributeDefinition. - * @param attributeDefinition id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getEntitylessKeys( - attributeDefinition: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getEntitylessKeys( - attributeDefinition: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getEntitylessKeys( - attributeDefinition: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getEntitylessKeys( - attributeDefinition: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (attributeDefinition === null || attributeDefinition === undefined) { - throw new Error( - 'Required parameter attributeDefinition was null or undefined when calling getEntitylessKeys.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (attributeDefinition !== undefined && attributeDefinition !== null) { - queryParameters = queryParameters.set('attributeDefinition', attributeDefinition); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getEntitylessKeys`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns a facility Attribute by its id. - * This is an overloaded method getAttribute, specialized for facility and attribute id. - * @param facility id of Facility - * @param attributeId id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityAttributeById( - facility: number, - attributeId: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getFacilityAttributeById( - facility: number, - attributeId: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getFacilityAttributeById( - facility: number, - attributeId: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getFacilityAttributeById( - facility: number, - attributeId: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getFacilityAttributeById.' - ); - } - if (attributeId === null || attributeId === undefined) { - throw new Error( - 'Required parameter attributeId was null or undefined when calling getFacilityAttributeById.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (attributeId !== undefined && attributeId !== null) { - queryParameters = queryParameters.set('attributeId', attributeId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/attributesManager/getAttribute/id-facility`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns a facility Attribute by its name. - * This is an overloaded method getAttribute, specialized for facility and attribute name. - * @param facility id of Facility - * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityAttributeByName( - facility: number, - attributeName: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getFacilityAttributeByName( - facility: number, - attributeName: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getFacilityAttributeByName( - facility: number, - attributeName: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getFacilityAttributeByName( - facility: number, - attributeName: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getFacilityAttributeByName.' - ); - } - if (attributeName === null || attributeName === undefined) { - throw new Error( - 'Required parameter attributeName was null or undefined when calling getFacilityAttributeByName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (attributeName !== undefined && attributeName !== null) { - queryParameters = queryParameters.set('attributeName', attributeName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/attributesManager/getAttribute/name-facility`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns all non-empty Facility attributes for selected Facility. - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityAttributes( - facility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getFacilityAttributes( - facility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getFacilityAttributes( - facility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getFacilityAttributes( - facility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getFacilityAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getAttributes/f`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns all specified Facility attributes for selected Facility. - * @param facility id of Facility - * @param attrNames list of attribute names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityAttributesByNames( - facility: number, - attrNames: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getFacilityAttributesByNames( - facility: number, - attrNames: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getFacilityAttributesByNames( - facility: number, - attrNames: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getFacilityAttributesByNames( - facility: number, - attrNames: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getFacilityAttributesByNames.' - ); - } - if (attrNames === null || attrNames === undefined) { - throw new Error( - 'Required parameter attrNames was null or undefined when calling getFacilityAttributesByNames.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getAttributes/f-names`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all non-empty member, user, member-resource and user-facility attributes. - * @param facility id of Facility - * @param resource id of Resource - * @param user id of User - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityResourceUserMemberAttributes( - facility: number, - resource: number, - user: number, - member: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getFacilityResourceUserMemberAttributes( - facility: number, - resource: number, - user: number, - member: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getFacilityResourceUserMemberAttributes( - facility: number, - resource: number, - user: number, - member: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getFacilityResourceUserMemberAttributes( - facility: number, - resource: number, - user: number, - member: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getFacilityResourceUserMemberAttributes.' - ); - } - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getFacilityResourceUserMemberAttributes.' - ); - } - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling getFacilityResourceUserMemberAttributes.' - ); - } - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getFacilityResourceUserMemberAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getAttributes/f-r-u-m`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all non-empty attributes associated with the user on the facility. - * @param facility id of Facility - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityUserAttributes( - facility: number, - user: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getFacilityUserAttributes( - facility: number, - user: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getFacilityUserAttributes( - facility: number, - user: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getFacilityUserAttributes( - facility: number, - user: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getFacilityUserAttributes.' - ); - } - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling getFacilityUserAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getAttributes/f-u`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns a group Attribute by its id. - * This is an overloaded method getAttribute, specialized for group and attribute id. - * @param group id of Group - * @param attributeId id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupAttributeById( - group: number, - attributeId: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getGroupAttributeById( - group: number, - attributeId: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getGroupAttributeById( - group: number, - attributeId: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getGroupAttributeById( - group: number, - attributeId: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getGroupAttributeById.' - ); - } - if (attributeId === null || attributeId === undefined) { - throw new Error( - 'Required parameter attributeId was null or undefined when calling getGroupAttributeById.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (attributeId !== undefined && attributeId !== null) { - queryParameters = queryParameters.set('attributeId', attributeId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/attributesManager/getAttribute/id-group`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns a group Attribute by its name. - * This is an overloaded method getAttribute, specialized for group and attribute name. - * @param group id of Group - * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupAttributeByName( - group: number, - attributeName: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getGroupAttributeByName( - group: number, - attributeName: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getGroupAttributeByName( - group: number, - attributeName: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getGroupAttributeByName( - group: number, - attributeName: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getGroupAttributeByName.' - ); - } - if (attributeName === null || attributeName === undefined) { - throw new Error( - 'Required parameter attributeName was null or undefined when calling getGroupAttributeByName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (attributeName !== undefined && attributeName !== null) { - queryParameters = queryParameters.set('attributeName', attributeName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/attributesManager/getAttribute/name-group`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all non-empty attributes associated with the group. - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupAttributes( - group: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getGroupAttributes( - group: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getGroupAttributes( - group: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getGroupAttributes( - group: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getGroupAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getAttributes/g`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all attributes associated with the group which have name in list attrNames (empty too). Virtual attribute too. - * @param group id of Group - * @param attrNames list of attribute names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupAttributesByNames( - group: number, - attrNames: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getGroupAttributesByNames( - group: number, - attrNames: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getGroupAttributesByNames( - group: number, - attrNames: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getGroupAttributesByNames( - group: number, - attrNames: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getGroupAttributesByNames.' - ); - } - if (attrNames === null || attrNames === undefined) { - throw new Error( - 'Required parameter attrNames was null or undefined when calling getGroupAttributesByNames.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getAttributes/g-names`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns a group_resource Attribute by its id. - * This is an overloaded method getAttribute, specialized for group, resource and attribute id. - * @param group id of Group - * @param resource id of Resource - * @param attributeId id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupResourceAttributeById( - group: number, - resource: number, - attributeId: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getGroupResourceAttributeById( - group: number, - resource: number, - attributeId: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getGroupResourceAttributeById( - group: number, - resource: number, - attributeId: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getGroupResourceAttributeById( - group: number, - resource: number, - attributeId: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getGroupResourceAttributeById.' - ); - } - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getGroupResourceAttributeById.' - ); - } - if (attributeId === null || attributeId === undefined) { - throw new Error( - 'Required parameter attributeId was null or undefined when calling getGroupResourceAttributeById.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (attributeId !== undefined && attributeId !== null) { - queryParameters = queryParameters.set('attributeId', attributeId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/attributesManager/getAttribute/id-group-resource`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns a group_resource Attribute by its name. - * This is an overloaded method getAttribute, specialized for group, resource and attribute name. - * @param group id of Group - * @param resource id of Resource - * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupResourceAttributeByName( - group: number, - resource: number, - attributeName: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getGroupResourceAttributeByName( - group: number, - resource: number, - attributeName: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getGroupResourceAttributeByName( - group: number, - resource: number, - attributeName: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getGroupResourceAttributeByName( - group: number, - resource: number, - attributeName: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getGroupResourceAttributeByName.' - ); - } - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getGroupResourceAttributeByName.' - ); - } - if (attributeName === null || attributeName === undefined) { - throw new Error( - 'Required parameter attributeName was null or undefined when calling getGroupResourceAttributeByName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (attributeName !== undefined && attributeName !== null) { - queryParameters = queryParameters.set('attributeName', attributeName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/attributesManager/getAttribute/name-group-resource`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns all non-empty Group-Resource attributes for selected Group and Resource. - * @param group id of Group - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupResourceAttributes( - group: number, - resource: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getGroupResourceAttributes( - group: number, - resource: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getGroupResourceAttributes( - group: number, - resource: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getGroupResourceAttributes( - group: number, - resource: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getGroupResourceAttributes.' - ); - } - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getGroupResourceAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getAttributes/group-resource`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns a host Attribute by its id. - * This is an overloaded method getAttribute, specialized for host and attribute id. - * @param host id of Host - * @param attributeId id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getHostAttributeById( - host: number, - attributeId: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getHostAttributeById( - host: number, - attributeId: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getHostAttributeById( - host: number, - attributeId: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getHostAttributeById( - host: number, - attributeId: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (host === null || host === undefined) { - throw new Error( - 'Required parameter host was null or undefined when calling getHostAttributeById.' - ); - } - if (attributeId === null || attributeId === undefined) { - throw new Error( - 'Required parameter attributeId was null or undefined when calling getHostAttributeById.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (host !== undefined && host !== null) { - queryParameters = queryParameters.set('host', host); - } - if (attributeId !== undefined && attributeId !== null) { - queryParameters = queryParameters.set('attributeId', attributeId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/attributesManager/getAttribute/id-host`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns a host Attribute by its name. - * This is an overloaded method getAttribute, specialized for host and attribute name. - * @param host id of Host - * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getHostAttributeByName( - host: number, - attributeName: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getHostAttributeByName( - host: number, - attributeName: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getHostAttributeByName( - host: number, - attributeName: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getHostAttributeByName( - host: number, - attributeName: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (host === null || host === undefined) { - throw new Error( - 'Required parameter host was null or undefined when calling getHostAttributeByName.' - ); - } - if (attributeName === null || attributeName === undefined) { - throw new Error( - 'Required parameter attributeName was null or undefined when calling getHostAttributeByName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (host !== undefined && host !== null) { - queryParameters = queryParameters.set('host', host); - } - if (attributeName !== undefined && attributeName !== null) { - queryParameters = queryParameters.set('attributeName', attributeName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/attributesManager/getAttribute/name-host`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all non-empty attributes associated with the host. - * @param host id of Host - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getHostAttributes( - host: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getHostAttributes( - host: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getHostAttributes( - host: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getHostAttributes( - host: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (host === null || host === undefined) { - throw new Error( - 'Required parameter host was null or undefined when calling getHostAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (host !== undefined && host !== null) { - queryParameters = queryParameters.set('host', host); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getAttributes/h`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all non-empty attributes associated with the host which have name in list attrNames (empty too). Empty list attrNames will return no attributes. - * @param host id of Host - * @param attrNames list of attribute names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getHostAttributesByNames( - host: number, - attrNames: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getHostAttributesByNames( - host: number, - attrNames: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getHostAttributesByNames( - host: number, - attrNames: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getHostAttributesByNames( - host: number, - attrNames: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (host === null || host === undefined) { - throw new Error( - 'Required parameter host was null or undefined when calling getHostAttributesByNames.' - ); - } - if (attrNames === null || attrNames === undefined) { - throw new Error( - 'Required parameter attrNames was null or undefined when calling getHostAttributesByNames.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (host !== undefined && host !== null) { - queryParameters = queryParameters.set('host', host); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getAttributes/h-names`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all users logins as Attributes. Meaning it returns all non-empty User attributes with URN starting with: \"urn:perun:user:attribute-def:def:login-namespace:\". - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getLogins( - user: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getLogins( - user: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getLogins( - user: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getLogins( - user: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getLogins.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getLogins`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all non-empty attributes associated with the member and if workWithUserAttributes is true, get all non-empty attributes associated with user, who is this member. - * @param member id of Member - * @param workWithUserAttributes flag to work with user attributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberAndUserAttributes( - member: number, - workWithUserAttributes: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getMemberAndUserAttributes( - member: number, - workWithUserAttributes: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getMemberAndUserAttributes( - member: number, - workWithUserAttributes: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getMemberAndUserAttributes( - member: number, - workWithUserAttributes: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getMemberAndUserAttributes.' - ); - } - if (workWithUserAttributes === null || workWithUserAttributes === undefined) { - throw new Error( - 'Required parameter workWithUserAttributes was null or undefined when calling getMemberAndUserAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { - queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getAttributes/m-wu`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all attributes associated with the member which have name in list attrNames (empty too). Virtual attributes too. If workWithUserAttribute is true, return also all user attributes in list of attrNames (with virtual attributes too). - * @param member id of Member - * @param attrNames list of attribute names List<String> - * @param workWithUserAttributes flag to work with user attributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberAndUserAttributesByNames( - member: number, - attrNames: Array, - workWithUserAttributes: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getMemberAndUserAttributesByNames( - member: number, - attrNames: Array, - workWithUserAttributes: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getMemberAndUserAttributesByNames( - member: number, - attrNames: Array, - workWithUserAttributes: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getMemberAndUserAttributesByNames( - member: number, - attrNames: Array, - workWithUserAttributes: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getMemberAndUserAttributesByNames.' - ); - } - if (attrNames === null || attrNames === undefined) { - throw new Error( - 'Required parameter attrNames was null or undefined when calling getMemberAndUserAttributesByNames.' - ); - } - if (workWithUserAttributes === null || workWithUserAttributes === undefined) { - throw new Error( - 'Required parameter workWithUserAttributes was null or undefined when calling getMemberAndUserAttributesByNames.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { - queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getAttributes/m-names-wu`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns a member Attribute by its id. - * This is an overloaded method getAttribute, specialized for member and attribute id. - * @param member id of Member - * @param attributeId id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberAttributeById( - member: number, - attributeId: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getMemberAttributeById( - member: number, - attributeId: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getMemberAttributeById( - member: number, - attributeId: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getMemberAttributeById( - member: number, - attributeId: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getMemberAttributeById.' - ); - } - if (attributeId === null || attributeId === undefined) { - throw new Error( - 'Required parameter attributeId was null or undefined when calling getMemberAttributeById.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (attributeId !== undefined && attributeId !== null) { - queryParameters = queryParameters.set('attributeId', attributeId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/attributesManager/getAttribute/id-member`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns a member Attribute by its name. - * This is an overloaded method getAttribute, specialized for member and attribute name. - * @param member id of Member - * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberAttributeByName( - member: number, - attributeName: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getMemberAttributeByName( - member: number, - attributeName: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getMemberAttributeByName( - member: number, - attributeName: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getMemberAttributeByName( - member: number, - attributeName: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getMemberAttributeByName.' - ); - } - if (attributeName === null || attributeName === undefined) { - throw new Error( - 'Required parameter attributeName was null or undefined when calling getMemberAttributeByName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (attributeName !== undefined && attributeName !== null) { - queryParameters = queryParameters.set('attributeName', attributeName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/attributesManager/getAttribute/name-member`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all non-empty attributes associated with the member. - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberAttributes( - member: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getMemberAttributes( - member: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getMemberAttributes( - member: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getMemberAttributes( - member: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getMemberAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getAttributes/m`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all attributes associated with the member which have name in list attrNames (empty too). Virtual attribute too. - * @param member id of Member - * @param attrNames list of attribute names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberAttributesByNames( - member: number, - attrNames: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getMemberAttributesByNames( - member: number, - attrNames: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getMemberAttributesByNames( - member: number, - attrNames: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getMemberAttributesByNames( - member: number, - attrNames: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getMemberAttributesByNames.' - ); - } - if (attrNames === null || attrNames === undefined) { - throw new Error( - 'Required parameter attrNames was null or undefined when calling getMemberAttributesByNames.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getAttributes/m-names`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all attributes associated with the member in the group which have name in list attrNames (empty too). If workWithUserAttribute is true, return also all user attributes in list of attrNames (with virtual attributes too). - * @param member id of Member - * @param group id of Group - * @param attrNames list of attribute names List<String> - * @param workWithUserAttributes flag to work with user attributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberGroupAndUserAttributesByNames( - member: number, - group: number, - attrNames: Array, - workWithUserAttributes: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getMemberGroupAndUserAttributesByNames( - member: number, - group: number, - attrNames: Array, - workWithUserAttributes: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getMemberGroupAndUserAttributesByNames( - member: number, - group: number, - attrNames: Array, - workWithUserAttributes: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getMemberGroupAndUserAttributesByNames( - member: number, - group: number, - attrNames: Array, - workWithUserAttributes: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getMemberGroupAndUserAttributesByNames.' - ); - } - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getMemberGroupAndUserAttributesByNames.' - ); - } - if (attrNames === null || attrNames === undefined) { - throw new Error( - 'Required parameter attrNames was null or undefined when calling getMemberGroupAndUserAttributesByNames.' - ); - } - if (workWithUserAttributes === null || workWithUserAttributes === undefined) { - throw new Error( - 'Required parameter workWithUserAttributes was null or undefined when calling getMemberGroupAndUserAttributesByNames.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { - queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getAttributes/m-g-names-wu`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns a member_group Attribute by its id. - * This is an overloaded method getAttribute, specialized for member, group and attribute id. - * @param member id of Member - * @param group id of Group - * @param attributeId id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberGroupAttributeById( - member: number, - group: number, - attributeId: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getMemberGroupAttributeById( - member: number, - group: number, - attributeId: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getMemberGroupAttributeById( - member: number, - group: number, - attributeId: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getMemberGroupAttributeById( - member: number, - group: number, - attributeId: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getMemberGroupAttributeById.' - ); - } - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getMemberGroupAttributeById.' - ); - } - if (attributeId === null || attributeId === undefined) { - throw new Error( - 'Required parameter attributeId was null or undefined when calling getMemberGroupAttributeById.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (attributeId !== undefined && attributeId !== null) { - queryParameters = queryParameters.set('attributeId', attributeId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/attributesManager/getAttribute/id-member-group`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns a member_group Attribute by its name. - * This is an overloaded method getAttribute, specialized for member, group and attribute name. - * @param member id of Member - * @param group id of Group - * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberGroupAttributeByName( - member: number, - group: number, - attributeName: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getMemberGroupAttributeByName( - member: number, - group: number, - attributeName: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getMemberGroupAttributeByName( - member: number, - group: number, - attributeName: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getMemberGroupAttributeByName( - member: number, - group: number, - attributeName: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getMemberGroupAttributeByName.' - ); - } - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getMemberGroupAttributeByName.' - ); - } - if (attributeName === null || attributeName === undefined) { - throw new Error( - 'Required parameter attributeName was null or undefined when calling getMemberGroupAttributeByName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (attributeName !== undefined && attributeName !== null) { - queryParameters = queryParameters.set('attributeName', attributeName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/attributesManager/getAttribute/name-member-group`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all non-empty attributes associated with the member in the group. - * @param member id of Member - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberGroupAttributes( - member: number, - group: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getMemberGroupAttributes( - member: number, - group: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getMemberGroupAttributes( - member: number, - group: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getMemberGroupAttributes( - member: number, - group: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getMemberGroupAttributes.' - ); - } - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getMemberGroupAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getAttributes/m-g`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all attributes (empty and virtual too)associated with the member in the group which have name in list attrNames. - * @param member id of Member - * @param group id of Group - * @param attrNames list of attribute names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberGroupAttributesByNames( - member: number, - group: number, - attrNames: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getMemberGroupAttributesByNames( - member: number, - group: number, - attrNames: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getMemberGroupAttributesByNames( - member: number, - group: number, - attrNames: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getMemberGroupAttributesByNames( - member: number, - group: number, - attrNames: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getMemberGroupAttributesByNames.' - ); - } - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getMemberGroupAttributesByNames.' - ); - } - if (attrNames === null || attrNames === undefined) { - throw new Error( - 'Required parameter attrNames was null or undefined when calling getMemberGroupAttributesByNames.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getAttributes/m-g-names`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets all non-empty attributes associated with the member on the resource and if workWithUserAttributes is true, gets also all non-empty user, user-facility and member attributes. - * @param member id of Member - * @param resource id of Resource - * @param workWithUserAttributes flag to work with user attributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberResourceAndUserFacilityAttributes( - member: number, - resource: number, - workWithUserAttributes: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getMemberResourceAndUserFacilityAttributes( - member: number, - resource: number, - workWithUserAttributes: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getMemberResourceAndUserFacilityAttributes( - member: number, - resource: number, - workWithUserAttributes: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getMemberResourceAndUserFacilityAttributes( - member: number, - resource: number, - workWithUserAttributes: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getMemberResourceAndUserFacilityAttributes.' - ); - } - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getMemberResourceAndUserFacilityAttributes.' - ); - } - if (workWithUserAttributes === null || workWithUserAttributes === undefined) { - throw new Error( - 'Required parameter workWithUserAttributes was null or undefined when calling getMemberResourceAndUserFacilityAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { - queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getAttributes/m-r-wu`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets selected non-empty attributes associated with the member and the resource. It returns member and member-resource attributes and also user and user-facility attributes if workWithUserAttributes is true. Attributes are selected by list of attr_names. Empty list means all attributes. - * @param member id of Member - * @param resource id of Resource - * @param attrNames list of attribute names List<String> - * @param workWithUserAttributes flag to work with user attributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberResourceAndUserFacilityAttributesByNames( - member: number, - resource: number, - attrNames: Array, - workWithUserAttributes: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getMemberResourceAndUserFacilityAttributesByNames( - member: number, - resource: number, - attrNames: Array, - workWithUserAttributes: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getMemberResourceAndUserFacilityAttributesByNames( - member: number, - resource: number, - attrNames: Array, - workWithUserAttributes: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getMemberResourceAndUserFacilityAttributesByNames( - member: number, - resource: number, - attrNames: Array, - workWithUserAttributes: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getMemberResourceAndUserFacilityAttributesByNames.' - ); - } - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getMemberResourceAndUserFacilityAttributesByNames.' - ); - } - if (attrNames === null || attrNames === undefined) { - throw new Error( - 'Required parameter attrNames was null or undefined when calling getMemberResourceAndUserFacilityAttributesByNames.' - ); - } - if (workWithUserAttributes === null || workWithUserAttributes === undefined) { - throw new Error( - 'Required parameter workWithUserAttributes was null or undefined when calling getMemberResourceAndUserFacilityAttributesByNames.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { - queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getAttributes/m-r-names-wu`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns a member_resource Attribute by its id. - * This is an overloaded method getAttribute, specialized for member, resource and attribute id. - * @param member id of Member - * @param resource id of Resource - * @param attributeId id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberResourceAttributeById( - member: number, - resource: number, - attributeId: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getMemberResourceAttributeById( - member: number, - resource: number, - attributeId: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getMemberResourceAttributeById( - member: number, - resource: number, - attributeId: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getMemberResourceAttributeById( - member: number, - resource: number, - attributeId: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getMemberResourceAttributeById.' - ); - } - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getMemberResourceAttributeById.' - ); - } - if (attributeId === null || attributeId === undefined) { - throw new Error( - 'Required parameter attributeId was null or undefined when calling getMemberResourceAttributeById.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (attributeId !== undefined && attributeId !== null) { - queryParameters = queryParameters.set('attributeId', attributeId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/attributesManager/getAttribute/id-member-resource`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns a member_resource Attribute by its name. - * This is an overloaded method getAttribute, specialized for member, resource and attribute name. - * @param member id of Member - * @param resource id of Resource - * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberResourceAttributeByName( - member: number, - resource: number, - attributeName: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getMemberResourceAttributeByName( - member: number, - resource: number, - attributeName: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getMemberResourceAttributeByName( - member: number, - resource: number, - attributeName: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getMemberResourceAttributeByName( - member: number, - resource: number, - attributeName: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getMemberResourceAttributeByName.' - ); - } - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getMemberResourceAttributeByName.' - ); - } - if (attributeName === null || attributeName === undefined) { - throw new Error( - 'Required parameter attributeName was null or undefined when calling getMemberResourceAttributeByName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (attributeName !== undefined && attributeName !== null) { - queryParameters = queryParameters.set('attributeName', attributeName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/attributesManager/getAttribute/name-member-resource`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all non-empty attributes associated with the member on the resource. - * @param member id of Member - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberResourceAttributes( - member: number, - resource: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getMemberResourceAttributes( - member: number, - resource: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getMemberResourceAttributes( - member: number, - resource: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getMemberResourceAttributes( - member: number, - resource: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getMemberResourceAttributes.' - ); - } - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getMemberResourceAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getAttributes/m-r`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns required attributes definition for a Service. - * @param service id of Service - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRequiredAttributesDefinition( - service: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getRequiredAttributesDefinition( - service: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getRequiredAttributesDefinition( - service: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getRequiredAttributesDefinition( - service: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling getRequiredAttributesDefinition.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getRequiredAttributesDefinition`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns required facility attributes. - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRequiredAttributesFacility( - facility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getRequiredAttributesFacility( - facility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getRequiredAttributesFacility( - facility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getRequiredAttributesFacility( - facility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getRequiredAttributesFacility.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/f`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns facility attributes required by specified service. - * @param service id of Service - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRequiredAttributesFacilityService( - service: number, - facility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getRequiredAttributesFacilityService( - service: number, - facility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getRequiredAttributesFacilityService( - service: number, - facility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getRequiredAttributesFacilityService( - service: number, - facility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling getRequiredAttributesFacilityService.' - ); - } - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getRequiredAttributesFacilityService.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/s-f`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns facility attributes required by specified list of services. - * @param services list of Service ids List<Integer> - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRequiredAttributesFacilityServices( - services: Array, - facility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getRequiredAttributesFacilityServices( - services: Array, - facility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getRequiredAttributesFacilityServices( - services: Array, - facility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getRequiredAttributesFacilityServices( - services: Array, - facility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (services === null || services === undefined) { - throw new Error( - 'Required parameter services was null or undefined when calling getRequiredAttributesFacilityServices.' - ); - } - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getRequiredAttributesFacilityServices.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (services) { - services.forEach((element) => { - queryParameters = queryParameters.append('services[]', element); - }); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/ss-f`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns group-resource attributes required by specified service. - * @param service id of Service - * @param resource id of Resource - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRequiredAttributesGroupResourceService( - service: number, - resource: number, - group: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getRequiredAttributesGroupResourceService( - service: number, - resource: number, - group: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getRequiredAttributesGroupResourceService( - service: number, - resource: number, - group: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getRequiredAttributesGroupResourceService( - service: number, - resource: number, - group: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling getRequiredAttributesGroupResourceService.' - ); - } - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getRequiredAttributesGroupResourceService.' - ); - } - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getRequiredAttributesGroupResourceService.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/s-r-g`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns required host attributes. - * @param service id of Service - * @param host id of Host - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRequiredAttributesHostService( - service: number, - host: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getRequiredAttributesHostService( - service: number, - host: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getRequiredAttributesHostService( - service: number, - host: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getRequiredAttributesHostService( - service: number, - host: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling getRequiredAttributesHostService.' - ); - } - if (host === null || host === undefined) { - throw new Error( - 'Required parameter host was null or undefined when calling getRequiredAttributesHostService.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (host !== undefined && host !== null) { - queryParameters = queryParameters.set('host', host); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/s-h`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns required member attributes. - * @param member id of Member - * @param workWithUserAttributes flag to work with user attributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRequiredAttributesMember( - member: number, - workWithUserAttributes?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getRequiredAttributesMember( - member: number, - workWithUserAttributes?: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getRequiredAttributesMember( - member: number, - workWithUserAttributes?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getRequiredAttributesMember( - member: number, - workWithUserAttributes?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getRequiredAttributesMember.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { - queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/m`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns required member-group attributes. If workWithUserAttributes == TRUE, then returns also user attributes. - * @param member id of Member - * @param group id of Group - * @param workWithUserAttributes flag to work with user attributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRequiredAttributesMemberGroup( - member: number, - group: number, - workWithUserAttributes?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getRequiredAttributesMemberGroup( - member: number, - group: number, - workWithUserAttributes?: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getRequiredAttributesMemberGroup( - member: number, - group: number, - workWithUserAttributes?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getRequiredAttributesMemberGroup( - member: number, - group: number, - workWithUserAttributes?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getRequiredAttributesMemberGroup.' - ); - } - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getRequiredAttributesMemberGroup.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { - queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/m-g`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns member, member-group and member-resource attributes required by specified service. If workWithUserAttributes == TRUE, then returns also user and user-facility attributes. - * @param service id of Service - * @param resource id of Resource - * @param group id of Group - * @param member id of Member - * @param workWithUserAttributes flag to work with user attributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRequiredAttributesMemberGroupResourceService( - service: number, - resource: number, - group: number, - member: number, - workWithUserAttributes?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getRequiredAttributesMemberGroupResourceService( - service: number, - resource: number, - group: number, - member: number, - workWithUserAttributes?: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getRequiredAttributesMemberGroupResourceService( - service: number, - resource: number, - group: number, - member: number, - workWithUserAttributes?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getRequiredAttributesMemberGroupResourceService( - service: number, - resource: number, - group: number, - member: number, - workWithUserAttributes?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling getRequiredAttributesMemberGroupResourceService.' - ); - } - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getRequiredAttributesMemberGroupResourceService.' - ); - } - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getRequiredAttributesMemberGroupResourceService.' - ); - } - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getRequiredAttributesMemberGroupResourceService.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { - queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/s-r-g-m`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns member-group attributes required by specified service. If workWithUserAttributes == TRUE, then returns also member and user attributes. - * @param service id of Service - * @param group id of Group - * @param member id of Member - * @param workWithUserAttributes flag to work with user attributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRequiredAttributesMemberGroupService( - service: number, - group: number, - member: number, - workWithUserAttributes?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getRequiredAttributesMemberGroupService( - service: number, - group: number, - member: number, - workWithUserAttributes?: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getRequiredAttributesMemberGroupService( - service: number, - group: number, - member: number, - workWithUserAttributes?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getRequiredAttributesMemberGroupService( - service: number, - group: number, - member: number, - workWithUserAttributes?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling getRequiredAttributesMemberGroupService.' - ); - } - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getRequiredAttributesMemberGroupService.' - ); - } - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getRequiredAttributesMemberGroupService.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { - queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/s-g-m`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns member-resource attributes required by specified list of services. If workWithUserAttributes == TRUE, then returns also user attributes. - * @param member id of Member - * @param resource id of Resource - * @param workWithUserAttributes flag to work with user attributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRequiredAttributesMemberResource( - member: number, - resource: number, - workWithUserAttributes?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getRequiredAttributesMemberResource( - member: number, - resource: number, - workWithUserAttributes?: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getRequiredAttributesMemberResource( - member: number, - resource: number, - workWithUserAttributes?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getRequiredAttributesMemberResource( - member: number, - resource: number, - workWithUserAttributes?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getRequiredAttributesMemberResource.' - ); - } - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getRequiredAttributesMemberResource.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { - queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/m-r`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns member and member-resource attributes required by the specified service. If workWithUserAttributes == TRUE, then returns also user attributes. - * @param service id of Service - * @param resource id of Resource - * @param member id of Member - * @param workWithUserAttributes flag to work with user attributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRequiredAttributesMemberResourceService( - service: number, - resource: number, - member: number, - workWithUserAttributes?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getRequiredAttributesMemberResourceService( - service: number, - resource: number, - member: number, - workWithUserAttributes?: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getRequiredAttributesMemberResourceService( - service: number, - resource: number, - member: number, - workWithUserAttributes?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getRequiredAttributesMemberResourceService( - service: number, - resource: number, - member: number, - workWithUserAttributes?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling getRequiredAttributesMemberResourceService.' - ); - } - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getRequiredAttributesMemberResourceService.' - ); - } - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getRequiredAttributesMemberResourceService.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { - queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/s-r-m`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns required resource attributes. - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRequiredAttributesResource( - resource: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getRequiredAttributesResource( - resource: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getRequiredAttributesResource( - resource: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getRequiredAttributesResource( - resource: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getRequiredAttributesResource.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/r`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns resource attributes required by specified service. - * @param service id of Service - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRequiredAttributesResourceService( - service: number, - resource: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getRequiredAttributesResourceService( - service: number, - resource: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getRequiredAttributesResourceService( - service: number, - resource: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getRequiredAttributesResourceService( - service: number, - resource: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling getRequiredAttributesResourceService.' - ); - } - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getRequiredAttributesResourceService.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/s-r`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns resource attributes required by specified list of services. - * @param services list of Service ids List<Integer> - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRequiredAttributesResourceServices( - services: Array, - resource: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getRequiredAttributesResourceServices( - services: Array, - resource: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getRequiredAttributesResourceServices( - services: Array, - resource: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getRequiredAttributesResourceServices( - services: Array, - resource: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (services === null || services === undefined) { - throw new Error( - 'Required parameter services was null or undefined when calling getRequiredAttributesResourceServices.' - ); - } - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getRequiredAttributesResourceServices.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (services) { - services.forEach((element) => { - queryParameters = queryParameters.append('services[]', element); - }); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/ss-r`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns required user attributes. - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRequiredAttributesUser( - user: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getRequiredAttributesUser( - user: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getRequiredAttributesUser( - user: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getRequiredAttributesUser( - user: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling getRequiredAttributesUser.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/u`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns required user-facility attributes. - * @param user id of User - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRequiredAttributesUserFacility( - user: number, - facility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getRequiredAttributesUserFacility( - user: number, - facility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getRequiredAttributesUserFacility( - user: number, - facility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getRequiredAttributesUserFacility( - user: number, - facility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling getRequiredAttributesUserFacility.' - ); - } - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getRequiredAttributesUserFacility.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/u-f`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns required vo attributes. - * @param service id of Service - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRequiredAttributesVoService( - service: number, - vo: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getRequiredAttributesVoService( - service: number, - vo: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getRequiredAttributesVoService( - service: number, - vo: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getRequiredAttributesVoService( - service: number, - vo: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling getRequiredAttributesVoService.' - ); - } - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling getRequiredAttributesVoService.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/s-v`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns a resource Attribute by its id. - * This is an overloaded method getAttribute, specialized for resource and attribute id. - * @param resource id of Resource - * @param attributeId id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourceAttributeById( - resource: number, - attributeId: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getResourceAttributeById( - resource: number, - attributeId: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getResourceAttributeById( - resource: number, - attributeId: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getResourceAttributeById( - resource: number, - attributeId: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getResourceAttributeById.' - ); - } - if (attributeId === null || attributeId === undefined) { - throw new Error( - 'Required parameter attributeId was null or undefined when calling getResourceAttributeById.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (attributeId !== undefined && attributeId !== null) { - queryParameters = queryParameters.set('attributeId', attributeId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/attributesManager/getAttribute/id-resource`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns a resource Attribute by its name. - * This is an overloaded method getAttribute, specialized for resource and attribute name. - * @param resource id of Resource - * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourceAttributeByName( - resource: number, - attributeName: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getResourceAttributeByName( - resource: number, - attributeName: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getResourceAttributeByName( - resource: number, - attributeName: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getResourceAttributeByName( - resource: number, - attributeName: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getResourceAttributeByName.' - ); - } - if (attributeName === null || attributeName === undefined) { - throw new Error( - 'Required parameter attributeName was null or undefined when calling getResourceAttributeByName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (attributeName !== undefined && attributeName !== null) { - queryParameters = queryParameters.set('attributeName', attributeName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/attributesManager/getAttribute/name-resource`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all non-empty attributes associated with the resource. - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourceAttributes( - resource: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getResourceAttributes( - resource: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getResourceAttributes( - resource: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getResourceAttributes( - resource: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getResourceAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getAttributes/r`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all attributes associated with the resource which have name in list attrNames (empty too). Virtual attributes too. - * @param resource id of Resource - * @param attrNames list of attribute names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourceAttributesByNames( - resource: number, - attrNames: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getResourceAttributesByNames( - resource: number, - attrNames: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getResourceAttributesByNames( - resource: number, - attrNames: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getResourceAttributesByNames( - resource: number, - attrNames: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getResourceAttributesByNames.' - ); - } - if (attrNames === null || attrNames === undefined) { - throw new Error( - 'Required parameter attrNames was null or undefined when calling getResourceAttributesByNames.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getAttributes/r-names`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all non-empty attributes associated with the group and resource. Virtual attributes too. If workWithGroupAttributes is true, return also all group attributes. - * @param resource id of Resource - * @param group id of Group - * @param workWithGroupAttributes flag to work with group attributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourceGroupAndGroupAttributes( - resource: number, - group: number, - workWithGroupAttributes: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getResourceGroupAndGroupAttributes( - resource: number, - group: number, - workWithGroupAttributes: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getResourceGroupAndGroupAttributes( - resource: number, - group: number, - workWithGroupAttributes: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getResourceGroupAndGroupAttributes( - resource: number, - group: number, - workWithGroupAttributes: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getResourceGroupAndGroupAttributes.' - ); - } - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getResourceGroupAndGroupAttributes.' - ); - } - if (workWithGroupAttributes === null || workWithGroupAttributes === undefined) { - throw new Error( - 'Required parameter workWithGroupAttributes was null or undefined when calling getResourceGroupAndGroupAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (workWithGroupAttributes !== undefined && workWithGroupAttributes !== null) { - queryParameters = queryParameters.set( - 'workWithGroupAttributes', - workWithGroupAttributes - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getAttributes/r-g-wg`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all attributes associated with the group and the resource which have their name in list attrNames (empty too). Virtual attributes too. If workWithGroupAttributes is true, return also all group attributes in list of attrNames (with virtual attributes too). - * @param resource id of Resource - * @param group id of Group - * @param attrNames list of attribute names List<String> - * @param workWithGroupAttributes flag to work with group attributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourceGroupAndGroupAttributesByNames( - resource: number, - group: number, - attrNames: Array, - workWithGroupAttributes: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getResourceGroupAndGroupAttributesByNames( - resource: number, - group: number, - attrNames: Array, - workWithGroupAttributes: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getResourceGroupAndGroupAttributesByNames( - resource: number, - group: number, - attrNames: Array, - workWithGroupAttributes: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getResourceGroupAndGroupAttributesByNames( - resource: number, - group: number, - attrNames: Array, - workWithGroupAttributes: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getResourceGroupAndGroupAttributesByNames.' - ); - } - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getResourceGroupAndGroupAttributesByNames.' - ); - } - if (attrNames === null || attrNames === undefined) { - throw new Error( - 'Required parameter attrNames was null or undefined when calling getResourceGroupAndGroupAttributesByNames.' - ); - } - if (workWithGroupAttributes === null || workWithGroupAttributes === undefined) { - throw new Error( - 'Required parameter workWithGroupAttributes was null or undefined when calling getResourceGroupAndGroupAttributesByNames.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - if (workWithGroupAttributes !== undefined && workWithGroupAttributes !== null) { - queryParameters = queryParameters.set( - 'workWithGroupAttributes', - workWithGroupAttributes - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getAttributes/r-g-names-wg`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all non-empty attributes associated with the group on resource. - * @param resource id of Resource - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourceGroupAttributes( - resource: number, - group: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getResourceGroupAttributes( - resource: number, - group: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getResourceGroupAttributes( - resource: number, - group: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getResourceGroupAttributes( - resource: number, - group: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getResourceGroupAttributes.' - ); - } - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getResourceGroupAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getAttributes/r-g`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all attributes by the list of attrNames if they are in one of these namespaces: - member - group - member-group - resource - member-resource - group-resource - user (get from member object) - facility (get from resource object) - user-facility Returns all attributes even if they are empty or virtual. - * @param resource id of Resource - * @param group id of Group - * @param member id of Member - * @param attrNames list of attribute names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourceGroupMemberAttributesByNames( - resource: number, - group: number, - member: number, - attrNames: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getResourceGroupMemberAttributesByNames( - resource: number, - group: number, - member: number, - attrNames: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getResourceGroupMemberAttributesByNames( - resource: number, - group: number, - member: number, - attrNames: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getResourceGroupMemberAttributesByNames( - resource: number, - group: number, - member: number, - attrNames: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getResourceGroupMemberAttributesByNames.' - ); - } - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getResourceGroupMemberAttributesByNames.' - ); - } - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getResourceGroupMemberAttributesByNames.' - ); - } - if (attrNames === null || attrNames === undefined) { - throw new Error( - 'Required parameter attrNames was null or undefined when calling getResourceGroupMemberAttributesByNames.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getAttributes/r-g-m-names`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns a user Attribute by its id. - * This is an overloaded method getAttribute, specialized for user and attribute id. - * @param user id of User - * @param attributeId id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserAttributeById( - user: number, - attributeId: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getUserAttributeById( - user: number, - attributeId: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getUserAttributeById( - user: number, - attributeId: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getUserAttributeById( - user: number, - attributeId: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling getUserAttributeById.' - ); - } - if (attributeId === null || attributeId === undefined) { - throw new Error( - 'Required parameter attributeId was null or undefined when calling getUserAttributeById.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (attributeId !== undefined && attributeId !== null) { - queryParameters = queryParameters.set('attributeId', attributeId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/attributesManager/getAttribute/id-user`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns a user Attribute by its name. - * This is an overloaded method getAttribute, specialized for user and attribute name. - * @param user id of User - * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserAttributeByName( - user: number, - attributeName: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getUserAttributeByName( - user: number, - attributeName: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getUserAttributeByName( - user: number, - attributeName: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getUserAttributeByName( - user: number, - attributeName: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling getUserAttributeByName.' - ); - } - if (attributeName === null || attributeName === undefined) { - throw new Error( - 'Required parameter attributeName was null or undefined when calling getUserAttributeByName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (attributeName !== undefined && attributeName !== null) { - queryParameters = queryParameters.set('attributeName', attributeName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/attributesManager/getAttribute/name-user`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all non-empty attributes associated with the user. - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserAttributes( - user: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getUserAttributes( - user: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getUserAttributes( - user: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getUserAttributes( - user: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling getUserAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getAttributes/u`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all attributes associated with the user which have name in list attrNames (empty too). - * @param user id of User - * @param attrNames list of attribute names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserAttributesByNames( - user: number, - attrNames: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getUserAttributesByNames( - user: number, - attrNames: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getUserAttributesByNames( - user: number, - attrNames: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getUserAttributesByNames( - user: number, - attrNames: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling getUserAttributesByNames.' - ); - } - if (attrNames === null || attrNames === undefined) { - throw new Error( - 'Required parameter attrNames was null or undefined when calling getUserAttributesByNames.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getAttributes/u-names`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns a UserExtSource Attribute by its id. - * This is an overloaded method getAttribute, specialized for UserExtSource and attribute id. - * @param userExtSource id of UserExtSource - * @param attributeId id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserExtSourceAttributeById( - userExtSource: number, - attributeId: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getUserExtSourceAttributeById( - userExtSource: number, - attributeId: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getUserExtSourceAttributeById( - userExtSource: number, - attributeId: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getUserExtSourceAttributeById( - userExtSource: number, - attributeId: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (userExtSource === null || userExtSource === undefined) { - throw new Error( - 'Required parameter userExtSource was null or undefined when calling getUserExtSourceAttributeById.' - ); - } - if (attributeId === null || attributeId === undefined) { - throw new Error( - 'Required parameter attributeId was null or undefined when calling getUserExtSourceAttributeById.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (userExtSource !== undefined && userExtSource !== null) { - queryParameters = queryParameters.set('userExtSource', userExtSource); - } - if (attributeId !== undefined && attributeId !== null) { - queryParameters = queryParameters.set('attributeId', attributeId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/attributesManager/getAttribute/id-ues`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns a UserExtSource Attribute by its name. - * This is an overloaded method getAttribute, specialized for UserExtSource and attribute name. - * @param userExtSource id of UserExtSource - * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserExtSourceAttributeByName( - userExtSource: number, - attributeName: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getUserExtSourceAttributeByName( - userExtSource: number, - attributeName: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getUserExtSourceAttributeByName( - userExtSource: number, - attributeName: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getUserExtSourceAttributeByName( - userExtSource: number, - attributeName: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (userExtSource === null || userExtSource === undefined) { - throw new Error( - 'Required parameter userExtSource was null or undefined when calling getUserExtSourceAttributeByName.' - ); - } - if (attributeName === null || attributeName === undefined) { - throw new Error( - 'Required parameter attributeName was null or undefined when calling getUserExtSourceAttributeByName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (userExtSource !== undefined && userExtSource !== null) { - queryParameters = queryParameters.set('userExtSource', userExtSource); - } - if (attributeName !== undefined && attributeName !== null) { - queryParameters = queryParameters.set('attributeName', attributeName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/attributesManager/getAttribute/name-ues`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all non-empty attributes associated with the UserExtSource. - * @param userExtSource id of UserExtSource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserExtSourceAttributes( - userExtSource: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getUserExtSourceAttributes( - userExtSource: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getUserExtSourceAttributes( - userExtSource: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getUserExtSourceAttributes( - userExtSource: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (userExtSource === null || userExtSource === undefined) { - throw new Error( - 'Required parameter userExtSource was null or undefined when calling getUserExtSourceAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (userExtSource !== undefined && userExtSource !== null) { - queryParameters = queryParameters.set('userExtSource', userExtSource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getAttributes/ues`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all attributes associated with the userExtSource which have name in list attrNames (empty too). - * @param userExtSource id of UserExtSource - * @param attrNames list of attribute names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserExtSourceAttributesByNames( - userExtSource: number, - attrNames: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getUserExtSourceAttributesByNames( - userExtSource: number, - attrNames: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getUserExtSourceAttributesByNames( - userExtSource: number, - attrNames: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getUserExtSourceAttributesByNames( - userExtSource: number, - attrNames: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (userExtSource === null || userExtSource === undefined) { - throw new Error( - 'Required parameter userExtSource was null or undefined when calling getUserExtSourceAttributesByNames.' - ); - } - if (attrNames === null || attrNames === undefined) { - throw new Error( - 'Required parameter attrNames was null or undefined when calling getUserExtSourceAttributesByNames.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (userExtSource !== undefined && userExtSource !== null) { - queryParameters = queryParameters.set('userExtSource', userExtSource); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getAttributes/ues-names`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns a user_facility Attribute by its id. - * This is an overloaded method getAttribute, specialized for user, facility and attribute id. - * @param user id of User - * @param facility id of Facility - * @param attributeId id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserFacilityAttributeById( - user: number, - facility: number, - attributeId: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getUserFacilityAttributeById( - user: number, - facility: number, - attributeId: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getUserFacilityAttributeById( - user: number, - facility: number, - attributeId: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getUserFacilityAttributeById( - user: number, - facility: number, - attributeId: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling getUserFacilityAttributeById.' - ); - } - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getUserFacilityAttributeById.' - ); - } - if (attributeId === null || attributeId === undefined) { - throw new Error( - 'Required parameter attributeId was null or undefined when calling getUserFacilityAttributeById.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (attributeId !== undefined && attributeId !== null) { - queryParameters = queryParameters.set('attributeId', attributeId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/attributesManager/getAttribute/id-user_facility`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns a user_facility Attribute by its name. - * This is an overloaded method getAttribute, specialized for user, facility and attribute name. - * @param user id of User - * @param facility id of Facility - * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserFacilityAttributeByName( - user: number, - facility: number, - attributeName: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getUserFacilityAttributeByName( - user: number, - facility: number, - attributeName: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getUserFacilityAttributeByName( - user: number, - facility: number, - attributeName: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getUserFacilityAttributeByName( - user: number, - facility: number, - attributeName: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling getUserFacilityAttributeByName.' - ); - } - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getUserFacilityAttributeByName.' - ); - } - if (attributeName === null || attributeName === undefined) { - throw new Error( - 'Required parameter attributeName was null or undefined when calling getUserFacilityAttributeByName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (attributeName !== undefined && attributeName !== null) { - queryParameters = queryParameters.set('attributeName', attributeName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/attributesManager/getAttribute/name-user_facility`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns all non-empty User-Facility attributes for selected User and Facility. - * @param user id of User - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserFacilityAttributes( - user: number, - facility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getUserFacilityAttributes( - user: number, - facility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getUserFacilityAttributes( - user: number, - facility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getUserFacilityAttributes( - user: number, - facility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling getUserFacilityAttributes.' - ); - } - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getUserFacilityAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getAttributes/user-facility`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns a Vo Attribute by its id. - * This is an overloaded method getAttribute, specialized for virtual organization and attribute id. - * @param vo id of Vo - * @param attributeId id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVoAttributeById( - vo: number, - attributeId: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getVoAttributeById( - vo: number, - attributeId: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getVoAttributeById( - vo: number, - attributeId: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getVoAttributeById( - vo: number, - attributeId: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling getVoAttributeById.' - ); - } - if (attributeId === null || attributeId === undefined) { - throw new Error( - 'Required parameter attributeId was null or undefined when calling getVoAttributeById.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (attributeId !== undefined && attributeId !== null) { - queryParameters = queryParameters.set('attributeId', attributeId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/attributesManager/getAttribute/id-vo`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns a Vo Attribute by its name. - * This is an overloaded method getAttribute, specialized for virtual organization and attribute name. - * @param vo id of Vo - * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVoAttributeByName( - vo: number, - attributeName: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getVoAttributeByName( - vo: number, - attributeName: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getVoAttributeByName( - vo: number, - attributeName: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getVoAttributeByName( - vo: number, - attributeName: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling getVoAttributeByName.' - ); - } - if (attributeName === null || attributeName === undefined) { - throw new Error( - 'Required parameter attributeName was null or undefined when calling getVoAttributeByName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (attributeName !== undefined && attributeName !== null) { - queryParameters = queryParameters.set('attributeName', attributeName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/attributesManager/getAttribute/name-vo`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all attributes associated with the vo. - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVoAttributes( - vo: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getVoAttributes( - vo: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getVoAttributes( - vo: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getVoAttributes( - vo: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getVoAttributes.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getAttributes/vo`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all attributes associated with the vo which have name in list attrNames (empty too). - * @param vo id of Vo - * @param attrNames list of attribute names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVoAttributesByNames( - vo: number, - attrNames: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getVoAttributesByNames( - vo: number, - attrNames: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getVoAttributesByNames( - vo: number, - attrNames: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getVoAttributesByNames( - vo: number, - attrNames: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling getVoAttributesByNames.' - ); - } - if (attrNames === null || attrNames === undefined) { - throw new Error( - 'Required parameter attrNames was null or undefined when calling getVoAttributesByNames.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/attributesManager/getAttributes/vo-names`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove attributes of namespace facility, resource, group, user and member - * @param facility id of Facility - * @param resource id of Resource - * @param group id of Group - * @param user id of User - * @param member id of Member - * @param attributes list of attribute ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeAttributesForFacilityResourceGroupUserMember( - facility: number, - resource: number, - group: number, - user: number, - member: number, - attributes: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeAttributesForFacilityResourceGroupUserMember( - facility: number, - resource: number, - group: number, - user: number, - member: number, - attributes: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeAttributesForFacilityResourceGroupUserMember( - facility: number, - resource: number, - group: number, - user: number, - member: number, - attributes: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeAttributesForFacilityResourceGroupUserMember( - facility: number, - resource: number, - group: number, - user: number, - member: number, - attributes: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling removeAttributesForFacilityResourceGroupUserMember.' - ); - } - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling removeAttributesForFacilityResourceGroupUserMember.' - ); - } - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling removeAttributesForFacilityResourceGroupUserMember.' - ); - } - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling removeAttributesForFacilityResourceGroupUserMember.' - ); - } - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling removeAttributesForFacilityResourceGroupUserMember.' - ); - } - if (attributes === null || attributes === undefined) { - throw new Error( - 'Required parameter attributes was null or undefined when calling removeAttributesForFacilityResourceGroupUserMember.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/f-r-g-u-m`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove attributes of namespace facility, resource, user and member - * @param facility id of Facility - * @param resource id of Resource - * @param user id of User - * @param member id of Member - * @param attributes list of attribute ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeAttributesForFacilityResourceUserMember( - facility: number, - resource: number, - user: number, - member: number, - attributes: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeAttributesForFacilityResourceUserMember( - facility: number, - resource: number, - user: number, - member: number, - attributes: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeAttributesForFacilityResourceUserMember( - facility: number, - resource: number, - user: number, - member: number, - attributes: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeAttributesForFacilityResourceUserMember( - facility: number, - resource: number, - user: number, - member: number, - attributes: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling removeAttributesForFacilityResourceUserMember.' - ); - } - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling removeAttributesForFacilityResourceUserMember.' - ); - } - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling removeAttributesForFacilityResourceUserMember.' - ); - } - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling removeAttributesForFacilityResourceUserMember.' - ); - } - if (attributes === null || attributes === undefined) { - throw new Error( - 'Required parameter attributes was null or undefined when calling removeAttributesForFacilityResourceUserMember.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/f-r-u-m`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove entityless attribute - * @param key key of an entityless attribute - * @param attribute id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeEntitylessAttribute( - key: string, - attribute: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeEntitylessAttribute( - key: string, - attribute: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeEntitylessAttribute( - key: string, - attribute: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeEntitylessAttribute( - key: string, - attribute: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (key === null || key === undefined) { - throw new Error( - 'Required parameter key was null or undefined when calling removeEntitylessAttribute.' - ); - } - if (attribute === null || attribute === undefined) { - throw new Error( - 'Required parameter attribute was null or undefined when calling removeEntitylessAttribute.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (key !== undefined && key !== null) { - queryParameters = queryParameters.set('key', key); - } - if (attribute !== undefined && attribute !== null) { - queryParameters = queryParameters.set('attribute', attribute); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/e`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove facility attribute - * @param facility id of Facility - * @param attribute id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeFacilityAttribute( - facility: number, - attribute: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeFacilityAttribute( - facility: number, - attribute: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeFacilityAttribute( - facility: number, - attribute: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeFacilityAttribute( - facility: number, - attribute: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling removeFacilityAttribute.' - ); - } - if (attribute === null || attribute === undefined) { - throw new Error( - 'Required parameter attribute was null or undefined when calling removeFacilityAttribute.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (attribute !== undefined && attribute !== null) { - queryParameters = queryParameters.set('attribute', attribute); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/f`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove attributes of namespace facility - * @param facility id of Facility - * @param attributes list of attribute ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeFacilityAttributes( - facility: number, - attributes: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeFacilityAttributes( - facility: number, - attributes: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeFacilityAttributes( - facility: number, - attributes: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeFacilityAttributes( - facility: number, - attributes: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling removeFacilityAttributes.' - ); - } - if (attributes === null || attributes === undefined) { - throw new Error( - 'Required parameter attributes was null or undefined when calling removeFacilityAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/f`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove group attribute - * @param group id of Group - * @param attribute id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeGroupAttribute( - group: number, - attribute: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeGroupAttribute( - group: number, - attribute: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeGroupAttribute( - group: number, - attribute: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeGroupAttribute( - group: number, - attribute: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling removeGroupAttribute.' - ); - } - if (attribute === null || attribute === undefined) { - throw new Error( - 'Required parameter attribute was null or undefined when calling removeGroupAttribute.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (attribute !== undefined && attribute !== null) { - queryParameters = queryParameters.set('attribute', attribute); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/g`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove attributes of namespace group - * @param group id of Group - * @param attributes list of attribute ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeGroupAttributes( - group: number, - attributes: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeGroupAttributes( - group: number, - attributes: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeGroupAttributes( - group: number, - attributes: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeGroupAttributes( - group: number, - attributes: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling removeGroupAttributes.' - ); - } - if (attributes === null || attributes === undefined) { - throw new Error( - 'Required parameter attributes was null or undefined when calling removeGroupAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/g`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove group-resource attribute - * @param group id of Group - * @param resource id of Resource - * @param attribute id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeGroupResourceAttribute( - group: number, - resource: number, - attribute: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeGroupResourceAttribute( - group: number, - resource: number, - attribute: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeGroupResourceAttribute( - group: number, - resource: number, - attribute: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeGroupResourceAttribute( - group: number, - resource: number, - attribute: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling removeGroupResourceAttribute.' - ); - } - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling removeGroupResourceAttribute.' - ); - } - if (attribute === null || attribute === undefined) { - throw new Error( - 'Required parameter attribute was null or undefined when calling removeGroupResourceAttribute.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (attribute !== undefined && attribute !== null) { - queryParameters = queryParameters.set('attribute', attribute); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/g-r`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove attributes of namespace group-resource - * @param group id of Group - * @param resource id of Resource - * @param attributes list of attribute ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeGroupResourceAttributes( - group: number, - resource: number, - attributes: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeGroupResourceAttributes( - group: number, - resource: number, - attributes: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeGroupResourceAttributes( - group: number, - resource: number, - attributes: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeGroupResourceAttributes( - group: number, - resource: number, - attributes: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling removeGroupResourceAttributes.' - ); - } - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling removeGroupResourceAttributes.' - ); - } - if (attributes === null || attributes === undefined) { - throw new Error( - 'Required parameter attributes was null or undefined when calling removeGroupResourceAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/g-r`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove attributes of namespace group-resource - * @param group id of Group - * @param resource id of Resource - * @param attributes list of attribute ids List<Integer> - * @param workWithGroupAttributes flag to work with group attributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeGroupResourceAttributesWorkWithGroupAttributes( - group: number, - resource: number, - attributes: Array, - workWithGroupAttributes: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeGroupResourceAttributesWorkWithGroupAttributes( - group: number, - resource: number, - attributes: Array, - workWithGroupAttributes: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeGroupResourceAttributesWorkWithGroupAttributes( - group: number, - resource: number, - attributes: Array, - workWithGroupAttributes: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeGroupResourceAttributesWorkWithGroupAttributes( - group: number, - resource: number, - attributes: Array, - workWithGroupAttributes: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling removeGroupResourceAttributesWorkWithGroupAttributes.' - ); - } - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling removeGroupResourceAttributesWorkWithGroupAttributes.' - ); - } - if (attributes === null || attributes === undefined) { - throw new Error( - 'Required parameter attributes was null or undefined when calling removeGroupResourceAttributesWorkWithGroupAttributes.' - ); - } - if (workWithGroupAttributes === null || workWithGroupAttributes === undefined) { - throw new Error( - 'Required parameter workWithGroupAttributes was null or undefined when calling removeGroupResourceAttributesWorkWithGroupAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }); - } - if (workWithGroupAttributes !== undefined && workWithGroupAttributes !== null) { - queryParameters = queryParameters.set( - 'workWithGroupAttributes', - workWithGroupAttributes - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/g-r-workWithGroupAttributes`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove host attribute - * @param host id of Host - * @param attribute id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeHostAttribute( - host: number, - attribute: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeHostAttribute( - host: number, - attribute: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeHostAttribute( - host: number, - attribute: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeHostAttribute( - host: number, - attribute: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (host === null || host === undefined) { - throw new Error( - 'Required parameter host was null or undefined when calling removeHostAttribute.' - ); - } - if (attribute === null || attribute === undefined) { - throw new Error( - 'Required parameter attribute was null or undefined when calling removeHostAttribute.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (host !== undefined && host !== null) { - queryParameters = queryParameters.set('host', host); - } - if (attribute !== undefined && attribute !== null) { - queryParameters = queryParameters.set('attribute', attribute); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/h`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove attributes of namespace host - * @param host id of Host - * @param attributes list of attribute ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeHostAttributes( - host: number, - attributes: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeHostAttributes( - host: number, - attributes: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeHostAttributes( - host: number, - attributes: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeHostAttributes( - host: number, - attributes: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (host === null || host === undefined) { - throw new Error( - 'Required parameter host was null or undefined when calling removeHostAttributes.' - ); - } - if (attributes === null || attributes === undefined) { - throw new Error( - 'Required parameter attributes was null or undefined when calling removeHostAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (host !== undefined && host !== null) { - queryParameters = queryParameters.set('host', host); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/h`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove member attribute - * @param member id of Member - * @param attribute id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeMemberAttribute( - member: number, - attribute: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeMemberAttribute( - member: number, - attribute: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeMemberAttribute( - member: number, - attribute: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeMemberAttribute( - member: number, - attribute: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling removeMemberAttribute.' - ); - } - if (attribute === null || attribute === undefined) { - throw new Error( - 'Required parameter attribute was null or undefined when calling removeMemberAttribute.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (attribute !== undefined && attribute !== null) { - queryParameters = queryParameters.set('attribute', attribute); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/m`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove attributes of namespace member - * @param member id of Member - * @param attributes list of attribute ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeMemberAttributes( - member: number, - attributes: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeMemberAttributes( - member: number, - attributes: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeMemberAttributes( - member: number, - attributes: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeMemberAttributes( - member: number, - attributes: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling removeMemberAttributes.' - ); - } - if (attributes === null || attributes === undefined) { - throw new Error( - 'Required parameter attributes was null or undefined when calling removeMemberAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/m`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove attributes of namespace member - * @param member id of Member - * @param attributes list of attribute ids List<Integer> - * @param workWithUserAttributes flag to work with user attributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeMemberAttributesWorkWithUserAttributes( - member: number, - attributes: Array, - workWithUserAttributes: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeMemberAttributesWorkWithUserAttributes( - member: number, - attributes: Array, - workWithUserAttributes: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeMemberAttributesWorkWithUserAttributes( - member: number, - attributes: Array, - workWithUserAttributes: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeMemberAttributesWorkWithUserAttributes( - member: number, - attributes: Array, - workWithUserAttributes: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling removeMemberAttributesWorkWithUserAttributes.' - ); - } - if (attributes === null || attributes === undefined) { - throw new Error( - 'Required parameter attributes was null or undefined when calling removeMemberAttributesWorkWithUserAttributes.' - ); - } - if (workWithUserAttributes === null || workWithUserAttributes === undefined) { - throw new Error( - 'Required parameter workWithUserAttributes was null or undefined when calling removeMemberAttributesWorkWithUserAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }); - } - if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { - queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/m-workWithUserAttributes`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove member-group attribute - * @param member id of Member - * @param group id of Group - * @param attribute id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeMemberGroupAttribute( - member: number, - group: number, - attribute: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeMemberGroupAttribute( - member: number, - group: number, - attribute: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeMemberGroupAttribute( - member: number, - group: number, - attribute: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeMemberGroupAttribute( - member: number, - group: number, - attribute: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling removeMemberGroupAttribute.' - ); - } - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling removeMemberGroupAttribute.' - ); - } - if (attribute === null || attribute === undefined) { - throw new Error( - 'Required parameter attribute was null or undefined when calling removeMemberGroupAttribute.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (attribute !== undefined && attribute !== null) { - queryParameters = queryParameters.set('attribute', attribute); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/m-g`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove attributes of namespace member-group - * @param member id of Member - * @param group id of Group - * @param attributes list of attribute ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeMemberGroupAttributes( - member: number, - group: number, - attributes: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeMemberGroupAttributes( - member: number, - group: number, - attributes: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeMemberGroupAttributes( - member: number, - group: number, - attributes: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeMemberGroupAttributes( - member: number, - group: number, - attributes: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling removeMemberGroupAttributes.' - ); - } - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling removeMemberGroupAttributes.' - ); - } - if (attributes === null || attributes === undefined) { - throw new Error( - 'Required parameter attributes was null or undefined when calling removeMemberGroupAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/m-g`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove attributes of namespace member-group - * @param member id of Member - * @param group id of Group - * @param attributes list of attribute ids List<Integer> - * @param workWithUserAttributes flag to work with user attributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeMemberGroupAttributesWorkWithUserAttributes( - member: number, - group: number, - attributes: Array, - workWithUserAttributes: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeMemberGroupAttributesWorkWithUserAttributes( - member: number, - group: number, - attributes: Array, - workWithUserAttributes: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeMemberGroupAttributesWorkWithUserAttributes( - member: number, - group: number, - attributes: Array, - workWithUserAttributes: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeMemberGroupAttributesWorkWithUserAttributes( - member: number, - group: number, - attributes: Array, - workWithUserAttributes: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling removeMemberGroupAttributesWorkWithUserAttributes.' - ); - } - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling removeMemberGroupAttributesWorkWithUserAttributes.' - ); - } - if (attributes === null || attributes === undefined) { - throw new Error( - 'Required parameter attributes was null or undefined when calling removeMemberGroupAttributesWorkWithUserAttributes.' - ); - } - if (workWithUserAttributes === null || workWithUserAttributes === undefined) { - throw new Error( - 'Required parameter workWithUserAttributes was null or undefined when calling removeMemberGroupAttributesWorkWithUserAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }); - } - if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { - queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/m-g-workWithUserAttributes`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove member-resource attribute - * @param member id of Member - * @param resource id of Resource - * @param attribute id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeMemberResourceAttribute( - member: number, - resource: number, - attribute: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeMemberResourceAttribute( - member: number, - resource: number, - attribute: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeMemberResourceAttribute( - member: number, - resource: number, - attribute: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeMemberResourceAttribute( - member: number, - resource: number, - attribute: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling removeMemberResourceAttribute.' - ); - } - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling removeMemberResourceAttribute.' - ); - } - if (attribute === null || attribute === undefined) { - throw new Error( - 'Required parameter attribute was null or undefined when calling removeMemberResourceAttribute.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (attribute !== undefined && attribute !== null) { - queryParameters = queryParameters.set('attribute', attribute); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/m-r`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove attributes of namespace member-resource - * @param member id of Member - * @param resource id of Resource - * @param attributes list of attribute ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeMemberResourceAttributes( - member: number, - resource: number, - attributes: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeMemberResourceAttributes( - member: number, - resource: number, - attributes: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeMemberResourceAttributes( - member: number, - resource: number, - attributes: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeMemberResourceAttributes( - member: number, - resource: number, - attributes: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling removeMemberResourceAttributes.' - ); - } - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling removeMemberResourceAttributes.' - ); - } - if (attributes === null || attributes === undefined) { - throw new Error( - 'Required parameter attributes was null or undefined when calling removeMemberResourceAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/m-r`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove resource attribute - * @param resource id of Resource - * @param attribute id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeResourceAttribute( - resource: number, - attribute: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeResourceAttribute( - resource: number, - attribute: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeResourceAttribute( - resource: number, - attribute: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeResourceAttribute( - resource: number, - attribute: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling removeResourceAttribute.' - ); - } - if (attribute === null || attribute === undefined) { - throw new Error( - 'Required parameter attribute was null or undefined when calling removeResourceAttribute.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (attribute !== undefined && attribute !== null) { - queryParameters = queryParameters.set('attribute', attribute); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/r`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove attributes of namespace resource - * @param resource id of Resource - * @param attributes list of attribute ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeResourceAttributes( - resource: number, - attributes: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeResourceAttributes( - resource: number, - attributes: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeResourceAttributes( - resource: number, - attributes: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeResourceAttributes( - resource: number, - attributes: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling removeResourceAttributes.' - ); - } - if (attributes === null || attributes === undefined) { - throw new Error( - 'Required parameter attributes was null or undefined when calling removeResourceAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/r`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove attributes of namespace userExtSource - * @param userExtSource id of UserExtSource - * @param attributes list of attribute ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeUesAttributes( - userExtSource: number, - attributes: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeUesAttributes( - userExtSource: number, - attributes: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeUesAttributes( - userExtSource: number, - attributes: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeUesAttributes( - userExtSource: number, - attributes: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (userExtSource === null || userExtSource === undefined) { - throw new Error( - 'Required parameter userExtSource was null or undefined when calling removeUesAttributes.' - ); - } - if (attributes === null || attributes === undefined) { - throw new Error( - 'Required parameter attributes was null or undefined when calling removeUesAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (userExtSource !== undefined && userExtSource !== null) { - queryParameters = queryParameters.set('userExtSource', userExtSource); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/ues`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove user attribute - * @param user id of User - * @param attribute id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeUserAttribute( - user: number, - attribute: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeUserAttribute( - user: number, - attribute: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeUserAttribute( - user: number, - attribute: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeUserAttribute( - user: number, - attribute: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling removeUserAttribute.' - ); - } - if (attribute === null || attribute === undefined) { - throw new Error( - 'Required parameter attribute was null or undefined when calling removeUserAttribute.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (attribute !== undefined && attribute !== null) { - queryParameters = queryParameters.set('attribute', attribute); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/u`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove attributes of namespace user - * @param user id of User - * @param attributes list of attribute ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeUserAttributes( - user: number, - attributes: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeUserAttributes( - user: number, - attributes: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeUserAttributes( - user: number, - attributes: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeUserAttributes( - user: number, - attributes: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling removeUserAttributes.' - ); - } - if (attributes === null || attributes === undefined) { - throw new Error( - 'Required parameter attributes was null or undefined when calling removeUserAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/u`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove userExtSource attribute - * @param userExtSource id of UserExtSource - * @param attribute id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeUserExtSourceAttribute( - userExtSource: number, - attribute: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeUserExtSourceAttribute( - userExtSource: number, - attribute: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeUserExtSourceAttribute( - userExtSource: number, - attribute: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeUserExtSourceAttribute( - userExtSource: number, - attribute: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (userExtSource === null || userExtSource === undefined) { - throw new Error( - 'Required parameter userExtSource was null or undefined when calling removeUserExtSourceAttribute.' - ); - } - if (attribute === null || attribute === undefined) { - throw new Error( - 'Required parameter attribute was null or undefined when calling removeUserExtSourceAttribute.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (userExtSource !== undefined && userExtSource !== null) { - queryParameters = queryParameters.set('userExtSource', userExtSource); - } - if (attribute !== undefined && attribute !== null) { - queryParameters = queryParameters.set('attribute', attribute); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/ues`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove user facility attribute - * @param user id of User - * @param facility id of Facility - * @param attribute id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeUserFacilityAttribute( - user: number, - facility: number, - attribute: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeUserFacilityAttribute( - user: number, - facility: number, - attribute: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeUserFacilityAttribute( - user: number, - facility: number, - attribute: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeUserFacilityAttribute( - user: number, - facility: number, - attribute: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling removeUserFacilityAttribute.' - ); - } - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling removeUserFacilityAttribute.' - ); - } - if (attribute === null || attribute === undefined) { - throw new Error( - 'Required parameter attribute was null or undefined when calling removeUserFacilityAttribute.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (attribute !== undefined && attribute !== null) { - queryParameters = queryParameters.set('attribute', attribute); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/u-f`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove attributes of namespace user-facility - * @param user id of User - * @param facility id of Facility - * @param attributes list of attribute ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeUserFacilityAttributes( - user: number, - facility: number, - attributes: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeUserFacilityAttributes( - user: number, - facility: number, - attributes: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeUserFacilityAttributes( - user: number, - facility: number, - attributes: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeUserFacilityAttributes( - user: number, - facility: number, - attributes: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling removeUserFacilityAttributes.' - ); - } - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling removeUserFacilityAttributes.' - ); - } - if (attributes === null || attributes === undefined) { - throw new Error( - 'Required parameter attributes was null or undefined when calling removeUserFacilityAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/u-f`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove vo attribute - * @param vo id of Vo - * @param attribute id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeVoAttribute( - vo: number, - attribute: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeVoAttribute( - vo: number, - attribute: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeVoAttribute( - vo: number, - attribute: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeVoAttribute( - vo: number, - attribute: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling removeVoAttribute.' - ); - } - if (attribute === null || attribute === undefined) { - throw new Error( - 'Required parameter attribute was null or undefined when calling removeVoAttribute.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (attribute !== undefined && attribute !== null) { - queryParameters = queryParameters.set('attribute', attribute); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/v`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove attributes of namespace vo - * @param vo id of Vo - * @param attributes list of attribute ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeVoAttributes( - vo: number, - attributes: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeVoAttributes( - vo: number, - attributes: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeVoAttributes( - vo: number, - attributes: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeVoAttributes( - vo: number, - attributes: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling removeVoAttributes.' - ); - } - if (attributes === null || attributes === undefined) { - throw new Error( - 'Required parameter attributes was null or undefined when calling removeVoAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/v`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Sets all AttributeRights in the list given as a parameter. Allowed Roles to set rights for are: VOADMIN, GROUPADMIN, FACILITYADMIN, SELF. - * @param inputAttributeRights - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setAttributeRights( - inputAttributeRights: InputAttributeRights, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setAttributeRights( - inputAttributeRights: InputAttributeRights, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setAttributeRights( - inputAttributeRights: InputAttributeRights, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setAttributeRights( - inputAttributeRights: InputAttributeRights, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputAttributeRights === null || inputAttributeRights === undefined) { - throw new Error( - 'Required parameter inputAttributeRights was null or undefined when calling setAttributeRights.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/attributesManager/setAttributeRights`, - inputAttributeRights, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Sets entityless Attribute. - * @param inputEntitylessAttribute - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setEntitylessAttribute( - inputEntitylessAttribute: InputEntitylessAttribute, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setEntitylessAttribute( - inputEntitylessAttribute: InputEntitylessAttribute, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setEntitylessAttribute( - inputEntitylessAttribute: InputEntitylessAttribute, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setEntitylessAttribute( - inputEntitylessAttribute: InputEntitylessAttribute, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputEntitylessAttribute === null || inputEntitylessAttribute === undefined) { - throw new Error( - 'Required parameter inputEntitylessAttribute was null or undefined when calling setEntitylessAttribute.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/attributesManager/setAttribute/entityless`, - inputEntitylessAttribute, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Sets Attribute for Facility. - * @param inputSetFacilityAttribute - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setFacilityAttribute( - inputSetFacilityAttribute: InputSetFacilityAttribute, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setFacilityAttribute( - inputSetFacilityAttribute: InputSetFacilityAttribute, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setFacilityAttribute( - inputSetFacilityAttribute: InputSetFacilityAttribute, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setFacilityAttribute( - inputSetFacilityAttribute: InputSetFacilityAttribute, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputSetFacilityAttribute === null || inputSetFacilityAttribute === undefined) { - throw new Error( - 'Required parameter inputSetFacilityAttribute was null or undefined when calling setFacilityAttribute.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/attributesManager/setAttribute/facility`, - inputSetFacilityAttribute, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Store the attributes associated with the facility. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). - * @param inputSetFacilityAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setFacilityAttributes( - inputSetFacilityAttributes: InputSetFacilityAttributes, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setFacilityAttributes( - inputSetFacilityAttributes: InputSetFacilityAttributes, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setFacilityAttributes( - inputSetFacilityAttributes: InputSetFacilityAttributes, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setFacilityAttributes( - inputSetFacilityAttributes: InputSetFacilityAttributes, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputSetFacilityAttributes === null || inputSetFacilityAttributes === undefined) { - throw new Error( - 'Required parameter inputSetFacilityAttributes was null or undefined when calling setFacilityAttributes.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/attributesManager/setAttributes/f`, - inputSetFacilityAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Store the member, user, member-group, member-resource and user-facility attributes. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). Group and group-resource attributes are not supported in this context. - * @param inputSetFacilityResourceGroupUserMemberAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setFacilityResourceGroupUserMemberAttributes( - inputSetFacilityResourceGroupUserMemberAttributes: InputSetFacilityResourceGroupUserMemberAttributes, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setFacilityResourceGroupUserMemberAttributes( - inputSetFacilityResourceGroupUserMemberAttributes: InputSetFacilityResourceGroupUserMemberAttributes, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setFacilityResourceGroupUserMemberAttributes( - inputSetFacilityResourceGroupUserMemberAttributes: InputSetFacilityResourceGroupUserMemberAttributes, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setFacilityResourceGroupUserMemberAttributes( - inputSetFacilityResourceGroupUserMemberAttributes: InputSetFacilityResourceGroupUserMemberAttributes, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if ( - inputSetFacilityResourceGroupUserMemberAttributes === null || - inputSetFacilityResourceGroupUserMemberAttributes === undefined - ) { - throw new Error( - 'Required parameter inputSetFacilityResourceGroupUserMemberAttributes was null or undefined when calling setFacilityResourceGroupUserMemberAttributes.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/attributesManager/setAttributes/f-r-g-u-m`, - inputSetFacilityResourceGroupUserMemberAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Store the member, user, member-resource and user-facility attributes. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). - * @param inputSetFacilityResourceUserMemberAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setFacilityResourceUserMemberAttributes( - inputSetFacilityResourceUserMemberAttributes: InputSetFacilityResourceUserMemberAttributes, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setFacilityResourceUserMemberAttributes( - inputSetFacilityResourceUserMemberAttributes: InputSetFacilityResourceUserMemberAttributes, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setFacilityResourceUserMemberAttributes( - inputSetFacilityResourceUserMemberAttributes: InputSetFacilityResourceUserMemberAttributes, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setFacilityResourceUserMemberAttributes( - inputSetFacilityResourceUserMemberAttributes: InputSetFacilityResourceUserMemberAttributes, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if ( - inputSetFacilityResourceUserMemberAttributes === null || - inputSetFacilityResourceUserMemberAttributes === undefined - ) { - throw new Error( - 'Required parameter inputSetFacilityResourceUserMemberAttributes was null or undefined when calling setFacilityResourceUserMemberAttributes.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/attributesManager/setAttributes/f-r-u-m`, - inputSetFacilityResourceUserMemberAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Store the attributes associated with the facility and user combination. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). - * @param inputSetFacilityUserAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setFacilityUserAttributes( - inputSetFacilityUserAttributes: InputSetFacilityUserAttributes, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setFacilityUserAttributes( - inputSetFacilityUserAttributes: InputSetFacilityUserAttributes, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setFacilityUserAttributes( - inputSetFacilityUserAttributes: InputSetFacilityUserAttributes, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setFacilityUserAttributes( - inputSetFacilityUserAttributes: InputSetFacilityUserAttributes, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputSetFacilityUserAttributes === null || inputSetFacilityUserAttributes === undefined) { - throw new Error( - 'Required parameter inputSetFacilityUserAttributes was null or undefined when calling setFacilityUserAttributes.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/attributesManager/setAttributes/f-u`, - inputSetFacilityUserAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Sets Attribute for Group. - * @param inputSetGroupAttribute - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setGroupAttribute( - inputSetGroupAttribute: InputSetGroupAttribute, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setGroupAttribute( - inputSetGroupAttribute: InputSetGroupAttribute, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setGroupAttribute( - inputSetGroupAttribute: InputSetGroupAttribute, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setGroupAttribute( - inputSetGroupAttribute: InputSetGroupAttribute, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputSetGroupAttribute === null || inputSetGroupAttribute === undefined) { - throw new Error( - 'Required parameter inputSetGroupAttribute was null or undefined when calling setGroupAttribute.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/attributesManager/setAttribute/group`, - inputSetGroupAttribute, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Store the attributes associated with the group. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). - * @param inputSetGroupAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setGroupAttributes( - inputSetGroupAttributes: InputSetGroupAttributes, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setGroupAttributes( - inputSetGroupAttributes: InputSetGroupAttributes, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setGroupAttributes( - inputSetGroupAttributes: InputSetGroupAttributes, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setGroupAttributes( - inputSetGroupAttributes: InputSetGroupAttributes, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputSetGroupAttributes === null || inputSetGroupAttributes === undefined) { - throw new Error( - 'Required parameter inputSetGroupAttributes was null or undefined when calling setGroupAttributes.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/attributesManager/setAttributes/g`, - inputSetGroupAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Sets Attribute for Group and Resource. - * @param inputSetGroupResourceAttribute - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setGroupResourceAttribute( - inputSetGroupResourceAttribute: InputSetGroupResourceAttribute, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setGroupResourceAttribute( - inputSetGroupResourceAttribute: InputSetGroupResourceAttribute, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setGroupResourceAttribute( - inputSetGroupResourceAttribute: InputSetGroupResourceAttribute, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setGroupResourceAttribute( - inputSetGroupResourceAttribute: InputSetGroupResourceAttribute, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputSetGroupResourceAttribute === null || inputSetGroupResourceAttribute === undefined) { - throw new Error( - 'Required parameter inputSetGroupResourceAttribute was null or undefined when calling setGroupResourceAttribute.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/attributesManager/setAttribute/group-resource`, - inputSetGroupResourceAttribute, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Sets Attributes for Group and Resource. - * @param inputSetGroupResourceAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setGroupResourceAttributes( - inputSetGroupResourceAttributes: InputSetGroupResourceAttributes, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setGroupResourceAttributes( - inputSetGroupResourceAttributes: InputSetGroupResourceAttributes, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setGroupResourceAttributes( - inputSetGroupResourceAttributes: InputSetGroupResourceAttributes, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setGroupResourceAttributes( - inputSetGroupResourceAttributes: InputSetGroupResourceAttributes, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputSetGroupResourceAttributes === null || inputSetGroupResourceAttributes === undefined) { - throw new Error( - 'Required parameter inputSetGroupResourceAttributes was null or undefined when calling setGroupResourceAttributes.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/attributesManager/setAttributes/group-resource`, - inputSetGroupResourceAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Sets Attribute for Host. - * @param inputSetHostAttribute - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setHostAttribute( - inputSetHostAttribute: InputSetHostAttribute, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setHostAttribute( - inputSetHostAttribute: InputSetHostAttribute, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setHostAttribute( - inputSetHostAttribute: InputSetHostAttribute, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setHostAttribute( - inputSetHostAttribute: InputSetHostAttribute, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputSetHostAttribute === null || inputSetHostAttribute === undefined) { - throw new Error( - 'Required parameter inputSetHostAttribute was null or undefined when calling setHostAttribute.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/attributesManager/setAttribute/host`, - inputSetHostAttribute, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Store the attributes associated with the host. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). - * @param inputSetHostAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setHostAttributes( - inputSetHostAttributes: InputSetHostAttributes, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setHostAttributes( - inputSetHostAttributes: InputSetHostAttributes, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setHostAttributes( - inputSetHostAttributes: InputSetHostAttributes, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setHostAttributes( - inputSetHostAttributes: InputSetHostAttributes, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputSetHostAttributes === null || inputSetHostAttributes === undefined) { - throw new Error( - 'Required parameter inputSetHostAttributes was null or undefined when calling setHostAttributes.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/attributesManager/setAttributes/h`, - inputSetHostAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Sets Attribute for Member. - * @param inputSetMemberAttribute - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setMemberAttribute( - inputSetMemberAttribute: InputSetMemberAttribute, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setMemberAttribute( - inputSetMemberAttribute: InputSetMemberAttribute, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setMemberAttribute( - inputSetMemberAttribute: InputSetMemberAttribute, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setMemberAttribute( - inputSetMemberAttribute: InputSetMemberAttribute, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputSetMemberAttribute === null || inputSetMemberAttribute === undefined) { - throw new Error( - 'Required parameter inputSetMemberAttribute was null or undefined when calling setMemberAttribute.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/attributesManager/setAttribute/member`, - inputSetMemberAttribute, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Store the attributes associated with the member. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). - * @param inputSetMemberAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setMemberAttributes( - inputSetMemberAttributes: InputSetMemberAttributes, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setMemberAttributes( - inputSetMemberAttributes: InputSetMemberAttributes, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setMemberAttributes( - inputSetMemberAttributes: InputSetMemberAttributes, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setMemberAttributes( - inputSetMemberAttributes: InputSetMemberAttributes, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputSetMemberAttributes === null || inputSetMemberAttributes === undefined) { - throw new Error( - 'Required parameter inputSetMemberAttributes was null or undefined when calling setMemberAttributes.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/attributesManager/setAttributes/m`, - inputSetMemberAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Sets Attribute for Member and Group. - * @param inputSetMemberGroupAttribute - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setMemberGroupAttribute( - inputSetMemberGroupAttribute: InputSetMemberGroupAttribute, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setMemberGroupAttribute( - inputSetMemberGroupAttribute: InputSetMemberGroupAttribute, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setMemberGroupAttribute( - inputSetMemberGroupAttribute: InputSetMemberGroupAttribute, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setMemberGroupAttribute( - inputSetMemberGroupAttribute: InputSetMemberGroupAttribute, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputSetMemberGroupAttribute === null || inputSetMemberGroupAttribute === undefined) { - throw new Error( - 'Required parameter inputSetMemberGroupAttribute was null or undefined when calling setMemberGroupAttribute.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/attributesManager/setAttribute/member-group`, - inputSetMemberGroupAttribute, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Store the attributes associated with the member and group combination. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). - * @param inputSetMemberGroupAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setMemberGroupAttributes( - inputSetMemberGroupAttributes: InputSetMemberGroupAttributes, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setMemberGroupAttributes( - inputSetMemberGroupAttributes: InputSetMemberGroupAttributes, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setMemberGroupAttributes( - inputSetMemberGroupAttributes: InputSetMemberGroupAttributes, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setMemberGroupAttributes( - inputSetMemberGroupAttributes: InputSetMemberGroupAttributes, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputSetMemberGroupAttributes === null || inputSetMemberGroupAttributes === undefined) { - throw new Error( - 'Required parameter inputSetMemberGroupAttributes was null or undefined when calling setMemberGroupAttributes.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/attributesManager/setAttributes/m-g`, - inputSetMemberGroupAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Store the attributes associated with the member and group combination. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). If workWithUserAttributes is true, the method stores also the attributes associated with user and member. - * @param inputSetMemberGroupWithUserAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setMemberGroupWithUserAttributes( - inputSetMemberGroupWithUserAttributes: InputSetMemberGroupWithUserAttributes, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setMemberGroupWithUserAttributes( - inputSetMemberGroupWithUserAttributes: InputSetMemberGroupWithUserAttributes, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setMemberGroupWithUserAttributes( - inputSetMemberGroupWithUserAttributes: InputSetMemberGroupWithUserAttributes, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setMemberGroupWithUserAttributes( - inputSetMemberGroupWithUserAttributes: InputSetMemberGroupWithUserAttributes, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if ( - inputSetMemberGroupWithUserAttributes === null || - inputSetMemberGroupWithUserAttributes === undefined - ) { - throw new Error( - 'Required parameter inputSetMemberGroupWithUserAttributes was null or undefined when calling setMemberGroupWithUserAttributes.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/attributesManager/setAttributes/m-g-wu`, - inputSetMemberGroupWithUserAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Store the attributes associated with the resource and member combination. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). If workWithUserAttributes is true, the method stores also the attributes associated with user, user-facility and member. - * @param inputSetMemberResourceAndUserAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setMemberResourceAndUserAttributes( - inputSetMemberResourceAndUserAttributes: InputSetMemberResourceAndUserAttributes, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setMemberResourceAndUserAttributes( - inputSetMemberResourceAndUserAttributes: InputSetMemberResourceAndUserAttributes, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setMemberResourceAndUserAttributes( - inputSetMemberResourceAndUserAttributes: InputSetMemberResourceAndUserAttributes, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setMemberResourceAndUserAttributes( - inputSetMemberResourceAndUserAttributes: InputSetMemberResourceAndUserAttributes, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if ( - inputSetMemberResourceAndUserAttributes === null || - inputSetMemberResourceAndUserAttributes === undefined - ) { - throw new Error( - 'Required parameter inputSetMemberResourceAndUserAttributes was null or undefined when calling setMemberResourceAndUserAttributes.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/attributesManager/setAttributes/m-r-wu`, - inputSetMemberResourceAndUserAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Sets Attribute for Member and Resource. - * @param inputSetMemberResourceAttribute - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setMemberResourceAttribute( - inputSetMemberResourceAttribute: InputSetMemberResourceAttribute, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setMemberResourceAttribute( - inputSetMemberResourceAttribute: InputSetMemberResourceAttribute, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setMemberResourceAttribute( - inputSetMemberResourceAttribute: InputSetMemberResourceAttribute, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setMemberResourceAttribute( - inputSetMemberResourceAttribute: InputSetMemberResourceAttribute, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputSetMemberResourceAttribute === null || inputSetMemberResourceAttribute === undefined) { - throw new Error( - 'Required parameter inputSetMemberResourceAttribute was null or undefined when calling setMemberResourceAttribute.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/attributesManager/setAttribute/member-resource`, - inputSetMemberResourceAttribute, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Store the attributes associated with the resource and member combination. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). - * @param inputSetMemberResourceAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setMemberResourceAttributes( - inputSetMemberResourceAttributes: InputSetMemberResourceAttributes, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setMemberResourceAttributes( - inputSetMemberResourceAttributes: InputSetMemberResourceAttributes, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setMemberResourceAttributes( - inputSetMemberResourceAttributes: InputSetMemberResourceAttributes, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setMemberResourceAttributes( - inputSetMemberResourceAttributes: InputSetMemberResourceAttributes, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if ( - inputSetMemberResourceAttributes === null || - inputSetMemberResourceAttributes === undefined - ) { - throw new Error( - 'Required parameter inputSetMemberResourceAttributes was null or undefined when calling setMemberResourceAttributes.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/attributesManager/setAttributes/m-r`, - inputSetMemberResourceAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Store the attributes associated with member and user (which we get from this member) if workWithUserAttributes is true. - * @param inputSetMemberWithUserAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setMemberWithUserAttributes( - inputSetMemberWithUserAttributes: InputSetMemberWithUserAttributes, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setMemberWithUserAttributes( - inputSetMemberWithUserAttributes: InputSetMemberWithUserAttributes, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setMemberWithUserAttributes( - inputSetMemberWithUserAttributes: InputSetMemberWithUserAttributes, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setMemberWithUserAttributes( - inputSetMemberWithUserAttributes: InputSetMemberWithUserAttributes, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if ( - inputSetMemberWithUserAttributes === null || - inputSetMemberWithUserAttributes === undefined - ) { - throw new Error( - 'Required parameter inputSetMemberWithUserAttributes was null or undefined when calling setMemberWithUserAttributes.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/attributesManager/setAttributes/m-wu`, - inputSetMemberWithUserAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Sets Attribute for Resource. - * @param inputSetResourceAttribute - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setResourceAttribute( - inputSetResourceAttribute: InputSetResourceAttribute, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setResourceAttribute( - inputSetResourceAttribute: InputSetResourceAttribute, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setResourceAttribute( - inputSetResourceAttribute: InputSetResourceAttribute, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setResourceAttribute( - inputSetResourceAttribute: InputSetResourceAttribute, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputSetResourceAttribute === null || inputSetResourceAttribute === undefined) { - throw new Error( - 'Required parameter inputSetResourceAttribute was null or undefined when calling setResourceAttribute.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/attributesManager/setAttribute/resource`, - inputSetResourceAttribute, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Store the attributes associated with the resource. - * @param inputSetResourceAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setResourceAttributes( - inputSetResourceAttributes: InputSetResourceAttributes, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setResourceAttributes( - inputSetResourceAttributes: InputSetResourceAttributes, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setResourceAttributes( - inputSetResourceAttributes: InputSetResourceAttributes, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setResourceAttributes( - inputSetResourceAttributes: InputSetResourceAttributes, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputSetResourceAttributes === null || inputSetResourceAttributes === undefined) { - throw new Error( - 'Required parameter inputSetResourceAttributes was null or undefined when calling setResourceAttributes.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/attributesManager/setAttributes/r`, - inputSetResourceAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Store the attributes associated with the group on resource. - * @param inputSetResourceGroupAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setResourceGroupAttributes( - inputSetResourceGroupAttributes: InputSetResourceGroupAttributes, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setResourceGroupAttributes( - inputSetResourceGroupAttributes: InputSetResourceGroupAttributes, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setResourceGroupAttributes( - inputSetResourceGroupAttributes: InputSetResourceGroupAttributes, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setResourceGroupAttributes( - inputSetResourceGroupAttributes: InputSetResourceGroupAttributes, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputSetResourceGroupAttributes === null || inputSetResourceGroupAttributes === undefined) { - throw new Error( - 'Required parameter inputSetResourceGroupAttributes was null or undefined when calling setResourceGroupAttributes.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/attributesManager/setAttributes/r-g`, - inputSetResourceGroupAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Store the attributes associated with group and resource, if workWithUserAttributes is true then also from group itself. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). - * @param inputSetResourceGroupWithGroupAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setResourceGroupWithGroupAttributes( - inputSetResourceGroupWithGroupAttributes: InputSetResourceGroupWithGroupAttributes, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setResourceGroupWithGroupAttributes( - inputSetResourceGroupWithGroupAttributes: InputSetResourceGroupWithGroupAttributes, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setResourceGroupWithGroupAttributes( - inputSetResourceGroupWithGroupAttributes: InputSetResourceGroupWithGroupAttributes, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setResourceGroupWithGroupAttributes( - inputSetResourceGroupWithGroupAttributes: InputSetResourceGroupWithGroupAttributes, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if ( - inputSetResourceGroupWithGroupAttributes === null || - inputSetResourceGroupWithGroupAttributes === undefined - ) { - throw new Error( - 'Required parameter inputSetResourceGroupWithGroupAttributes was null or undefined when calling setResourceGroupWithGroupAttributes.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/attributesManager/setAttributes/r-g-wg`, - inputSetResourceGroupWithGroupAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Sets Attribute for User. - * @param inputSetUserAttribute - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setUserAttribute( - inputSetUserAttribute: InputSetUserAttribute, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setUserAttribute( - inputSetUserAttribute: InputSetUserAttribute, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setUserAttribute( - inputSetUserAttribute: InputSetUserAttribute, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setUserAttribute( - inputSetUserAttribute: InputSetUserAttribute, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputSetUserAttribute === null || inputSetUserAttribute === undefined) { - throw new Error( - 'Required parameter inputSetUserAttribute was null or undefined when calling setUserAttribute.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/attributesManager/setAttribute/user`, - inputSetUserAttribute, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Store the attributes associated with the user. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). - * @param inputSetUserAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setUserAttributes( - inputSetUserAttributes: InputSetUserAttributes, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setUserAttributes( - inputSetUserAttributes: InputSetUserAttributes, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setUserAttributes( - inputSetUserAttributes: InputSetUserAttributes, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setUserAttributes( - inputSetUserAttributes: InputSetUserAttributes, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputSetUserAttributes === null || inputSetUserAttributes === undefined) { - throw new Error( - 'Required parameter inputSetUserAttributes was null or undefined when calling setUserAttributes.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/attributesManager/setAttributes/u`, - inputSetUserAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Sets Attribute for UserExtSource. - * @param inputSetUserExtSourceAttribute - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setUserExtSourceAttribute( - inputSetUserExtSourceAttribute: InputSetUserExtSourceAttribute, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setUserExtSourceAttribute( - inputSetUserExtSourceAttribute: InputSetUserExtSourceAttribute, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setUserExtSourceAttribute( - inputSetUserExtSourceAttribute: InputSetUserExtSourceAttribute, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setUserExtSourceAttribute( - inputSetUserExtSourceAttribute: InputSetUserExtSourceAttribute, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputSetUserExtSourceAttribute === null || inputSetUserExtSourceAttribute === undefined) { - throw new Error( - 'Required parameter inputSetUserExtSourceAttribute was null or undefined when calling setUserExtSourceAttribute.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/attributesManager/setAttribute/userExtSource`, - inputSetUserExtSourceAttribute, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Store the attributes associated with the UserExtSource. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). - * @param inputSetUserExtSourceAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setUserExtSourceAttributes( - inputSetUserExtSourceAttributes: InputSetUserExtSourceAttributes, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setUserExtSourceAttributes( - inputSetUserExtSourceAttributes: InputSetUserExtSourceAttributes, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setUserExtSourceAttributes( - inputSetUserExtSourceAttributes: InputSetUserExtSourceAttributes, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setUserExtSourceAttributes( - inputSetUserExtSourceAttributes: InputSetUserExtSourceAttributes, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputSetUserExtSourceAttributes === null || inputSetUserExtSourceAttributes === undefined) { - throw new Error( - 'Required parameter inputSetUserExtSourceAttributes was null or undefined when calling setUserExtSourceAttributes.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/attributesManager/setAttributes/ues`, - inputSetUserExtSourceAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Sets Attribute for User and Facility. - * @param inputSetUserFacilityAttribute - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setUserFacilityAttribute( - inputSetUserFacilityAttribute: InputSetUserFacilityAttribute, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setUserFacilityAttribute( - inputSetUserFacilityAttribute: InputSetUserFacilityAttribute, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setUserFacilityAttribute( - inputSetUserFacilityAttribute: InputSetUserFacilityAttribute, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setUserFacilityAttribute( - inputSetUserFacilityAttribute: InputSetUserFacilityAttribute, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputSetUserFacilityAttribute === null || inputSetUserFacilityAttribute === undefined) { - throw new Error( - 'Required parameter inputSetUserFacilityAttribute was null or undefined when calling setUserFacilityAttribute.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/attributesManager/setAttribute/facility-user`, - inputSetUserFacilityAttribute, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Sets Attributes for User and Facility. - * @param inputSetUserFacilityAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setUserFacilityAttributes( - inputSetUserFacilityAttributes: InputSetUserFacilityAttributes, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setUserFacilityAttributes( - inputSetUserFacilityAttributes: InputSetUserFacilityAttributes, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setUserFacilityAttributes( - inputSetUserFacilityAttributes: InputSetUserFacilityAttributes, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setUserFacilityAttributes( - inputSetUserFacilityAttributes: InputSetUserFacilityAttributes, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputSetUserFacilityAttributes === null || inputSetUserFacilityAttributes === undefined) { - throw new Error( - 'Required parameter inputSetUserFacilityAttributes was null or undefined when calling setUserFacilityAttributes.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/attributesManager/setAttributes/facility-user`, - inputSetUserFacilityAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Sets Attribute for Vo. - * @param inputSetVoAttribute - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setVoAttribute( - inputSetVoAttribute: InputSetVoAttribute, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setVoAttribute( - inputSetVoAttribute: InputSetVoAttribute, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setVoAttribute( - inputSetVoAttribute: InputSetVoAttribute, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setVoAttribute( - inputSetVoAttribute: InputSetVoAttribute, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputSetVoAttribute === null || inputSetVoAttribute === undefined) { - throw new Error( - 'Required parameter inputSetVoAttribute was null or undefined when calling setVoAttribute.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/attributesManager/setAttribute/vo`, - inputSetVoAttribute, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Store the attributes associated with the vo. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). - * @param inputSetVoAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setVoAttributes( - inputSetVoAttributes: InputSetVoAttributes, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setVoAttributes( - inputSetVoAttributes: InputSetVoAttributes, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setVoAttributes( - inputSetVoAttributes: InputSetVoAttributes, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setVoAttributes( - inputSetVoAttributes: InputSetVoAttributes, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputSetVoAttributes === null || inputSetVoAttributes === undefined) { - throw new Error( - 'Required parameter inputSetVoAttributes was null or undefined when calling setVoAttributes.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/attributesManager/setAttributes/vo`, - inputSetVoAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Updates AttributeDefinition in Perun based on provided object. Update is done on AttributeDefinition selected by its <code>id</code>. - * @param inputAttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateAttributeDefinition( - inputAttributeDefinition: InputAttributeDefinition, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public updateAttributeDefinition( - inputAttributeDefinition: InputAttributeDefinition, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public updateAttributeDefinition( - inputAttributeDefinition: InputAttributeDefinition, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public updateAttributeDefinition( - inputAttributeDefinition: InputAttributeDefinition, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputAttributeDefinition === null || inputAttributeDefinition === undefined) { - throw new Error( - 'Required parameter inputAttributeDefinition was null or undefined when calling updateAttributeDefinition.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/attributesManager/updateAttributeDefinition`, - inputAttributeDefinition, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } + + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + + + /** + * Converts attribute to nonunique - unmarks unique flag from attribute definition, and deletes all values from a special table with unique constraint that ensures that all values remain unique. + * @param attributeDefinition id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public convertAttributeToNonunique(attributeDefinition: number, observe?: 'body', reportProgress?: boolean): Observable; + public convertAttributeToNonunique(attributeDefinition: number, observe?: 'response', reportProgress?: boolean): Observable>; + public convertAttributeToNonunique(attributeDefinition: number, observe?: 'events', reportProgress?: boolean): Observable>; + public convertAttributeToNonunique(attributeDefinition: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (attributeDefinition === null || attributeDefinition === undefined) { + throw new Error('Required parameter attributeDefinition was null or undefined when calling convertAttributeToNonunique.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (attributeDefinition !== undefined && attributeDefinition !== null) { + queryParameters = queryParameters.set('attributeDefinition', attributeDefinition); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/convertAttributeToNonunique`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Converts attribute to unique - marks its definition as unique and ensures that all its values are unique. Entityless attributes cannot be converted to unique, only attributes attached to PerunBeans or pairs of PerunBeans. + * @param attributeDefinition id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public convertAttributeToUnique(attributeDefinition: number, observe?: 'body', reportProgress?: boolean): Observable; + public convertAttributeToUnique(attributeDefinition: number, observe?: 'response', reportProgress?: boolean): Observable>; + public convertAttributeToUnique(attributeDefinition: number, observe?: 'events', reportProgress?: boolean): Observable>; + public convertAttributeToUnique(attributeDefinition: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (attributeDefinition === null || attributeDefinition === undefined) { + throw new Error('Required parameter attributeDefinition was null or undefined when calling convertAttributeToUnique.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (attributeDefinition !== undefined && attributeDefinition !== null) { + queryParameters = queryParameters.set('attributeDefinition', attributeDefinition); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/convertAttributeToUnique`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Creates AttributeDefinition. + * @param inputCreateAttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createAttributeDefinition(inputCreateAttributeDefinition: InputCreateAttributeDefinition, observe?: 'body', reportProgress?: boolean): Observable; + public createAttributeDefinition(inputCreateAttributeDefinition: InputCreateAttributeDefinition, observe?: 'response', reportProgress?: boolean): Observable>; + public createAttributeDefinition(inputCreateAttributeDefinition: InputCreateAttributeDefinition, observe?: 'events', reportProgress?: boolean): Observable>; + public createAttributeDefinition(inputCreateAttributeDefinition: InputCreateAttributeDefinition, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputCreateAttributeDefinition === null || inputCreateAttributeDefinition === undefined) { + throw new Error('Required parameter inputCreateAttributeDefinition was null or undefined when calling createAttributeDefinition.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/createAttribute`, + inputCreateAttributeDefinition, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Deletes attribute definition from Perun including all values set for any entity. + * @param attribute id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteAttributeDefinition(attribute: number, observe?: 'body', reportProgress?: boolean): Observable; + public deleteAttributeDefinition(attribute: number, observe?: 'response', reportProgress?: boolean): Observable>; + public deleteAttributeDefinition(attribute: number, observe?: 'events', reportProgress?: boolean): Observable>; + public deleteAttributeDefinition(attribute: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (attribute === null || attribute === undefined) { + throw new Error('Required parameter attribute was null or undefined when calling deleteAttributeDefinition.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (attribute !== undefined && attribute !== null) { + queryParameters = queryParameters.set('attribute', attribute); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/deleteAttribute`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Deletes attribute definitions from Perun including all values set for any entity. + * @param attributes list of attribute ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteAttributeDefinitions(attributes: Array, observe?: 'body', reportProgress?: boolean): Observable; + public deleteAttributeDefinitions(attributes: Array, observe?: 'response', reportProgress?: boolean): Observable>; + public deleteAttributeDefinitions(attributes: Array, observe?: 'events', reportProgress?: boolean): Observable>; + public deleteAttributeDefinitions(attributes: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (attributes === null || attributes === undefined) { + throw new Error('Required parameter attributes was null or undefined when calling deleteAttributeDefinitions.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/deleteAttributes`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns all AttributeDefinitions. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllAttributeDefinitions(observe?: 'body', reportProgress?: boolean): Observable>; + public getAllAttributeDefinitions(observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllAttributeDefinitions(observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllAttributeDefinitions(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributesDefinition`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns an Attribute by its name or id. + * This method cannot be fully described correctly in OpenID, because it cannot describe allowed combinations of parameters. One of attributeName, attributeId is required. The other parameters specify ids that can be combined in the following ways: (facility), (user), (user,facility), (vo), (member), (group), (resource), (member,group), (member,resource), (group,resource),(userExtSource), (host), (key) Use the specialized methods getFacilityAttributeByName(), getMemberResourceAttributeById() etc. + * @param attributeName full name of attribute (namespace + \':\' + friendlyName) + * @param attributeId id of attribute + * @param facility id of Facility + * @param user id of User + * @param vo id of Vo + * @param resource id of Resource + * @param member id of Member + * @param group id of Group + * @param host id of Host + * @param userExtSource id of UserExtSource + * @param key key for entityless attribute + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAttribute(attributeName?: string, attributeId?: number, facility?: number, user?: number, vo?: number, resource?: number, member?: number, group?: number, host?: number, userExtSource?: number, key?: string, observe?: 'body', reportProgress?: boolean): Observable; + public getAttribute(attributeName?: string, attributeId?: number, facility?: number, user?: number, vo?: number, resource?: number, member?: number, group?: number, host?: number, userExtSource?: number, key?: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getAttribute(attributeName?: string, attributeId?: number, facility?: number, user?: number, vo?: number, resource?: number, member?: number, group?: number, host?: number, userExtSource?: number, key?: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getAttribute(attributeName?: string, attributeId?: number, facility?: number, user?: number, vo?: number, resource?: number, member?: number, group?: number, host?: number, userExtSource?: number, key?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (attributeName !== undefined && attributeName !== null) { + queryParameters = queryParameters.set('attributeName', attributeName); + } + if (attributeId !== undefined && attributeId !== null) { + queryParameters = queryParameters.set('attributeId', attributeId); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (host !== undefined && host !== null) { + queryParameters = queryParameters.set('host', host); + } + if (userExtSource !== undefined && userExtSource !== null) { + queryParameters = queryParameters.set('userExtSource', userExtSource); + } + if (key !== undefined && key !== null) { + queryParameters = queryParameters.set('key', key); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/any`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns an AttributeDefinition by its id. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAttributeDefinitionById(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public getAttributeDefinitionById(id: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getAttributeDefinitionById(id: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getAttributeDefinitionById(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getAttributeDefinitionById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttributeDefinitionById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns an AttributeDefinition by its name. + * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAttributeDefinitionByName(attributeName: string, observe?: 'body', reportProgress?: boolean): Observable; + public getAttributeDefinitionByName(attributeName: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getAttributeDefinitionByName(attributeName: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getAttributeDefinitionByName(attributeName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (attributeName === null || attributeName === undefined) { + throw new Error('Required parameter attributeName was null or undefined when calling getAttributeDefinitionByName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (attributeName !== undefined && attributeName !== null) { + queryParameters = queryParameters.set('attributeName', attributeName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttributeDefinition`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns all AttributeDefinitions in a namespace. + * @param namespace name of namespace to obtain attribute definitions from + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAttributeDefinitionsByNamespace(namespace: string, observe?: 'body', reportProgress?: boolean): Observable>; + public getAttributeDefinitionsByNamespace(namespace: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAttributeDefinitionsByNamespace(namespace: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAttributeDefinitionsByNamespace(namespace: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling getAttributeDefinitionsByNamespace.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (namespace !== undefined && namespace !== null) { + queryParameters = queryParameters.set('namespace', namespace); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributesDefinitionByNamespace`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Generates text file describing dependencies between attribute modules. The format of text file can be specified by parameter. Modules that has no dependency relations are omitted. + * @param format Currently supported formats are DOT and TGF. + * @param attrName Attribute name which dependencies will be found. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAttributeModulesDependenciesForAttributeGraphText(format: 'DOT' | 'TGF', attrName: string, observe?: 'body', reportProgress?: boolean): Observable; + public getAttributeModulesDependenciesForAttributeGraphText(format: 'DOT' | 'TGF', attrName: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getAttributeModulesDependenciesForAttributeGraphText(format: 'DOT' | 'TGF', attrName: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getAttributeModulesDependenciesForAttributeGraphText(format: 'DOT' | 'TGF', attrName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (format === null || format === undefined) { + throw new Error('Required parameter format was null or undefined when calling getAttributeModulesDependenciesForAttributeGraphText.'); + } + if (attrName === null || attrName === undefined) { + throw new Error('Required parameter attrName was null or undefined when calling getAttributeModulesDependenciesForAttributeGraphText.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (format !== undefined && format !== null) { + queryParameters = queryParameters.set('format', format); + } + if (attrName !== undefined && attrName !== null) { + queryParameters = queryParameters.set('attrName', attrName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttributeModulesDependenciesGraphText/for-attribute`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Generates text file describing dependencies between attribute modules. The format of text file can be specified by parameter. Modules that has no dependency relations are omitted. + * @param format Currently supported formats are DOT and TGF. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAttributeModulesDependenciesGraphText(format: 'DOT' | 'TGF', observe?: 'body', reportProgress?: boolean): Observable; + public getAttributeModulesDependenciesGraphText(format: 'DOT' | 'TGF', observe?: 'response', reportProgress?: boolean): Observable>; + public getAttributeModulesDependenciesGraphText(format: 'DOT' | 'TGF', observe?: 'events', reportProgress?: boolean): Observable>; + public getAttributeModulesDependenciesGraphText(format: 'DOT' | 'TGF', observe: any = 'body', reportProgress: boolean = false ): Observable { + if (format === null || format === undefined) { + throw new Error('Required parameter format was null or undefined when calling getAttributeModulesDependenciesGraphText.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (format !== undefined && format !== null) { + queryParameters = queryParameters.set('format', format); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttributeModulesDependenciesGraphText`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Gets attribute policy collections for an attribute definition with given id. + * @param attributeId id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAttributePolicyCollections(attributeId: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAttributePolicyCollections(attributeId: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAttributePolicyCollections(attributeId: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAttributePolicyCollections(attributeId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (attributeId === null || attributeId === undefined) { + throw new Error('Required parameter attributeId was null or undefined when calling getAttributePolicyCollections.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (attributeId !== undefined && attributeId !== null) { + queryParameters = queryParameters.set('attributeId', attributeId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributePolicyCollections`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Gets AttributeRights for specified Attribute. Rights specify which Role can do particular actions (read / write) with Attribute. Method always return rights for following roles: VOADMIN, GROUPADMIN, FACILITYADMIN, SELF. + * @param attributeId id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAttributeRights(attributeId: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAttributeRights(attributeId: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAttributeRights(attributeId: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAttributeRights(attributeId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (attributeId === null || attributeId === undefined) { + throw new Error('Required parameter attributeId was null or undefined when calling getAttributeRights.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (attributeId !== undefined && attributeId !== null) { + queryParameters = queryParameters.set('attributeId', attributeId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributeRights`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns all AttributeDefinitions for every entity and possible combination of entities with rights. Only attribute definition of attributes user can read (or write) you will get. Combination of entities is based on provided parameters, which are optional (at least one must be present). + * @param member id of Member + * @param user id of User + * @param vo id of Vo + * @param group id of Group + * @param resource id of Resource + * @param facility id of Facility + * @param host id of Host + * @param userExtSource id of UserExtSource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAttributesDefinitionWithRights(member?: number, user?: number, vo?: number, group?: number, resource?: number, facility?: number, host?: number, userExtSource?: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAttributesDefinitionWithRights(member?: number, user?: number, vo?: number, group?: number, resource?: number, facility?: number, host?: number, userExtSource?: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAttributesDefinitionWithRights(member?: number, user?: number, vo?: number, group?: number, resource?: number, facility?: number, host?: number, userExtSource?: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAttributesDefinitionWithRights(member?: number, user?: number, vo?: number, group?: number, resource?: number, facility?: number, host?: number, userExtSource?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (host !== undefined && host !== null) { + queryParameters = queryParameters.set('host', host); + } + if (userExtSource !== undefined && userExtSource !== null) { + queryParameters = queryParameters.set('userExtSource', userExtSource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/urlinjsonout/attributesManager/getAttributesDefinitionWithRights`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns an entityless Attribute by its name. + * This is an overloaded method getAttribute, specialized for entityless key and attribute name. + * @param key key for entityless attribute + * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getEntitylessAttributeByName(key: string, attributeName: string, observe?: 'body', reportProgress?: boolean): Observable; + public getEntitylessAttributeByName(key: string, attributeName: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getEntitylessAttributeByName(key: string, attributeName: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getEntitylessAttributeByName(key: string, attributeName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (key === null || key === undefined) { + throw new Error('Required parameter key was null or undefined when calling getEntitylessAttributeByName.'); + } + if (attributeName === null || attributeName === undefined) { + throw new Error('Required parameter attributeName was null or undefined when calling getEntitylessAttributeByName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (key !== undefined && key !== null) { + queryParameters = queryParameters.set('key', key); + } + if (attributeName !== undefined && attributeName !== null) { + queryParameters = queryParameters.set('attributeName', attributeName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/name-entityless`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all entityless attributes with subject equaled String key. + * @param key key for entityless attributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getEntitylessAttributesByKey(key: string, observe?: 'body', reportProgress?: boolean): Observable>; + public getEntitylessAttributesByKey(key: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public getEntitylessAttributesByKey(key: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public getEntitylessAttributesByKey(key: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (key === null || key === undefined) { + throw new Error('Required parameter key was null or undefined when calling getEntitylessAttributesByKey.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (key !== undefined && key !== null) { + queryParameters = queryParameters.set('key', key); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/key`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns all entityless attributes with attrName. + * @param attrName full name of attribute definition (namespace + \':\' + friendlyName) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getEntitylessAttributesByName(attrName: string, observe?: 'body', reportProgress?: boolean): Observable>; + public getEntitylessAttributesByName(attrName: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public getEntitylessAttributesByName(attrName: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public getEntitylessAttributesByName(attrName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (attrName === null || attrName === undefined) { + throw new Error('Required parameter attrName was null or undefined when calling getEntitylessAttributesByName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (attrName !== undefined && attrName !== null) { + queryParameters = queryParameters.set('attrName', attrName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getEntitylessAttributes`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get entityless attributes mapped by their keys. + * @param attrName full name of attribute definition (namespace + \':\' + friendlyName) + * @param keys key for entityless attribute + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getEntitylessAttributesWithKeys(attrName: string, keys?: Array, observe?: 'body', reportProgress?: boolean): Observable<{ [key: string]: Attribute; }>; + public getEntitylessAttributesWithKeys(attrName: string, keys?: Array, observe?: 'response', reportProgress?: boolean): Observable>; + public getEntitylessAttributesWithKeys(attrName: string, keys?: Array, observe?: 'events', reportProgress?: boolean): Observable>; + public getEntitylessAttributesWithKeys(attrName: string, keys?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (attrName === null || attrName === undefined) { + throw new Error('Required parameter attrName was null or undefined when calling getEntitylessAttributesWithKeys.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (attrName !== undefined && attrName !== null) { + queryParameters = queryParameters.set('attrName', attrName); + } + if (keys) { + keys.forEach((element) => { + queryParameters = queryParameters.append('keys[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get<{ [key: string]: Attribute; }>(`${this.configuration.basePath}/json/attributesManager/getEntitylessAttributesWithKeys`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns list of Keys which fits the attributeDefinition. + * @param attributeDefinition id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getEntitylessKeys(attributeDefinition: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getEntitylessKeys(attributeDefinition: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getEntitylessKeys(attributeDefinition: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getEntitylessKeys(attributeDefinition: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (attributeDefinition === null || attributeDefinition === undefined) { + throw new Error('Required parameter attributeDefinition was null or undefined when calling getEntitylessKeys.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (attributeDefinition !== undefined && attributeDefinition !== null) { + queryParameters = queryParameters.set('attributeDefinition', attributeDefinition); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getEntitylessKeys`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns a facility Attribute by its id. + * This is an overloaded method getAttribute, specialized for facility and attribute id. + * @param facility id of Facility + * @param attributeId id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityAttributeById(facility: number, attributeId: number, observe?: 'body', reportProgress?: boolean): Observable; + public getFacilityAttributeById(facility: number, attributeId: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getFacilityAttributeById(facility: number, attributeId: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getFacilityAttributeById(facility: number, attributeId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getFacilityAttributeById.'); + } + if (attributeId === null || attributeId === undefined) { + throw new Error('Required parameter attributeId was null or undefined when calling getFacilityAttributeById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (attributeId !== undefined && attributeId !== null) { + queryParameters = queryParameters.set('attributeId', attributeId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/id-facility`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns a facility Attribute by its name. + * This is an overloaded method getAttribute, specialized for facility and attribute name. + * @param facility id of Facility + * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityAttributeByName(facility: number, attributeName: string, observe?: 'body', reportProgress?: boolean): Observable; + public getFacilityAttributeByName(facility: number, attributeName: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getFacilityAttributeByName(facility: number, attributeName: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getFacilityAttributeByName(facility: number, attributeName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getFacilityAttributeByName.'); + } + if (attributeName === null || attributeName === undefined) { + throw new Error('Required parameter attributeName was null or undefined when calling getFacilityAttributeByName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (attributeName !== undefined && attributeName !== null) { + queryParameters = queryParameters.set('attributeName', attributeName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/name-facility`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns all non-empty Facility attributes for selected Facility. + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityAttributes(facility: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getFacilityAttributes(facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getFacilityAttributes(facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getFacilityAttributes(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getFacilityAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/f`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns all specified Facility attributes for selected Facility. + * @param facility id of Facility + * @param attrNames list of attribute names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityAttributesByNames(facility: number, attrNames: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getFacilityAttributesByNames(facility: number, attrNames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getFacilityAttributesByNames(facility: number, attrNames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getFacilityAttributesByNames(facility: number, attrNames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getFacilityAttributesByNames.'); + } + if (attrNames === null || attrNames === undefined) { + throw new Error('Required parameter attrNames was null or undefined when calling getFacilityAttributesByNames.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/f-names`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all non-empty member, user, member-resource and user-facility attributes. + * @param facility id of Facility + * @param resource id of Resource + * @param user id of User + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityResourceUserMemberAttributes(facility: number, resource: number, user: number, member: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getFacilityResourceUserMemberAttributes(facility: number, resource: number, user: number, member: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getFacilityResourceUserMemberAttributes(facility: number, resource: number, user: number, member: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getFacilityResourceUserMemberAttributes(facility: number, resource: number, user: number, member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getFacilityResourceUserMemberAttributes.'); + } + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getFacilityResourceUserMemberAttributes.'); + } + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getFacilityResourceUserMemberAttributes.'); + } + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getFacilityResourceUserMemberAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/f-r-u-m`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all non-empty attributes associated with the user on the facility. + * @param facility id of Facility + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityUserAttributes(facility: number, user: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getFacilityUserAttributes(facility: number, user: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getFacilityUserAttributes(facility: number, user: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getFacilityUserAttributes(facility: number, user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getFacilityUserAttributes.'); + } + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getFacilityUserAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/f-u`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns a group Attribute by its id. + * This is an overloaded method getAttribute, specialized for group and attribute id. + * @param group id of Group + * @param attributeId id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupAttributeById(group: number, attributeId: number, observe?: 'body', reportProgress?: boolean): Observable; + public getGroupAttributeById(group: number, attributeId: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getGroupAttributeById(group: number, attributeId: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getGroupAttributeById(group: number, attributeId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getGroupAttributeById.'); + } + if (attributeId === null || attributeId === undefined) { + throw new Error('Required parameter attributeId was null or undefined when calling getGroupAttributeById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (attributeId !== undefined && attributeId !== null) { + queryParameters = queryParameters.set('attributeId', attributeId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/id-group`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns a group Attribute by its name. + * This is an overloaded method getAttribute, specialized for group and attribute name. + * @param group id of Group + * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupAttributeByName(group: number, attributeName: string, observe?: 'body', reportProgress?: boolean): Observable; + public getGroupAttributeByName(group: number, attributeName: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getGroupAttributeByName(group: number, attributeName: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getGroupAttributeByName(group: number, attributeName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getGroupAttributeByName.'); + } + if (attributeName === null || attributeName === undefined) { + throw new Error('Required parameter attributeName was null or undefined when calling getGroupAttributeByName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (attributeName !== undefined && attributeName !== null) { + queryParameters = queryParameters.set('attributeName', attributeName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/name-group`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all non-empty attributes associated with the group. + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupAttributes(group: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getGroupAttributes(group: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getGroupAttributes(group: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getGroupAttributes(group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getGroupAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/g`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all attributes associated with the group which have name in list attrNames (empty too). Virtual attribute too. + * @param group id of Group + * @param attrNames list of attribute names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupAttributesByNames(group: number, attrNames: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getGroupAttributesByNames(group: number, attrNames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getGroupAttributesByNames(group: number, attrNames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getGroupAttributesByNames(group: number, attrNames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getGroupAttributesByNames.'); + } + if (attrNames === null || attrNames === undefined) { + throw new Error('Required parameter attrNames was null or undefined when calling getGroupAttributesByNames.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/g-names`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns a group_resource Attribute by its id. + * This is an overloaded method getAttribute, specialized for group, resource and attribute id. + * @param group id of Group + * @param resource id of Resource + * @param attributeId id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupResourceAttributeById(group: number, resource: number, attributeId: number, observe?: 'body', reportProgress?: boolean): Observable; + public getGroupResourceAttributeById(group: number, resource: number, attributeId: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getGroupResourceAttributeById(group: number, resource: number, attributeId: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getGroupResourceAttributeById(group: number, resource: number, attributeId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getGroupResourceAttributeById.'); + } + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getGroupResourceAttributeById.'); + } + if (attributeId === null || attributeId === undefined) { + throw new Error('Required parameter attributeId was null or undefined when calling getGroupResourceAttributeById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (attributeId !== undefined && attributeId !== null) { + queryParameters = queryParameters.set('attributeId', attributeId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/id-group-resource`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns a group_resource Attribute by its name. + * This is an overloaded method getAttribute, specialized for group, resource and attribute name. + * @param group id of Group + * @param resource id of Resource + * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupResourceAttributeByName(group: number, resource: number, attributeName: string, observe?: 'body', reportProgress?: boolean): Observable; + public getGroupResourceAttributeByName(group: number, resource: number, attributeName: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getGroupResourceAttributeByName(group: number, resource: number, attributeName: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getGroupResourceAttributeByName(group: number, resource: number, attributeName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getGroupResourceAttributeByName.'); + } + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getGroupResourceAttributeByName.'); + } + if (attributeName === null || attributeName === undefined) { + throw new Error('Required parameter attributeName was null or undefined when calling getGroupResourceAttributeByName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (attributeName !== undefined && attributeName !== null) { + queryParameters = queryParameters.set('attributeName', attributeName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/name-group-resource`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns all non-empty Group-Resource attributes for selected Group and Resource. + * @param group id of Group + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupResourceAttributes(group: number, resource: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getGroupResourceAttributes(group: number, resource: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getGroupResourceAttributes(group: number, resource: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getGroupResourceAttributes(group: number, resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getGroupResourceAttributes.'); + } + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getGroupResourceAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/group-resource`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns a host Attribute by its id. + * This is an overloaded method getAttribute, specialized for host and attribute id. + * @param host id of Host + * @param attributeId id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getHostAttributeById(host: number, attributeId: number, observe?: 'body', reportProgress?: boolean): Observable; + public getHostAttributeById(host: number, attributeId: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getHostAttributeById(host: number, attributeId: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getHostAttributeById(host: number, attributeId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (host === null || host === undefined) { + throw new Error('Required parameter host was null or undefined when calling getHostAttributeById.'); + } + if (attributeId === null || attributeId === undefined) { + throw new Error('Required parameter attributeId was null or undefined when calling getHostAttributeById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (host !== undefined && host !== null) { + queryParameters = queryParameters.set('host', host); + } + if (attributeId !== undefined && attributeId !== null) { + queryParameters = queryParameters.set('attributeId', attributeId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/id-host`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns a host Attribute by its name. + * This is an overloaded method getAttribute, specialized for host and attribute name. + * @param host id of Host + * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getHostAttributeByName(host: number, attributeName: string, observe?: 'body', reportProgress?: boolean): Observable; + public getHostAttributeByName(host: number, attributeName: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getHostAttributeByName(host: number, attributeName: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getHostAttributeByName(host: number, attributeName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (host === null || host === undefined) { + throw new Error('Required parameter host was null or undefined when calling getHostAttributeByName.'); + } + if (attributeName === null || attributeName === undefined) { + throw new Error('Required parameter attributeName was null or undefined when calling getHostAttributeByName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (host !== undefined && host !== null) { + queryParameters = queryParameters.set('host', host); + } + if (attributeName !== undefined && attributeName !== null) { + queryParameters = queryParameters.set('attributeName', attributeName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/name-host`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all non-empty attributes associated with the host. + * @param host id of Host + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getHostAttributes(host: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getHostAttributes(host: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getHostAttributes(host: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getHostAttributes(host: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (host === null || host === undefined) { + throw new Error('Required parameter host was null or undefined when calling getHostAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (host !== undefined && host !== null) { + queryParameters = queryParameters.set('host', host); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/h`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all non-empty attributes associated with the host which have name in list attrNames (empty too). Empty list attrNames will return no attributes. + * @param host id of Host + * @param attrNames list of attribute names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getHostAttributesByNames(host: number, attrNames: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getHostAttributesByNames(host: number, attrNames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getHostAttributesByNames(host: number, attrNames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getHostAttributesByNames(host: number, attrNames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (host === null || host === undefined) { + throw new Error('Required parameter host was null or undefined when calling getHostAttributesByNames.'); + } + if (attrNames === null || attrNames === undefined) { + throw new Error('Required parameter attrNames was null or undefined when calling getHostAttributesByNames.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (host !== undefined && host !== null) { + queryParameters = queryParameters.set('host', host); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/h-names`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all users logins as Attributes. Meaning it returns all non-empty User attributes with URN starting with: \"urn:perun:user:attribute-def:def:login-namespace:\". + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getLogins(user: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getLogins(user: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getLogins(user: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getLogins(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getLogins.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getLogins`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all non-empty attributes associated with the member and if workWithUserAttributes is true, get all non-empty attributes associated with user, who is this member. + * @param member id of Member + * @param workWithUserAttributes flag to work with user attributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberAndUserAttributes(member: number, workWithUserAttributes: boolean, observe?: 'body', reportProgress?: boolean): Observable>; + public getMemberAndUserAttributes(member: number, workWithUserAttributes: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; + public getMemberAndUserAttributes(member: number, workWithUserAttributes: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; + public getMemberAndUserAttributes(member: number, workWithUserAttributes: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getMemberAndUserAttributes.'); + } + if (workWithUserAttributes === null || workWithUserAttributes === undefined) { + throw new Error('Required parameter workWithUserAttributes was null or undefined when calling getMemberAndUserAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { + queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/m-wu`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all attributes associated with the member which have name in list attrNames (empty too). Virtual attributes too. If workWithUserAttribute is true, return also all user attributes in list of attrNames (with virtual attributes too). + * @param member id of Member + * @param attrNames list of attribute names List<String> + * @param workWithUserAttributes flag to work with user attributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberAndUserAttributesByNames(member: number, attrNames: Array, workWithUserAttributes: boolean, observe?: 'body', reportProgress?: boolean): Observable>; + public getMemberAndUserAttributesByNames(member: number, attrNames: Array, workWithUserAttributes: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; + public getMemberAndUserAttributesByNames(member: number, attrNames: Array, workWithUserAttributes: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; + public getMemberAndUserAttributesByNames(member: number, attrNames: Array, workWithUserAttributes: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getMemberAndUserAttributesByNames.'); + } + if (attrNames === null || attrNames === undefined) { + throw new Error('Required parameter attrNames was null or undefined when calling getMemberAndUserAttributesByNames.'); + } + if (workWithUserAttributes === null || workWithUserAttributes === undefined) { + throw new Error('Required parameter workWithUserAttributes was null or undefined when calling getMemberAndUserAttributesByNames.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { + queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/m-names-wu`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns a member Attribute by its id. + * This is an overloaded method getAttribute, specialized for member and attribute id. + * @param member id of Member + * @param attributeId id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberAttributeById(member: number, attributeId: number, observe?: 'body', reportProgress?: boolean): Observable; + public getMemberAttributeById(member: number, attributeId: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getMemberAttributeById(member: number, attributeId: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getMemberAttributeById(member: number, attributeId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getMemberAttributeById.'); + } + if (attributeId === null || attributeId === undefined) { + throw new Error('Required parameter attributeId was null or undefined when calling getMemberAttributeById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (attributeId !== undefined && attributeId !== null) { + queryParameters = queryParameters.set('attributeId', attributeId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/id-member`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns a member Attribute by its name. + * This is an overloaded method getAttribute, specialized for member and attribute name. + * @param member id of Member + * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberAttributeByName(member: number, attributeName: string, observe?: 'body', reportProgress?: boolean): Observable; + public getMemberAttributeByName(member: number, attributeName: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getMemberAttributeByName(member: number, attributeName: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getMemberAttributeByName(member: number, attributeName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getMemberAttributeByName.'); + } + if (attributeName === null || attributeName === undefined) { + throw new Error('Required parameter attributeName was null or undefined when calling getMemberAttributeByName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (attributeName !== undefined && attributeName !== null) { + queryParameters = queryParameters.set('attributeName', attributeName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/name-member`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all non-empty attributes associated with the member. + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberAttributes(member: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getMemberAttributes(member: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getMemberAttributes(member: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getMemberAttributes(member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getMemberAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/m`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all attributes associated with the member which have name in list attrNames (empty too). Virtual attribute too. + * @param member id of Member + * @param attrNames list of attribute names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberAttributesByNames(member: number, attrNames: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getMemberAttributesByNames(member: number, attrNames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getMemberAttributesByNames(member: number, attrNames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getMemberAttributesByNames(member: number, attrNames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getMemberAttributesByNames.'); + } + if (attrNames === null || attrNames === undefined) { + throw new Error('Required parameter attrNames was null or undefined when calling getMemberAttributesByNames.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/m-names`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all attributes associated with the member in the group which have name in list attrNames (empty too). If workWithUserAttribute is true, return also all user attributes in list of attrNames (with virtual attributes too). + * @param member id of Member + * @param group id of Group + * @param attrNames list of attribute names List<String> + * @param workWithUserAttributes flag to work with user attributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberGroupAndUserAttributesByNames(member: number, group: number, attrNames: Array, workWithUserAttributes: boolean, observe?: 'body', reportProgress?: boolean): Observable>; + public getMemberGroupAndUserAttributesByNames(member: number, group: number, attrNames: Array, workWithUserAttributes: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; + public getMemberGroupAndUserAttributesByNames(member: number, group: number, attrNames: Array, workWithUserAttributes: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; + public getMemberGroupAndUserAttributesByNames(member: number, group: number, attrNames: Array, workWithUserAttributes: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getMemberGroupAndUserAttributesByNames.'); + } + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getMemberGroupAndUserAttributesByNames.'); + } + if (attrNames === null || attrNames === undefined) { + throw new Error('Required parameter attrNames was null or undefined when calling getMemberGroupAndUserAttributesByNames.'); + } + if (workWithUserAttributes === null || workWithUserAttributes === undefined) { + throw new Error('Required parameter workWithUserAttributes was null or undefined when calling getMemberGroupAndUserAttributesByNames.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { + queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/m-g-names-wu`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns a member_group Attribute by its id. + * This is an overloaded method getAttribute, specialized for member, group and attribute id. + * @param member id of Member + * @param group id of Group + * @param attributeId id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberGroupAttributeById(member: number, group: number, attributeId: number, observe?: 'body', reportProgress?: boolean): Observable; + public getMemberGroupAttributeById(member: number, group: number, attributeId: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getMemberGroupAttributeById(member: number, group: number, attributeId: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getMemberGroupAttributeById(member: number, group: number, attributeId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getMemberGroupAttributeById.'); + } + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getMemberGroupAttributeById.'); + } + if (attributeId === null || attributeId === undefined) { + throw new Error('Required parameter attributeId was null or undefined when calling getMemberGroupAttributeById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (attributeId !== undefined && attributeId !== null) { + queryParameters = queryParameters.set('attributeId', attributeId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/id-member-group`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns a member_group Attribute by its name. + * This is an overloaded method getAttribute, specialized for member, group and attribute name. + * @param member id of Member + * @param group id of Group + * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberGroupAttributeByName(member: number, group: number, attributeName: string, observe?: 'body', reportProgress?: boolean): Observable; + public getMemberGroupAttributeByName(member: number, group: number, attributeName: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getMemberGroupAttributeByName(member: number, group: number, attributeName: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getMemberGroupAttributeByName(member: number, group: number, attributeName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getMemberGroupAttributeByName.'); + } + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getMemberGroupAttributeByName.'); + } + if (attributeName === null || attributeName === undefined) { + throw new Error('Required parameter attributeName was null or undefined when calling getMemberGroupAttributeByName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (attributeName !== undefined && attributeName !== null) { + queryParameters = queryParameters.set('attributeName', attributeName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/name-member-group`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all non-empty attributes associated with the member in the group. + * @param member id of Member + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberGroupAttributes(member: number, group: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getMemberGroupAttributes(member: number, group: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getMemberGroupAttributes(member: number, group: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getMemberGroupAttributes(member: number, group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getMemberGroupAttributes.'); + } + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getMemberGroupAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/m-g`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all attributes (empty and virtual too)associated with the member in the group which have name in list attrNames. + * @param member id of Member + * @param group id of Group + * @param attrNames list of attribute names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberGroupAttributesByNames(member: number, group: number, attrNames: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getMemberGroupAttributesByNames(member: number, group: number, attrNames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getMemberGroupAttributesByNames(member: number, group: number, attrNames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getMemberGroupAttributesByNames(member: number, group: number, attrNames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getMemberGroupAttributesByNames.'); + } + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getMemberGroupAttributesByNames.'); + } + if (attrNames === null || attrNames === undefined) { + throw new Error('Required parameter attrNames was null or undefined when calling getMemberGroupAttributesByNames.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/m-g-names`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Gets all non-empty attributes associated with the member on the resource and if workWithUserAttributes is true, gets also all non-empty user, user-facility and member attributes. + * @param member id of Member + * @param resource id of Resource + * @param workWithUserAttributes flag to work with user attributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberResourceAndUserFacilityAttributes(member: number, resource: number, workWithUserAttributes: boolean, observe?: 'body', reportProgress?: boolean): Observable>; + public getMemberResourceAndUserFacilityAttributes(member: number, resource: number, workWithUserAttributes: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; + public getMemberResourceAndUserFacilityAttributes(member: number, resource: number, workWithUserAttributes: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; + public getMemberResourceAndUserFacilityAttributes(member: number, resource: number, workWithUserAttributes: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getMemberResourceAndUserFacilityAttributes.'); + } + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getMemberResourceAndUserFacilityAttributes.'); + } + if (workWithUserAttributes === null || workWithUserAttributes === undefined) { + throw new Error('Required parameter workWithUserAttributes was null or undefined when calling getMemberResourceAndUserFacilityAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { + queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/m-r-wu`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Gets selected non-empty attributes associated with the member and the resource. It returns member and member-resource attributes and also user and user-facility attributes if workWithUserAttributes is true. Attributes are selected by list of attr_names. Empty list means all attributes. + * @param member id of Member + * @param resource id of Resource + * @param attrNames list of attribute names List<String> + * @param workWithUserAttributes flag to work with user attributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberResourceAndUserFacilityAttributesByNames(member: number, resource: number, attrNames: Array, workWithUserAttributes: boolean, observe?: 'body', reportProgress?: boolean): Observable>; + public getMemberResourceAndUserFacilityAttributesByNames(member: number, resource: number, attrNames: Array, workWithUserAttributes: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; + public getMemberResourceAndUserFacilityAttributesByNames(member: number, resource: number, attrNames: Array, workWithUserAttributes: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; + public getMemberResourceAndUserFacilityAttributesByNames(member: number, resource: number, attrNames: Array, workWithUserAttributes: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getMemberResourceAndUserFacilityAttributesByNames.'); + } + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getMemberResourceAndUserFacilityAttributesByNames.'); + } + if (attrNames === null || attrNames === undefined) { + throw new Error('Required parameter attrNames was null or undefined when calling getMemberResourceAndUserFacilityAttributesByNames.'); + } + if (workWithUserAttributes === null || workWithUserAttributes === undefined) { + throw new Error('Required parameter workWithUserAttributes was null or undefined when calling getMemberResourceAndUserFacilityAttributesByNames.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { + queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/m-r-names-wu`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns a member_resource Attribute by its id. + * This is an overloaded method getAttribute, specialized for member, resource and attribute id. + * @param member id of Member + * @param resource id of Resource + * @param attributeId id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberResourceAttributeById(member: number, resource: number, attributeId: number, observe?: 'body', reportProgress?: boolean): Observable; + public getMemberResourceAttributeById(member: number, resource: number, attributeId: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getMemberResourceAttributeById(member: number, resource: number, attributeId: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getMemberResourceAttributeById(member: number, resource: number, attributeId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getMemberResourceAttributeById.'); + } + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getMemberResourceAttributeById.'); + } + if (attributeId === null || attributeId === undefined) { + throw new Error('Required parameter attributeId was null or undefined when calling getMemberResourceAttributeById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (attributeId !== undefined && attributeId !== null) { + queryParameters = queryParameters.set('attributeId', attributeId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/id-member-resource`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns a member_resource Attribute by its name. + * This is an overloaded method getAttribute, specialized for member, resource and attribute name. + * @param member id of Member + * @param resource id of Resource + * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberResourceAttributeByName(member: number, resource: number, attributeName: string, observe?: 'body', reportProgress?: boolean): Observable; + public getMemberResourceAttributeByName(member: number, resource: number, attributeName: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getMemberResourceAttributeByName(member: number, resource: number, attributeName: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getMemberResourceAttributeByName(member: number, resource: number, attributeName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getMemberResourceAttributeByName.'); + } + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getMemberResourceAttributeByName.'); + } + if (attributeName === null || attributeName === undefined) { + throw new Error('Required parameter attributeName was null or undefined when calling getMemberResourceAttributeByName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (attributeName !== undefined && attributeName !== null) { + queryParameters = queryParameters.set('attributeName', attributeName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/name-member-resource`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all non-empty attributes associated with the member on the resource. + * @param member id of Member + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberResourceAttributes(member: number, resource: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getMemberResourceAttributes(member: number, resource: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getMemberResourceAttributes(member: number, resource: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getMemberResourceAttributes(member: number, resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getMemberResourceAttributes.'); + } + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getMemberResourceAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/m-r`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns required attributes definition for a Service. + * @param service id of Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRequiredAttributesDefinition(service: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getRequiredAttributesDefinition(service: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getRequiredAttributesDefinition(service: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getRequiredAttributesDefinition(service: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling getRequiredAttributesDefinition.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getRequiredAttributesDefinition`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns required facility attributes. + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRequiredAttributesFacility(facility: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getRequiredAttributesFacility(facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getRequiredAttributesFacility(facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getRequiredAttributesFacility(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getRequiredAttributesFacility.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/f`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns facility attributes required by specified service. + * @param service id of Service + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRequiredAttributesFacilityService(service: number, facility: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getRequiredAttributesFacilityService(service: number, facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getRequiredAttributesFacilityService(service: number, facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getRequiredAttributesFacilityService(service: number, facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling getRequiredAttributesFacilityService.'); + } + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getRequiredAttributesFacilityService.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/s-f`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns facility attributes required by specified list of services. + * @param services list of Service ids List<Integer> + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRequiredAttributesFacilityServices(services: Array, facility: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getRequiredAttributesFacilityServices(services: Array, facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getRequiredAttributesFacilityServices(services: Array, facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getRequiredAttributesFacilityServices(services: Array, facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (services === null || services === undefined) { + throw new Error('Required parameter services was null or undefined when calling getRequiredAttributesFacilityServices.'); + } + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getRequiredAttributesFacilityServices.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (services) { + services.forEach((element) => { + queryParameters = queryParameters.append('services[]', element); + }) + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/ss-f`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns group-resource attributes required by specified service. + * @param service id of Service + * @param resource id of Resource + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRequiredAttributesGroupResourceService(service: number, resource: number, group: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getRequiredAttributesGroupResourceService(service: number, resource: number, group: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getRequiredAttributesGroupResourceService(service: number, resource: number, group: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getRequiredAttributesGroupResourceService(service: number, resource: number, group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling getRequiredAttributesGroupResourceService.'); + } + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getRequiredAttributesGroupResourceService.'); + } + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getRequiredAttributesGroupResourceService.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/s-r-g`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns required host attributes. + * @param service id of Service + * @param host id of Host + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRequiredAttributesHostService(service: number, host: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getRequiredAttributesHostService(service: number, host: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getRequiredAttributesHostService(service: number, host: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getRequiredAttributesHostService(service: number, host: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling getRequiredAttributesHostService.'); + } + if (host === null || host === undefined) { + throw new Error('Required parameter host was null or undefined when calling getRequiredAttributesHostService.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (host !== undefined && host !== null) { + queryParameters = queryParameters.set('host', host); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/s-h`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns required member attributes. + * @param member id of Member + * @param workWithUserAttributes flag to work with user attributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRequiredAttributesMember(member: number, workWithUserAttributes?: boolean, observe?: 'body', reportProgress?: boolean): Observable>; + public getRequiredAttributesMember(member: number, workWithUserAttributes?: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; + public getRequiredAttributesMember(member: number, workWithUserAttributes?: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; + public getRequiredAttributesMember(member: number, workWithUserAttributes?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getRequiredAttributesMember.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { + queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/m`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns required member-group attributes. If workWithUserAttributes == TRUE, then returns also user attributes. + * @param member id of Member + * @param group id of Group + * @param workWithUserAttributes flag to work with user attributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRequiredAttributesMemberGroup(member: number, group: number, workWithUserAttributes?: boolean, observe?: 'body', reportProgress?: boolean): Observable>; + public getRequiredAttributesMemberGroup(member: number, group: number, workWithUserAttributes?: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; + public getRequiredAttributesMemberGroup(member: number, group: number, workWithUserAttributes?: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; + public getRequiredAttributesMemberGroup(member: number, group: number, workWithUserAttributes?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getRequiredAttributesMemberGroup.'); + } + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getRequiredAttributesMemberGroup.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { + queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/m-g`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns member, member-group and member-resource attributes required by specified service. If workWithUserAttributes == TRUE, then returns also user and user-facility attributes. + * @param service id of Service + * @param resource id of Resource + * @param group id of Group + * @param member id of Member + * @param workWithUserAttributes flag to work with user attributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRequiredAttributesMemberGroupResourceService(service: number, resource: number, group: number, member: number, workWithUserAttributes?: boolean, observe?: 'body', reportProgress?: boolean): Observable>; + public getRequiredAttributesMemberGroupResourceService(service: number, resource: number, group: number, member: number, workWithUserAttributes?: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; + public getRequiredAttributesMemberGroupResourceService(service: number, resource: number, group: number, member: number, workWithUserAttributes?: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; + public getRequiredAttributesMemberGroupResourceService(service: number, resource: number, group: number, member: number, workWithUserAttributes?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling getRequiredAttributesMemberGroupResourceService.'); + } + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getRequiredAttributesMemberGroupResourceService.'); + } + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getRequiredAttributesMemberGroupResourceService.'); + } + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getRequiredAttributesMemberGroupResourceService.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { + queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/s-r-g-m`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns member-group attributes required by specified service. If workWithUserAttributes == TRUE, then returns also member and user attributes. + * @param service id of Service + * @param group id of Group + * @param member id of Member + * @param workWithUserAttributes flag to work with user attributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRequiredAttributesMemberGroupService(service: number, group: number, member: number, workWithUserAttributes?: boolean, observe?: 'body', reportProgress?: boolean): Observable>; + public getRequiredAttributesMemberGroupService(service: number, group: number, member: number, workWithUserAttributes?: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; + public getRequiredAttributesMemberGroupService(service: number, group: number, member: number, workWithUserAttributes?: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; + public getRequiredAttributesMemberGroupService(service: number, group: number, member: number, workWithUserAttributes?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling getRequiredAttributesMemberGroupService.'); + } + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getRequiredAttributesMemberGroupService.'); + } + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getRequiredAttributesMemberGroupService.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { + queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/s-g-m`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns member-resource attributes required by specified list of services. If workWithUserAttributes == TRUE, then returns also user attributes. + * @param member id of Member + * @param resource id of Resource + * @param workWithUserAttributes flag to work with user attributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRequiredAttributesMemberResource(member: number, resource: number, workWithUserAttributes?: boolean, observe?: 'body', reportProgress?: boolean): Observable>; + public getRequiredAttributesMemberResource(member: number, resource: number, workWithUserAttributes?: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; + public getRequiredAttributesMemberResource(member: number, resource: number, workWithUserAttributes?: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; + public getRequiredAttributesMemberResource(member: number, resource: number, workWithUserAttributes?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getRequiredAttributesMemberResource.'); + } + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getRequiredAttributesMemberResource.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { + queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/m-r`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns member and member-resource attributes required by the specified service. If workWithUserAttributes == TRUE, then returns also user attributes. + * @param service id of Service + * @param resource id of Resource + * @param member id of Member + * @param workWithUserAttributes flag to work with user attributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRequiredAttributesMemberResourceService(service: number, resource: number, member: number, workWithUserAttributes?: boolean, observe?: 'body', reportProgress?: boolean): Observable>; + public getRequiredAttributesMemberResourceService(service: number, resource: number, member: number, workWithUserAttributes?: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; + public getRequiredAttributesMemberResourceService(service: number, resource: number, member: number, workWithUserAttributes?: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; + public getRequiredAttributesMemberResourceService(service: number, resource: number, member: number, workWithUserAttributes?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling getRequiredAttributesMemberResourceService.'); + } + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getRequiredAttributesMemberResourceService.'); + } + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getRequiredAttributesMemberResourceService.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { + queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/s-r-m`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns required resource attributes. + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRequiredAttributesResource(resource: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getRequiredAttributesResource(resource: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getRequiredAttributesResource(resource: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getRequiredAttributesResource(resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getRequiredAttributesResource.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/r`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns resource attributes required by specified service. + * @param service id of Service + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRequiredAttributesResourceService(service: number, resource: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getRequiredAttributesResourceService(service: number, resource: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getRequiredAttributesResourceService(service: number, resource: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getRequiredAttributesResourceService(service: number, resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling getRequiredAttributesResourceService.'); + } + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getRequiredAttributesResourceService.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/s-r`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns resource attributes required by specified list of services. + * @param services list of Service ids List<Integer> + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRequiredAttributesResourceServices(services: Array, resource: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getRequiredAttributesResourceServices(services: Array, resource: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getRequiredAttributesResourceServices(services: Array, resource: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getRequiredAttributesResourceServices(services: Array, resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (services === null || services === undefined) { + throw new Error('Required parameter services was null or undefined when calling getRequiredAttributesResourceServices.'); + } + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getRequiredAttributesResourceServices.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (services) { + services.forEach((element) => { + queryParameters = queryParameters.append('services[]', element); + }) + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/ss-r`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns required user attributes. + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRequiredAttributesUser(user: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getRequiredAttributesUser(user: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getRequiredAttributesUser(user: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getRequiredAttributesUser(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getRequiredAttributesUser.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/u`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns required user-facility attributes. + * @param user id of User + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRequiredAttributesUserFacility(user: number, facility: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getRequiredAttributesUserFacility(user: number, facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getRequiredAttributesUserFacility(user: number, facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getRequiredAttributesUserFacility(user: number, facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getRequiredAttributesUserFacility.'); + } + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getRequiredAttributesUserFacility.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/u-f`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns required vo attributes. + * @param service id of Service + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRequiredAttributesVoService(service: number, vo: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getRequiredAttributesVoService(service: number, vo: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getRequiredAttributesVoService(service: number, vo: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getRequiredAttributesVoService(service: number, vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling getRequiredAttributesVoService.'); + } + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getRequiredAttributesVoService.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/s-v`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns a resource Attribute by its id. + * This is an overloaded method getAttribute, specialized for resource and attribute id. + * @param resource id of Resource + * @param attributeId id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourceAttributeById(resource: number, attributeId: number, observe?: 'body', reportProgress?: boolean): Observable; + public getResourceAttributeById(resource: number, attributeId: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getResourceAttributeById(resource: number, attributeId: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getResourceAttributeById(resource: number, attributeId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getResourceAttributeById.'); + } + if (attributeId === null || attributeId === undefined) { + throw new Error('Required parameter attributeId was null or undefined when calling getResourceAttributeById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (attributeId !== undefined && attributeId !== null) { + queryParameters = queryParameters.set('attributeId', attributeId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/id-resource`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns a resource Attribute by its name. + * This is an overloaded method getAttribute, specialized for resource and attribute name. + * @param resource id of Resource + * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourceAttributeByName(resource: number, attributeName: string, observe?: 'body', reportProgress?: boolean): Observable; + public getResourceAttributeByName(resource: number, attributeName: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getResourceAttributeByName(resource: number, attributeName: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getResourceAttributeByName(resource: number, attributeName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getResourceAttributeByName.'); + } + if (attributeName === null || attributeName === undefined) { + throw new Error('Required parameter attributeName was null or undefined when calling getResourceAttributeByName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (attributeName !== undefined && attributeName !== null) { + queryParameters = queryParameters.set('attributeName', attributeName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/name-resource`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all non-empty attributes associated with the resource. + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourceAttributes(resource: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getResourceAttributes(resource: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getResourceAttributes(resource: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getResourceAttributes(resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getResourceAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/r`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all attributes associated with the resource which have name in list attrNames (empty too). Virtual attributes too. + * @param resource id of Resource + * @param attrNames list of attribute names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourceAttributesByNames(resource: number, attrNames: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getResourceAttributesByNames(resource: number, attrNames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getResourceAttributesByNames(resource: number, attrNames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getResourceAttributesByNames(resource: number, attrNames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getResourceAttributesByNames.'); + } + if (attrNames === null || attrNames === undefined) { + throw new Error('Required parameter attrNames was null or undefined when calling getResourceAttributesByNames.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/r-names`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all non-empty attributes associated with the group and resource. Virtual attributes too. If workWithGroupAttributes is true, return also all group attributes. + * @param resource id of Resource + * @param group id of Group + * @param workWithGroupAttributes flag to work with group attributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourceGroupAndGroupAttributes(resource: number, group: number, workWithGroupAttributes: boolean, observe?: 'body', reportProgress?: boolean): Observable>; + public getResourceGroupAndGroupAttributes(resource: number, group: number, workWithGroupAttributes: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; + public getResourceGroupAndGroupAttributes(resource: number, group: number, workWithGroupAttributes: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; + public getResourceGroupAndGroupAttributes(resource: number, group: number, workWithGroupAttributes: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getResourceGroupAndGroupAttributes.'); + } + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getResourceGroupAndGroupAttributes.'); + } + if (workWithGroupAttributes === null || workWithGroupAttributes === undefined) { + throw new Error('Required parameter workWithGroupAttributes was null or undefined when calling getResourceGroupAndGroupAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (workWithGroupAttributes !== undefined && workWithGroupAttributes !== null) { + queryParameters = queryParameters.set('workWithGroupAttributes', workWithGroupAttributes); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/r-g-wg`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all attributes associated with the group and the resource which have their name in list attrNames (empty too). Virtual attributes too. If workWithGroupAttributes is true, return also all group attributes in list of attrNames (with virtual attributes too). + * @param resource id of Resource + * @param group id of Group + * @param attrNames list of attribute names List<String> + * @param workWithGroupAttributes flag to work with group attributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourceGroupAndGroupAttributesByNames(resource: number, group: number, attrNames: Array, workWithGroupAttributes: boolean, observe?: 'body', reportProgress?: boolean): Observable>; + public getResourceGroupAndGroupAttributesByNames(resource: number, group: number, attrNames: Array, workWithGroupAttributes: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; + public getResourceGroupAndGroupAttributesByNames(resource: number, group: number, attrNames: Array, workWithGroupAttributes: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; + public getResourceGroupAndGroupAttributesByNames(resource: number, group: number, attrNames: Array, workWithGroupAttributes: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getResourceGroupAndGroupAttributesByNames.'); + } + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getResourceGroupAndGroupAttributesByNames.'); + } + if (attrNames === null || attrNames === undefined) { + throw new Error('Required parameter attrNames was null or undefined when calling getResourceGroupAndGroupAttributesByNames.'); + } + if (workWithGroupAttributes === null || workWithGroupAttributes === undefined) { + throw new Error('Required parameter workWithGroupAttributes was null or undefined when calling getResourceGroupAndGroupAttributesByNames.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + if (workWithGroupAttributes !== undefined && workWithGroupAttributes !== null) { + queryParameters = queryParameters.set('workWithGroupAttributes', workWithGroupAttributes); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/r-g-names-wg`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all non-empty attributes associated with the group on resource. + * @param resource id of Resource + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourceGroupAttributes(resource: number, group: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getResourceGroupAttributes(resource: number, group: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getResourceGroupAttributes(resource: number, group: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getResourceGroupAttributes(resource: number, group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getResourceGroupAttributes.'); + } + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getResourceGroupAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/r-g`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all attributes by the list of attrNames if they are in one of these namespaces: - member - group - member-group - resource - member-resource - group-resource - user (get from member object) - facility (get from resource object) - user-facility Returns all attributes even if they are empty or virtual. + * @param resource id of Resource + * @param group id of Group + * @param member id of Member + * @param attrNames list of attribute names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourceGroupMemberAttributesByNames(resource: number, group: number, member: number, attrNames: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getResourceGroupMemberAttributesByNames(resource: number, group: number, member: number, attrNames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getResourceGroupMemberAttributesByNames(resource: number, group: number, member: number, attrNames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getResourceGroupMemberAttributesByNames(resource: number, group: number, member: number, attrNames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getResourceGroupMemberAttributesByNames.'); + } + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getResourceGroupMemberAttributesByNames.'); + } + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getResourceGroupMemberAttributesByNames.'); + } + if (attrNames === null || attrNames === undefined) { + throw new Error('Required parameter attrNames was null or undefined when calling getResourceGroupMemberAttributesByNames.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/r-g-m-names`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns a user Attribute by its id. + * This is an overloaded method getAttribute, specialized for user and attribute id. + * @param user id of User + * @param attributeId id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserAttributeById(user: number, attributeId: number, observe?: 'body', reportProgress?: boolean): Observable; + public getUserAttributeById(user: number, attributeId: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getUserAttributeById(user: number, attributeId: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getUserAttributeById(user: number, attributeId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getUserAttributeById.'); + } + if (attributeId === null || attributeId === undefined) { + throw new Error('Required parameter attributeId was null or undefined when calling getUserAttributeById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (attributeId !== undefined && attributeId !== null) { + queryParameters = queryParameters.set('attributeId', attributeId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/id-user`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns a user Attribute by its name. + * This is an overloaded method getAttribute, specialized for user and attribute name. + * @param user id of User + * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserAttributeByName(user: number, attributeName: string, observe?: 'body', reportProgress?: boolean): Observable; + public getUserAttributeByName(user: number, attributeName: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getUserAttributeByName(user: number, attributeName: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getUserAttributeByName(user: number, attributeName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getUserAttributeByName.'); + } + if (attributeName === null || attributeName === undefined) { + throw new Error('Required parameter attributeName was null or undefined when calling getUserAttributeByName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (attributeName !== undefined && attributeName !== null) { + queryParameters = queryParameters.set('attributeName', attributeName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/name-user`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all non-empty attributes associated with the user. + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserAttributes(user: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getUserAttributes(user: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getUserAttributes(user: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getUserAttributes(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getUserAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/u`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all attributes associated with the user which have name in list attrNames (empty too). + * @param user id of User + * @param attrNames list of attribute names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserAttributesByNames(user: number, attrNames: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getUserAttributesByNames(user: number, attrNames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getUserAttributesByNames(user: number, attrNames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getUserAttributesByNames(user: number, attrNames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getUserAttributesByNames.'); + } + if (attrNames === null || attrNames === undefined) { + throw new Error('Required parameter attrNames was null or undefined when calling getUserAttributesByNames.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/u-names`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns a UserExtSource Attribute by its id. + * This is an overloaded method getAttribute, specialized for UserExtSource and attribute id. + * @param userExtSource id of UserExtSource + * @param attributeId id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserExtSourceAttributeById(userExtSource: number, attributeId: number, observe?: 'body', reportProgress?: boolean): Observable; + public getUserExtSourceAttributeById(userExtSource: number, attributeId: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getUserExtSourceAttributeById(userExtSource: number, attributeId: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getUserExtSourceAttributeById(userExtSource: number, attributeId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (userExtSource === null || userExtSource === undefined) { + throw new Error('Required parameter userExtSource was null or undefined when calling getUserExtSourceAttributeById.'); + } + if (attributeId === null || attributeId === undefined) { + throw new Error('Required parameter attributeId was null or undefined when calling getUserExtSourceAttributeById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (userExtSource !== undefined && userExtSource !== null) { + queryParameters = queryParameters.set('userExtSource', userExtSource); + } + if (attributeId !== undefined && attributeId !== null) { + queryParameters = queryParameters.set('attributeId', attributeId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/id-ues`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns a UserExtSource Attribute by its name. + * This is an overloaded method getAttribute, specialized for UserExtSource and attribute name. + * @param userExtSource id of UserExtSource + * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserExtSourceAttributeByName(userExtSource: number, attributeName: string, observe?: 'body', reportProgress?: boolean): Observable; + public getUserExtSourceAttributeByName(userExtSource: number, attributeName: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getUserExtSourceAttributeByName(userExtSource: number, attributeName: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getUserExtSourceAttributeByName(userExtSource: number, attributeName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (userExtSource === null || userExtSource === undefined) { + throw new Error('Required parameter userExtSource was null or undefined when calling getUserExtSourceAttributeByName.'); + } + if (attributeName === null || attributeName === undefined) { + throw new Error('Required parameter attributeName was null or undefined when calling getUserExtSourceAttributeByName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (userExtSource !== undefined && userExtSource !== null) { + queryParameters = queryParameters.set('userExtSource', userExtSource); + } + if (attributeName !== undefined && attributeName !== null) { + queryParameters = queryParameters.set('attributeName', attributeName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/name-ues`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all non-empty attributes associated with the UserExtSource. + * @param userExtSource id of UserExtSource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserExtSourceAttributes(userExtSource: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getUserExtSourceAttributes(userExtSource: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getUserExtSourceAttributes(userExtSource: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getUserExtSourceAttributes(userExtSource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (userExtSource === null || userExtSource === undefined) { + throw new Error('Required parameter userExtSource was null or undefined when calling getUserExtSourceAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (userExtSource !== undefined && userExtSource !== null) { + queryParameters = queryParameters.set('userExtSource', userExtSource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/ues`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all attributes associated with the userExtSource which have name in list attrNames (empty too). + * @param userExtSource id of UserExtSource + * @param attrNames list of attribute names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserExtSourceAttributesByNames(userExtSource: number, attrNames: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getUserExtSourceAttributesByNames(userExtSource: number, attrNames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getUserExtSourceAttributesByNames(userExtSource: number, attrNames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getUserExtSourceAttributesByNames(userExtSource: number, attrNames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (userExtSource === null || userExtSource === undefined) { + throw new Error('Required parameter userExtSource was null or undefined when calling getUserExtSourceAttributesByNames.'); + } + if (attrNames === null || attrNames === undefined) { + throw new Error('Required parameter attrNames was null or undefined when calling getUserExtSourceAttributesByNames.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (userExtSource !== undefined && userExtSource !== null) { + queryParameters = queryParameters.set('userExtSource', userExtSource); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/ues-names`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns a user_facility Attribute by its id. + * This is an overloaded method getAttribute, specialized for user, facility and attribute id. + * @param user id of User + * @param facility id of Facility + * @param attributeId id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserFacilityAttributeById(user: number, facility: number, attributeId: number, observe?: 'body', reportProgress?: boolean): Observable; + public getUserFacilityAttributeById(user: number, facility: number, attributeId: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getUserFacilityAttributeById(user: number, facility: number, attributeId: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getUserFacilityAttributeById(user: number, facility: number, attributeId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getUserFacilityAttributeById.'); + } + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getUserFacilityAttributeById.'); + } + if (attributeId === null || attributeId === undefined) { + throw new Error('Required parameter attributeId was null or undefined when calling getUserFacilityAttributeById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (attributeId !== undefined && attributeId !== null) { + queryParameters = queryParameters.set('attributeId', attributeId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/id-user_facility`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns a user_facility Attribute by its name. + * This is an overloaded method getAttribute, specialized for user, facility and attribute name. + * @param user id of User + * @param facility id of Facility + * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserFacilityAttributeByName(user: number, facility: number, attributeName: string, observe?: 'body', reportProgress?: boolean): Observable; + public getUserFacilityAttributeByName(user: number, facility: number, attributeName: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getUserFacilityAttributeByName(user: number, facility: number, attributeName: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getUserFacilityAttributeByName(user: number, facility: number, attributeName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getUserFacilityAttributeByName.'); + } + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getUserFacilityAttributeByName.'); + } + if (attributeName === null || attributeName === undefined) { + throw new Error('Required parameter attributeName was null or undefined when calling getUserFacilityAttributeByName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (attributeName !== undefined && attributeName !== null) { + queryParameters = queryParameters.set('attributeName', attributeName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/name-user_facility`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns all non-empty User-Facility attributes for selected User and Facility. + * @param user id of User + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserFacilityAttributes(user: number, facility: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getUserFacilityAttributes(user: number, facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getUserFacilityAttributes(user: number, facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getUserFacilityAttributes(user: number, facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getUserFacilityAttributes.'); + } + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getUserFacilityAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/user-facility`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns a Vo Attribute by its id. + * This is an overloaded method getAttribute, specialized for virtual organization and attribute id. + * @param vo id of Vo + * @param attributeId id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVoAttributeById(vo: number, attributeId: number, observe?: 'body', reportProgress?: boolean): Observable; + public getVoAttributeById(vo: number, attributeId: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getVoAttributeById(vo: number, attributeId: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getVoAttributeById(vo: number, attributeId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getVoAttributeById.'); + } + if (attributeId === null || attributeId === undefined) { + throw new Error('Required parameter attributeId was null or undefined when calling getVoAttributeById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (attributeId !== undefined && attributeId !== null) { + queryParameters = queryParameters.set('attributeId', attributeId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/id-vo`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns a Vo Attribute by its name. + * This is an overloaded method getAttribute, specialized for virtual organization and attribute name. + * @param vo id of Vo + * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVoAttributeByName(vo: number, attributeName: string, observe?: 'body', reportProgress?: boolean): Observable; + public getVoAttributeByName(vo: number, attributeName: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getVoAttributeByName(vo: number, attributeName: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getVoAttributeByName(vo: number, attributeName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getVoAttributeByName.'); + } + if (attributeName === null || attributeName === undefined) { + throw new Error('Required parameter attributeName was null or undefined when calling getVoAttributeByName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (attributeName !== undefined && attributeName !== null) { + queryParameters = queryParameters.set('attributeName', attributeName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/name-vo`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all attributes associated with the vo. + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVoAttributes(vo: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getVoAttributes(vo: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getVoAttributes(vo: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getVoAttributes(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getVoAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/vo`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all attributes associated with the vo which have name in list attrNames (empty too). + * @param vo id of Vo + * @param attrNames list of attribute names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVoAttributesByNames(vo: number, attrNames: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getVoAttributesByNames(vo: number, attrNames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getVoAttributesByNames(vo: number, attrNames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getVoAttributesByNames(vo: number, attrNames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getVoAttributesByNames.'); + } + if (attrNames === null || attrNames === undefined) { + throw new Error('Required parameter attrNames was null or undefined when calling getVoAttributesByNames.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/vo-names`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove attributes of namespace facility, resource, group, user and member + * @param facility id of Facility + * @param resource id of Resource + * @param group id of Group + * @param user id of User + * @param member id of Member + * @param attributes list of attribute ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeAttributesForFacilityResourceGroupUserMember(facility: number, resource: number, group: number, user: number, member: number, attributes: Array, observe?: 'body', reportProgress?: boolean): Observable; + public removeAttributesForFacilityResourceGroupUserMember(facility: number, resource: number, group: number, user: number, member: number, attributes: Array, observe?: 'response', reportProgress?: boolean): Observable>; + public removeAttributesForFacilityResourceGroupUserMember(facility: number, resource: number, group: number, user: number, member: number, attributes: Array, observe?: 'events', reportProgress?: boolean): Observable>; + public removeAttributesForFacilityResourceGroupUserMember(facility: number, resource: number, group: number, user: number, member: number, attributes: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling removeAttributesForFacilityResourceGroupUserMember.'); + } + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling removeAttributesForFacilityResourceGroupUserMember.'); + } + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling removeAttributesForFacilityResourceGroupUserMember.'); + } + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling removeAttributesForFacilityResourceGroupUserMember.'); + } + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling removeAttributesForFacilityResourceGroupUserMember.'); + } + if (attributes === null || attributes === undefined) { + throw new Error('Required parameter attributes was null or undefined when calling removeAttributesForFacilityResourceGroupUserMember.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/f-r-g-u-m`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove attributes of namespace facility, resource, user and member + * @param facility id of Facility + * @param resource id of Resource + * @param user id of User + * @param member id of Member + * @param attributes list of attribute ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeAttributesForFacilityResourceUserMember(facility: number, resource: number, user: number, member: number, attributes: Array, observe?: 'body', reportProgress?: boolean): Observable; + public removeAttributesForFacilityResourceUserMember(facility: number, resource: number, user: number, member: number, attributes: Array, observe?: 'response', reportProgress?: boolean): Observable>; + public removeAttributesForFacilityResourceUserMember(facility: number, resource: number, user: number, member: number, attributes: Array, observe?: 'events', reportProgress?: boolean): Observable>; + public removeAttributesForFacilityResourceUserMember(facility: number, resource: number, user: number, member: number, attributes: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling removeAttributesForFacilityResourceUserMember.'); + } + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling removeAttributesForFacilityResourceUserMember.'); + } + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling removeAttributesForFacilityResourceUserMember.'); + } + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling removeAttributesForFacilityResourceUserMember.'); + } + if (attributes === null || attributes === undefined) { + throw new Error('Required parameter attributes was null or undefined when calling removeAttributesForFacilityResourceUserMember.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/f-r-u-m`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove entityless attribute + * @param key key of an entityless attribute + * @param attribute id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeEntitylessAttribute(key: string, attribute: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeEntitylessAttribute(key: string, attribute: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeEntitylessAttribute(key: string, attribute: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeEntitylessAttribute(key: string, attribute: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (key === null || key === undefined) { + throw new Error('Required parameter key was null or undefined when calling removeEntitylessAttribute.'); + } + if (attribute === null || attribute === undefined) { + throw new Error('Required parameter attribute was null or undefined when calling removeEntitylessAttribute.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (key !== undefined && key !== null) { + queryParameters = queryParameters.set('key', key); + } + if (attribute !== undefined && attribute !== null) { + queryParameters = queryParameters.set('attribute', attribute); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/e`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove facility attribute + * @param facility id of Facility + * @param attribute id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeFacilityAttribute(facility: number, attribute: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeFacilityAttribute(facility: number, attribute: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeFacilityAttribute(facility: number, attribute: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeFacilityAttribute(facility: number, attribute: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling removeFacilityAttribute.'); + } + if (attribute === null || attribute === undefined) { + throw new Error('Required parameter attribute was null or undefined when calling removeFacilityAttribute.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (attribute !== undefined && attribute !== null) { + queryParameters = queryParameters.set('attribute', attribute); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/f`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove attributes of namespace facility + * @param facility id of Facility + * @param attributes list of attribute ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeFacilityAttributes(facility: number, attributes: Array, observe?: 'body', reportProgress?: boolean): Observable; + public removeFacilityAttributes(facility: number, attributes: Array, observe?: 'response', reportProgress?: boolean): Observable>; + public removeFacilityAttributes(facility: number, attributes: Array, observe?: 'events', reportProgress?: boolean): Observable>; + public removeFacilityAttributes(facility: number, attributes: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling removeFacilityAttributes.'); + } + if (attributes === null || attributes === undefined) { + throw new Error('Required parameter attributes was null or undefined when calling removeFacilityAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/f`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove group attribute + * @param group id of Group + * @param attribute id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeGroupAttribute(group: number, attribute: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeGroupAttribute(group: number, attribute: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeGroupAttribute(group: number, attribute: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeGroupAttribute(group: number, attribute: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling removeGroupAttribute.'); + } + if (attribute === null || attribute === undefined) { + throw new Error('Required parameter attribute was null or undefined when calling removeGroupAttribute.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (attribute !== undefined && attribute !== null) { + queryParameters = queryParameters.set('attribute', attribute); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/g`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove attributes of namespace group + * @param group id of Group + * @param attributes list of attribute ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeGroupAttributes(group: number, attributes: Array, observe?: 'body', reportProgress?: boolean): Observable; + public removeGroupAttributes(group: number, attributes: Array, observe?: 'response', reportProgress?: boolean): Observable>; + public removeGroupAttributes(group: number, attributes: Array, observe?: 'events', reportProgress?: boolean): Observable>; + public removeGroupAttributes(group: number, attributes: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling removeGroupAttributes.'); + } + if (attributes === null || attributes === undefined) { + throw new Error('Required parameter attributes was null or undefined when calling removeGroupAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/g`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove group-resource attribute + * @param group id of Group + * @param resource id of Resource + * @param attribute id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeGroupResourceAttribute(group: number, resource: number, attribute: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeGroupResourceAttribute(group: number, resource: number, attribute: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeGroupResourceAttribute(group: number, resource: number, attribute: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeGroupResourceAttribute(group: number, resource: number, attribute: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling removeGroupResourceAttribute.'); + } + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling removeGroupResourceAttribute.'); + } + if (attribute === null || attribute === undefined) { + throw new Error('Required parameter attribute was null or undefined when calling removeGroupResourceAttribute.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (attribute !== undefined && attribute !== null) { + queryParameters = queryParameters.set('attribute', attribute); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/g-r`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove attributes of namespace group-resource + * @param group id of Group + * @param resource id of Resource + * @param attributes list of attribute ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeGroupResourceAttributes(group: number, resource: number, attributes: Array, observe?: 'body', reportProgress?: boolean): Observable; + public removeGroupResourceAttributes(group: number, resource: number, attributes: Array, observe?: 'response', reportProgress?: boolean): Observable>; + public removeGroupResourceAttributes(group: number, resource: number, attributes: Array, observe?: 'events', reportProgress?: boolean): Observable>; + public removeGroupResourceAttributes(group: number, resource: number, attributes: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling removeGroupResourceAttributes.'); + } + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling removeGroupResourceAttributes.'); + } + if (attributes === null || attributes === undefined) { + throw new Error('Required parameter attributes was null or undefined when calling removeGroupResourceAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/g-r`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove attributes of namespace group-resource + * @param group id of Group + * @param resource id of Resource + * @param attributes list of attribute ids List<Integer> + * @param workWithGroupAttributes flag to work with group attributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeGroupResourceAttributesWorkWithGroupAttributes(group: number, resource: number, attributes: Array, workWithGroupAttributes: boolean, observe?: 'body', reportProgress?: boolean): Observable; + public removeGroupResourceAttributesWorkWithGroupAttributes(group: number, resource: number, attributes: Array, workWithGroupAttributes: boolean, observe?: 'response', reportProgress?: boolean): Observable>; + public removeGroupResourceAttributesWorkWithGroupAttributes(group: number, resource: number, attributes: Array, workWithGroupAttributes: boolean, observe?: 'events', reportProgress?: boolean): Observable>; + public removeGroupResourceAttributesWorkWithGroupAttributes(group: number, resource: number, attributes: Array, workWithGroupAttributes: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling removeGroupResourceAttributesWorkWithGroupAttributes.'); + } + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling removeGroupResourceAttributesWorkWithGroupAttributes.'); + } + if (attributes === null || attributes === undefined) { + throw new Error('Required parameter attributes was null or undefined when calling removeGroupResourceAttributesWorkWithGroupAttributes.'); + } + if (workWithGroupAttributes === null || workWithGroupAttributes === undefined) { + throw new Error('Required parameter workWithGroupAttributes was null or undefined when calling removeGroupResourceAttributesWorkWithGroupAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }) + } + if (workWithGroupAttributes !== undefined && workWithGroupAttributes !== null) { + queryParameters = queryParameters.set('workWithGroupAttributes', workWithGroupAttributes); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/g-r-workWithGroupAttributes`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove host attribute + * @param host id of Host + * @param attribute id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeHostAttribute(host: number, attribute: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeHostAttribute(host: number, attribute: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeHostAttribute(host: number, attribute: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeHostAttribute(host: number, attribute: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (host === null || host === undefined) { + throw new Error('Required parameter host was null or undefined when calling removeHostAttribute.'); + } + if (attribute === null || attribute === undefined) { + throw new Error('Required parameter attribute was null or undefined when calling removeHostAttribute.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (host !== undefined && host !== null) { + queryParameters = queryParameters.set('host', host); + } + if (attribute !== undefined && attribute !== null) { + queryParameters = queryParameters.set('attribute', attribute); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/h`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove attributes of namespace host + * @param host id of Host + * @param attributes list of attribute ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeHostAttributes(host: number, attributes: Array, observe?: 'body', reportProgress?: boolean): Observable; + public removeHostAttributes(host: number, attributes: Array, observe?: 'response', reportProgress?: boolean): Observable>; + public removeHostAttributes(host: number, attributes: Array, observe?: 'events', reportProgress?: boolean): Observable>; + public removeHostAttributes(host: number, attributes: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (host === null || host === undefined) { + throw new Error('Required parameter host was null or undefined when calling removeHostAttributes.'); + } + if (attributes === null || attributes === undefined) { + throw new Error('Required parameter attributes was null or undefined when calling removeHostAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (host !== undefined && host !== null) { + queryParameters = queryParameters.set('host', host); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/h`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove member attribute + * @param member id of Member + * @param attribute id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeMemberAttribute(member: number, attribute: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeMemberAttribute(member: number, attribute: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeMemberAttribute(member: number, attribute: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeMemberAttribute(member: number, attribute: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling removeMemberAttribute.'); + } + if (attribute === null || attribute === undefined) { + throw new Error('Required parameter attribute was null or undefined when calling removeMemberAttribute.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (attribute !== undefined && attribute !== null) { + queryParameters = queryParameters.set('attribute', attribute); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/m`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove attributes of namespace member + * @param member id of Member + * @param attributes list of attribute ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeMemberAttributes(member: number, attributes: Array, observe?: 'body', reportProgress?: boolean): Observable; + public removeMemberAttributes(member: number, attributes: Array, observe?: 'response', reportProgress?: boolean): Observable>; + public removeMemberAttributes(member: number, attributes: Array, observe?: 'events', reportProgress?: boolean): Observable>; + public removeMemberAttributes(member: number, attributes: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling removeMemberAttributes.'); + } + if (attributes === null || attributes === undefined) { + throw new Error('Required parameter attributes was null or undefined when calling removeMemberAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/m`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove attributes of namespace member + * @param member id of Member + * @param attributes list of attribute ids List<Integer> + * @param workWithUserAttributes flag to work with user attributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeMemberAttributesWorkWithUserAttributes(member: number, attributes: Array, workWithUserAttributes: boolean, observe?: 'body', reportProgress?: boolean): Observable; + public removeMemberAttributesWorkWithUserAttributes(member: number, attributes: Array, workWithUserAttributes: boolean, observe?: 'response', reportProgress?: boolean): Observable>; + public removeMemberAttributesWorkWithUserAttributes(member: number, attributes: Array, workWithUserAttributes: boolean, observe?: 'events', reportProgress?: boolean): Observable>; + public removeMemberAttributesWorkWithUserAttributes(member: number, attributes: Array, workWithUserAttributes: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling removeMemberAttributesWorkWithUserAttributes.'); + } + if (attributes === null || attributes === undefined) { + throw new Error('Required parameter attributes was null or undefined when calling removeMemberAttributesWorkWithUserAttributes.'); + } + if (workWithUserAttributes === null || workWithUserAttributes === undefined) { + throw new Error('Required parameter workWithUserAttributes was null or undefined when calling removeMemberAttributesWorkWithUserAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }) + } + if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { + queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/m-workWithUserAttributes`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove member-group attribute + * @param member id of Member + * @param group id of Group + * @param attribute id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeMemberGroupAttribute(member: number, group: number, attribute: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeMemberGroupAttribute(member: number, group: number, attribute: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeMemberGroupAttribute(member: number, group: number, attribute: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeMemberGroupAttribute(member: number, group: number, attribute: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling removeMemberGroupAttribute.'); + } + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling removeMemberGroupAttribute.'); + } + if (attribute === null || attribute === undefined) { + throw new Error('Required parameter attribute was null or undefined when calling removeMemberGroupAttribute.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (attribute !== undefined && attribute !== null) { + queryParameters = queryParameters.set('attribute', attribute); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/m-g`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove attributes of namespace member-group + * @param member id of Member + * @param group id of Group + * @param attributes list of attribute ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeMemberGroupAttributes(member: number, group: number, attributes: Array, observe?: 'body', reportProgress?: boolean): Observable; + public removeMemberGroupAttributes(member: number, group: number, attributes: Array, observe?: 'response', reportProgress?: boolean): Observable>; + public removeMemberGroupAttributes(member: number, group: number, attributes: Array, observe?: 'events', reportProgress?: boolean): Observable>; + public removeMemberGroupAttributes(member: number, group: number, attributes: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling removeMemberGroupAttributes.'); + } + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling removeMemberGroupAttributes.'); + } + if (attributes === null || attributes === undefined) { + throw new Error('Required parameter attributes was null or undefined when calling removeMemberGroupAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/m-g`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove attributes of namespace member-group + * @param member id of Member + * @param group id of Group + * @param attributes list of attribute ids List<Integer> + * @param workWithUserAttributes flag to work with user attributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeMemberGroupAttributesWorkWithUserAttributes(member: number, group: number, attributes: Array, workWithUserAttributes: boolean, observe?: 'body', reportProgress?: boolean): Observable; + public removeMemberGroupAttributesWorkWithUserAttributes(member: number, group: number, attributes: Array, workWithUserAttributes: boolean, observe?: 'response', reportProgress?: boolean): Observable>; + public removeMemberGroupAttributesWorkWithUserAttributes(member: number, group: number, attributes: Array, workWithUserAttributes: boolean, observe?: 'events', reportProgress?: boolean): Observable>; + public removeMemberGroupAttributesWorkWithUserAttributes(member: number, group: number, attributes: Array, workWithUserAttributes: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling removeMemberGroupAttributesWorkWithUserAttributes.'); + } + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling removeMemberGroupAttributesWorkWithUserAttributes.'); + } + if (attributes === null || attributes === undefined) { + throw new Error('Required parameter attributes was null or undefined when calling removeMemberGroupAttributesWorkWithUserAttributes.'); + } + if (workWithUserAttributes === null || workWithUserAttributes === undefined) { + throw new Error('Required parameter workWithUserAttributes was null or undefined when calling removeMemberGroupAttributesWorkWithUserAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }) + } + if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { + queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/m-g-workWithUserAttributes`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove member-resource attribute + * @param member id of Member + * @param resource id of Resource + * @param attribute id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeMemberResourceAttribute(member: number, resource: number, attribute: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeMemberResourceAttribute(member: number, resource: number, attribute: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeMemberResourceAttribute(member: number, resource: number, attribute: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeMemberResourceAttribute(member: number, resource: number, attribute: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling removeMemberResourceAttribute.'); + } + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling removeMemberResourceAttribute.'); + } + if (attribute === null || attribute === undefined) { + throw new Error('Required parameter attribute was null or undefined when calling removeMemberResourceAttribute.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (attribute !== undefined && attribute !== null) { + queryParameters = queryParameters.set('attribute', attribute); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/m-r`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove attributes of namespace member-resource + * @param member id of Member + * @param resource id of Resource + * @param attributes list of attribute ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeMemberResourceAttributes(member: number, resource: number, attributes: Array, observe?: 'body', reportProgress?: boolean): Observable; + public removeMemberResourceAttributes(member: number, resource: number, attributes: Array, observe?: 'response', reportProgress?: boolean): Observable>; + public removeMemberResourceAttributes(member: number, resource: number, attributes: Array, observe?: 'events', reportProgress?: boolean): Observable>; + public removeMemberResourceAttributes(member: number, resource: number, attributes: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling removeMemberResourceAttributes.'); + } + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling removeMemberResourceAttributes.'); + } + if (attributes === null || attributes === undefined) { + throw new Error('Required parameter attributes was null or undefined when calling removeMemberResourceAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/m-r`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove resource attribute + * @param resource id of Resource + * @param attribute id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeResourceAttribute(resource: number, attribute: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeResourceAttribute(resource: number, attribute: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeResourceAttribute(resource: number, attribute: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeResourceAttribute(resource: number, attribute: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling removeResourceAttribute.'); + } + if (attribute === null || attribute === undefined) { + throw new Error('Required parameter attribute was null or undefined when calling removeResourceAttribute.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (attribute !== undefined && attribute !== null) { + queryParameters = queryParameters.set('attribute', attribute); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/r`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove attributes of namespace resource + * @param resource id of Resource + * @param attributes list of attribute ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeResourceAttributes(resource: number, attributes: Array, observe?: 'body', reportProgress?: boolean): Observable; + public removeResourceAttributes(resource: number, attributes: Array, observe?: 'response', reportProgress?: boolean): Observable>; + public removeResourceAttributes(resource: number, attributes: Array, observe?: 'events', reportProgress?: boolean): Observable>; + public removeResourceAttributes(resource: number, attributes: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling removeResourceAttributes.'); + } + if (attributes === null || attributes === undefined) { + throw new Error('Required parameter attributes was null or undefined when calling removeResourceAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/r`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove attributes of namespace userExtSource + * @param userExtSource id of UserExtSource + * @param attributes list of attribute ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeUesAttributes(userExtSource: number, attributes: Array, observe?: 'body', reportProgress?: boolean): Observable; + public removeUesAttributes(userExtSource: number, attributes: Array, observe?: 'response', reportProgress?: boolean): Observable>; + public removeUesAttributes(userExtSource: number, attributes: Array, observe?: 'events', reportProgress?: boolean): Observable>; + public removeUesAttributes(userExtSource: number, attributes: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (userExtSource === null || userExtSource === undefined) { + throw new Error('Required parameter userExtSource was null or undefined when calling removeUesAttributes.'); + } + if (attributes === null || attributes === undefined) { + throw new Error('Required parameter attributes was null or undefined when calling removeUesAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (userExtSource !== undefined && userExtSource !== null) { + queryParameters = queryParameters.set('userExtSource', userExtSource); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/ues`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove user attribute + * @param user id of User + * @param attribute id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeUserAttribute(user: number, attribute: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeUserAttribute(user: number, attribute: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeUserAttribute(user: number, attribute: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeUserAttribute(user: number, attribute: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling removeUserAttribute.'); + } + if (attribute === null || attribute === undefined) { + throw new Error('Required parameter attribute was null or undefined when calling removeUserAttribute.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (attribute !== undefined && attribute !== null) { + queryParameters = queryParameters.set('attribute', attribute); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/u`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove attributes of namespace user + * @param user id of User + * @param attributes list of attribute ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeUserAttributes(user: number, attributes: Array, observe?: 'body', reportProgress?: boolean): Observable; + public removeUserAttributes(user: number, attributes: Array, observe?: 'response', reportProgress?: boolean): Observable>; + public removeUserAttributes(user: number, attributes: Array, observe?: 'events', reportProgress?: boolean): Observable>; + public removeUserAttributes(user: number, attributes: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling removeUserAttributes.'); + } + if (attributes === null || attributes === undefined) { + throw new Error('Required parameter attributes was null or undefined when calling removeUserAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/u`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove userExtSource attribute + * @param userExtSource id of UserExtSource + * @param attribute id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeUserExtSourceAttribute(userExtSource: number, attribute: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeUserExtSourceAttribute(userExtSource: number, attribute: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeUserExtSourceAttribute(userExtSource: number, attribute: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeUserExtSourceAttribute(userExtSource: number, attribute: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (userExtSource === null || userExtSource === undefined) { + throw new Error('Required parameter userExtSource was null or undefined when calling removeUserExtSourceAttribute.'); + } + if (attribute === null || attribute === undefined) { + throw new Error('Required parameter attribute was null or undefined when calling removeUserExtSourceAttribute.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (userExtSource !== undefined && userExtSource !== null) { + queryParameters = queryParameters.set('userExtSource', userExtSource); + } + if (attribute !== undefined && attribute !== null) { + queryParameters = queryParameters.set('attribute', attribute); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/ues`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove user facility attribute + * @param user id of User + * @param facility id of Facility + * @param attribute id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeUserFacilityAttribute(user: number, facility: number, attribute: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeUserFacilityAttribute(user: number, facility: number, attribute: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeUserFacilityAttribute(user: number, facility: number, attribute: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeUserFacilityAttribute(user: number, facility: number, attribute: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling removeUserFacilityAttribute.'); + } + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling removeUserFacilityAttribute.'); + } + if (attribute === null || attribute === undefined) { + throw new Error('Required parameter attribute was null or undefined when calling removeUserFacilityAttribute.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (attribute !== undefined && attribute !== null) { + queryParameters = queryParameters.set('attribute', attribute); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/u-f`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove attributes of namespace user-facility + * @param user id of User + * @param facility id of Facility + * @param attributes list of attribute ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeUserFacilityAttributes(user: number, facility: number, attributes: Array, observe?: 'body', reportProgress?: boolean): Observable; + public removeUserFacilityAttributes(user: number, facility: number, attributes: Array, observe?: 'response', reportProgress?: boolean): Observable>; + public removeUserFacilityAttributes(user: number, facility: number, attributes: Array, observe?: 'events', reportProgress?: boolean): Observable>; + public removeUserFacilityAttributes(user: number, facility: number, attributes: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling removeUserFacilityAttributes.'); + } + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling removeUserFacilityAttributes.'); + } + if (attributes === null || attributes === undefined) { + throw new Error('Required parameter attributes was null or undefined when calling removeUserFacilityAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/u-f`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove vo attribute + * @param vo id of Vo + * @param attribute id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeVoAttribute(vo: number, attribute: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeVoAttribute(vo: number, attribute: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeVoAttribute(vo: number, attribute: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeVoAttribute(vo: number, attribute: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling removeVoAttribute.'); + } + if (attribute === null || attribute === undefined) { + throw new Error('Required parameter attribute was null or undefined when calling removeVoAttribute.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (attribute !== undefined && attribute !== null) { + queryParameters = queryParameters.set('attribute', attribute); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/v`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove attributes of namespace vo + * @param vo id of Vo + * @param attributes list of attribute ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeVoAttributes(vo: number, attributes: Array, observe?: 'body', reportProgress?: boolean): Observable; + public removeVoAttributes(vo: number, attributes: Array, observe?: 'response', reportProgress?: boolean): Observable>; + public removeVoAttributes(vo: number, attributes: Array, observe?: 'events', reportProgress?: boolean): Observable>; + public removeVoAttributes(vo: number, attributes: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling removeVoAttributes.'); + } + if (attributes === null || attributes === undefined) { + throw new Error('Required parameter attributes was null or undefined when calling removeVoAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/v`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Deletes old attribute policy collections and sets attribute policy collections for an attribute definition provided in given policy collections. + * @param inputAttributePolicyCollections + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setAttributePolicyCollections(inputAttributePolicyCollections: InputAttributePolicyCollections, observe?: 'body', reportProgress?: boolean): Observable; + public setAttributePolicyCollections(inputAttributePolicyCollections: InputAttributePolicyCollections, observe?: 'response', reportProgress?: boolean): Observable>; + public setAttributePolicyCollections(inputAttributePolicyCollections: InputAttributePolicyCollections, observe?: 'events', reportProgress?: boolean): Observable>; + public setAttributePolicyCollections(inputAttributePolicyCollections: InputAttributePolicyCollections, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputAttributePolicyCollections === null || inputAttributePolicyCollections === undefined) { + throw new Error('Required parameter inputAttributePolicyCollections was null or undefined when calling setAttributePolicyCollections.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributePolicyCollections`, + inputAttributePolicyCollections, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Sets all AttributeRights in the list given as a parameter. Allowed Roles to set rights for are: VOADMIN, GROUPADMIN, FACILITYADMIN, SELF. + * @param inputAttributeRights + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setAttributeRights(inputAttributeRights: InputAttributeRights, observe?: 'body', reportProgress?: boolean): Observable; + public setAttributeRights(inputAttributeRights: InputAttributeRights, observe?: 'response', reportProgress?: boolean): Observable>; + public setAttributeRights(inputAttributeRights: InputAttributeRights, observe?: 'events', reportProgress?: boolean): Observable>; + public setAttributeRights(inputAttributeRights: InputAttributeRights, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputAttributeRights === null || inputAttributeRights === undefined) { + throw new Error('Required parameter inputAttributeRights was null or undefined when calling setAttributeRights.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributeRights`, + inputAttributeRights, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Sets entityless Attribute. + * @param inputEntitylessAttribute + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setEntitylessAttribute(inputEntitylessAttribute: InputEntitylessAttribute, observe?: 'body', reportProgress?: boolean): Observable; + public setEntitylessAttribute(inputEntitylessAttribute: InputEntitylessAttribute, observe?: 'response', reportProgress?: boolean): Observable>; + public setEntitylessAttribute(inputEntitylessAttribute: InputEntitylessAttribute, observe?: 'events', reportProgress?: boolean): Observable>; + public setEntitylessAttribute(inputEntitylessAttribute: InputEntitylessAttribute, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputEntitylessAttribute === null || inputEntitylessAttribute === undefined) { + throw new Error('Required parameter inputEntitylessAttribute was null or undefined when calling setEntitylessAttribute.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttribute/entityless`, + inputEntitylessAttribute, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Sets Attribute for Facility. + * @param inputSetFacilityAttribute + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setFacilityAttribute(inputSetFacilityAttribute: InputSetFacilityAttribute, observe?: 'body', reportProgress?: boolean): Observable; + public setFacilityAttribute(inputSetFacilityAttribute: InputSetFacilityAttribute, observe?: 'response', reportProgress?: boolean): Observable>; + public setFacilityAttribute(inputSetFacilityAttribute: InputSetFacilityAttribute, observe?: 'events', reportProgress?: boolean): Observable>; + public setFacilityAttribute(inputSetFacilityAttribute: InputSetFacilityAttribute, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetFacilityAttribute === null || inputSetFacilityAttribute === undefined) { + throw new Error('Required parameter inputSetFacilityAttribute was null or undefined when calling setFacilityAttribute.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttribute/facility`, + inputSetFacilityAttribute, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Store the attributes associated with the facility. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). + * @param inputSetFacilityAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setFacilityAttributes(inputSetFacilityAttributes: InputSetFacilityAttributes, observe?: 'body', reportProgress?: boolean): Observable; + public setFacilityAttributes(inputSetFacilityAttributes: InputSetFacilityAttributes, observe?: 'response', reportProgress?: boolean): Observable>; + public setFacilityAttributes(inputSetFacilityAttributes: InputSetFacilityAttributes, observe?: 'events', reportProgress?: boolean): Observable>; + public setFacilityAttributes(inputSetFacilityAttributes: InputSetFacilityAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetFacilityAttributes === null || inputSetFacilityAttributes === undefined) { + throw new Error('Required parameter inputSetFacilityAttributes was null or undefined when calling setFacilityAttributes.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/f`, + inputSetFacilityAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Store the member, user, member-group, member-resource and user-facility attributes. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). Group and group-resource attributes are not supported in this context. + * @param inputSetFacilityResourceGroupUserMemberAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setFacilityResourceGroupUserMemberAttributes(inputSetFacilityResourceGroupUserMemberAttributes: InputSetFacilityResourceGroupUserMemberAttributes, observe?: 'body', reportProgress?: boolean): Observable; + public setFacilityResourceGroupUserMemberAttributes(inputSetFacilityResourceGroupUserMemberAttributes: InputSetFacilityResourceGroupUserMemberAttributes, observe?: 'response', reportProgress?: boolean): Observable>; + public setFacilityResourceGroupUserMemberAttributes(inputSetFacilityResourceGroupUserMemberAttributes: InputSetFacilityResourceGroupUserMemberAttributes, observe?: 'events', reportProgress?: boolean): Observable>; + public setFacilityResourceGroupUserMemberAttributes(inputSetFacilityResourceGroupUserMemberAttributes: InputSetFacilityResourceGroupUserMemberAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetFacilityResourceGroupUserMemberAttributes === null || inputSetFacilityResourceGroupUserMemberAttributes === undefined) { + throw new Error('Required parameter inputSetFacilityResourceGroupUserMemberAttributes was null or undefined when calling setFacilityResourceGroupUserMemberAttributes.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/f-r-g-u-m`, + inputSetFacilityResourceGroupUserMemberAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Store the member, user, member-resource and user-facility attributes. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). + * @param inputSetFacilityResourceUserMemberAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setFacilityResourceUserMemberAttributes(inputSetFacilityResourceUserMemberAttributes: InputSetFacilityResourceUserMemberAttributes, observe?: 'body', reportProgress?: boolean): Observable; + public setFacilityResourceUserMemberAttributes(inputSetFacilityResourceUserMemberAttributes: InputSetFacilityResourceUserMemberAttributes, observe?: 'response', reportProgress?: boolean): Observable>; + public setFacilityResourceUserMemberAttributes(inputSetFacilityResourceUserMemberAttributes: InputSetFacilityResourceUserMemberAttributes, observe?: 'events', reportProgress?: boolean): Observable>; + public setFacilityResourceUserMemberAttributes(inputSetFacilityResourceUserMemberAttributes: InputSetFacilityResourceUserMemberAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetFacilityResourceUserMemberAttributes === null || inputSetFacilityResourceUserMemberAttributes === undefined) { + throw new Error('Required parameter inputSetFacilityResourceUserMemberAttributes was null or undefined when calling setFacilityResourceUserMemberAttributes.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/f-r-u-m`, + inputSetFacilityResourceUserMemberAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Store the attributes associated with the facility and user combination. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). + * @param inputSetFacilityUserAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setFacilityUserAttributes(inputSetFacilityUserAttributes: InputSetFacilityUserAttributes, observe?: 'body', reportProgress?: boolean): Observable; + public setFacilityUserAttributes(inputSetFacilityUserAttributes: InputSetFacilityUserAttributes, observe?: 'response', reportProgress?: boolean): Observable>; + public setFacilityUserAttributes(inputSetFacilityUserAttributes: InputSetFacilityUserAttributes, observe?: 'events', reportProgress?: boolean): Observable>; + public setFacilityUserAttributes(inputSetFacilityUserAttributes: InputSetFacilityUserAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetFacilityUserAttributes === null || inputSetFacilityUserAttributes === undefined) { + throw new Error('Required parameter inputSetFacilityUserAttributes was null or undefined when calling setFacilityUserAttributes.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/f-u`, + inputSetFacilityUserAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Sets Attribute for Group. + * @param inputSetGroupAttribute + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setGroupAttribute(inputSetGroupAttribute: InputSetGroupAttribute, observe?: 'body', reportProgress?: boolean): Observable; + public setGroupAttribute(inputSetGroupAttribute: InputSetGroupAttribute, observe?: 'response', reportProgress?: boolean): Observable>; + public setGroupAttribute(inputSetGroupAttribute: InputSetGroupAttribute, observe?: 'events', reportProgress?: boolean): Observable>; + public setGroupAttribute(inputSetGroupAttribute: InputSetGroupAttribute, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetGroupAttribute === null || inputSetGroupAttribute === undefined) { + throw new Error('Required parameter inputSetGroupAttribute was null or undefined when calling setGroupAttribute.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttribute/group`, + inputSetGroupAttribute, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Store the attributes associated with the group. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). + * @param inputSetGroupAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setGroupAttributes(inputSetGroupAttributes: InputSetGroupAttributes, observe?: 'body', reportProgress?: boolean): Observable; + public setGroupAttributes(inputSetGroupAttributes: InputSetGroupAttributes, observe?: 'response', reportProgress?: boolean): Observable>; + public setGroupAttributes(inputSetGroupAttributes: InputSetGroupAttributes, observe?: 'events', reportProgress?: boolean): Observable>; + public setGroupAttributes(inputSetGroupAttributes: InputSetGroupAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetGroupAttributes === null || inputSetGroupAttributes === undefined) { + throw new Error('Required parameter inputSetGroupAttributes was null or undefined when calling setGroupAttributes.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/g`, + inputSetGroupAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Sets Attribute for Group and Resource. + * @param inputSetGroupResourceAttribute + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setGroupResourceAttribute(inputSetGroupResourceAttribute: InputSetGroupResourceAttribute, observe?: 'body', reportProgress?: boolean): Observable; + public setGroupResourceAttribute(inputSetGroupResourceAttribute: InputSetGroupResourceAttribute, observe?: 'response', reportProgress?: boolean): Observable>; + public setGroupResourceAttribute(inputSetGroupResourceAttribute: InputSetGroupResourceAttribute, observe?: 'events', reportProgress?: boolean): Observable>; + public setGroupResourceAttribute(inputSetGroupResourceAttribute: InputSetGroupResourceAttribute, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetGroupResourceAttribute === null || inputSetGroupResourceAttribute === undefined) { + throw new Error('Required parameter inputSetGroupResourceAttribute was null or undefined when calling setGroupResourceAttribute.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttribute/group-resource`, + inputSetGroupResourceAttribute, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Sets Attributes for Group and Resource. + * @param inputSetGroupResourceAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setGroupResourceAttributes(inputSetGroupResourceAttributes: InputSetGroupResourceAttributes, observe?: 'body', reportProgress?: boolean): Observable; + public setGroupResourceAttributes(inputSetGroupResourceAttributes: InputSetGroupResourceAttributes, observe?: 'response', reportProgress?: boolean): Observable>; + public setGroupResourceAttributes(inputSetGroupResourceAttributes: InputSetGroupResourceAttributes, observe?: 'events', reportProgress?: boolean): Observable>; + public setGroupResourceAttributes(inputSetGroupResourceAttributes: InputSetGroupResourceAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetGroupResourceAttributes === null || inputSetGroupResourceAttributes === undefined) { + throw new Error('Required parameter inputSetGroupResourceAttributes was null or undefined when calling setGroupResourceAttributes.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/group-resource`, + inputSetGroupResourceAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Sets Attribute for Host. + * @param inputSetHostAttribute + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setHostAttribute(inputSetHostAttribute: InputSetHostAttribute, observe?: 'body', reportProgress?: boolean): Observable; + public setHostAttribute(inputSetHostAttribute: InputSetHostAttribute, observe?: 'response', reportProgress?: boolean): Observable>; + public setHostAttribute(inputSetHostAttribute: InputSetHostAttribute, observe?: 'events', reportProgress?: boolean): Observable>; + public setHostAttribute(inputSetHostAttribute: InputSetHostAttribute, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetHostAttribute === null || inputSetHostAttribute === undefined) { + throw new Error('Required parameter inputSetHostAttribute was null or undefined when calling setHostAttribute.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttribute/host`, + inputSetHostAttribute, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Store the attributes associated with the host. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). + * @param inputSetHostAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setHostAttributes(inputSetHostAttributes: InputSetHostAttributes, observe?: 'body', reportProgress?: boolean): Observable; + public setHostAttributes(inputSetHostAttributes: InputSetHostAttributes, observe?: 'response', reportProgress?: boolean): Observable>; + public setHostAttributes(inputSetHostAttributes: InputSetHostAttributes, observe?: 'events', reportProgress?: boolean): Observable>; + public setHostAttributes(inputSetHostAttributes: InputSetHostAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetHostAttributes === null || inputSetHostAttributes === undefined) { + throw new Error('Required parameter inputSetHostAttributes was null or undefined when calling setHostAttributes.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/h`, + inputSetHostAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Sets Attribute for Member. + * @param inputSetMemberAttribute + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setMemberAttribute(inputSetMemberAttribute: InputSetMemberAttribute, observe?: 'body', reportProgress?: boolean): Observable; + public setMemberAttribute(inputSetMemberAttribute: InputSetMemberAttribute, observe?: 'response', reportProgress?: boolean): Observable>; + public setMemberAttribute(inputSetMemberAttribute: InputSetMemberAttribute, observe?: 'events', reportProgress?: boolean): Observable>; + public setMemberAttribute(inputSetMemberAttribute: InputSetMemberAttribute, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetMemberAttribute === null || inputSetMemberAttribute === undefined) { + throw new Error('Required parameter inputSetMemberAttribute was null or undefined when calling setMemberAttribute.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttribute/member`, + inputSetMemberAttribute, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Store the attributes associated with the member. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). + * @param inputSetMemberAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setMemberAttributes(inputSetMemberAttributes: InputSetMemberAttributes, observe?: 'body', reportProgress?: boolean): Observable; + public setMemberAttributes(inputSetMemberAttributes: InputSetMemberAttributes, observe?: 'response', reportProgress?: boolean): Observable>; + public setMemberAttributes(inputSetMemberAttributes: InputSetMemberAttributes, observe?: 'events', reportProgress?: boolean): Observable>; + public setMemberAttributes(inputSetMemberAttributes: InputSetMemberAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetMemberAttributes === null || inputSetMemberAttributes === undefined) { + throw new Error('Required parameter inputSetMemberAttributes was null or undefined when calling setMemberAttributes.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/m`, + inputSetMemberAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Sets Attribute for Member and Group. + * @param inputSetMemberGroupAttribute + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setMemberGroupAttribute(inputSetMemberGroupAttribute: InputSetMemberGroupAttribute, observe?: 'body', reportProgress?: boolean): Observable; + public setMemberGroupAttribute(inputSetMemberGroupAttribute: InputSetMemberGroupAttribute, observe?: 'response', reportProgress?: boolean): Observable>; + public setMemberGroupAttribute(inputSetMemberGroupAttribute: InputSetMemberGroupAttribute, observe?: 'events', reportProgress?: boolean): Observable>; + public setMemberGroupAttribute(inputSetMemberGroupAttribute: InputSetMemberGroupAttribute, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetMemberGroupAttribute === null || inputSetMemberGroupAttribute === undefined) { + throw new Error('Required parameter inputSetMemberGroupAttribute was null or undefined when calling setMemberGroupAttribute.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttribute/member-group`, + inputSetMemberGroupAttribute, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Store the attributes associated with the member and group combination. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). + * @param inputSetMemberGroupAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setMemberGroupAttributes(inputSetMemberGroupAttributes: InputSetMemberGroupAttributes, observe?: 'body', reportProgress?: boolean): Observable; + public setMemberGroupAttributes(inputSetMemberGroupAttributes: InputSetMemberGroupAttributes, observe?: 'response', reportProgress?: boolean): Observable>; + public setMemberGroupAttributes(inputSetMemberGroupAttributes: InputSetMemberGroupAttributes, observe?: 'events', reportProgress?: boolean): Observable>; + public setMemberGroupAttributes(inputSetMemberGroupAttributes: InputSetMemberGroupAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetMemberGroupAttributes === null || inputSetMemberGroupAttributes === undefined) { + throw new Error('Required parameter inputSetMemberGroupAttributes was null or undefined when calling setMemberGroupAttributes.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/m-g`, + inputSetMemberGroupAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Store the attributes associated with the member and group combination. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). If workWithUserAttributes is true, the method stores also the attributes associated with user and member. + * @param inputSetMemberGroupWithUserAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setMemberGroupWithUserAttributes(inputSetMemberGroupWithUserAttributes: InputSetMemberGroupWithUserAttributes, observe?: 'body', reportProgress?: boolean): Observable; + public setMemberGroupWithUserAttributes(inputSetMemberGroupWithUserAttributes: InputSetMemberGroupWithUserAttributes, observe?: 'response', reportProgress?: boolean): Observable>; + public setMemberGroupWithUserAttributes(inputSetMemberGroupWithUserAttributes: InputSetMemberGroupWithUserAttributes, observe?: 'events', reportProgress?: boolean): Observable>; + public setMemberGroupWithUserAttributes(inputSetMemberGroupWithUserAttributes: InputSetMemberGroupWithUserAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetMemberGroupWithUserAttributes === null || inputSetMemberGroupWithUserAttributes === undefined) { + throw new Error('Required parameter inputSetMemberGroupWithUserAttributes was null or undefined when calling setMemberGroupWithUserAttributes.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/m-g-wu`, + inputSetMemberGroupWithUserAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Store the attributes associated with the resource and member combination. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). If workWithUserAttributes is true, the method stores also the attributes associated with user, user-facility and member. + * @param inputSetMemberResourceAndUserAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setMemberResourceAndUserAttributes(inputSetMemberResourceAndUserAttributes: InputSetMemberResourceAndUserAttributes, observe?: 'body', reportProgress?: boolean): Observable; + public setMemberResourceAndUserAttributes(inputSetMemberResourceAndUserAttributes: InputSetMemberResourceAndUserAttributes, observe?: 'response', reportProgress?: boolean): Observable>; + public setMemberResourceAndUserAttributes(inputSetMemberResourceAndUserAttributes: InputSetMemberResourceAndUserAttributes, observe?: 'events', reportProgress?: boolean): Observable>; + public setMemberResourceAndUserAttributes(inputSetMemberResourceAndUserAttributes: InputSetMemberResourceAndUserAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetMemberResourceAndUserAttributes === null || inputSetMemberResourceAndUserAttributes === undefined) { + throw new Error('Required parameter inputSetMemberResourceAndUserAttributes was null or undefined when calling setMemberResourceAndUserAttributes.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/m-r-wu`, + inputSetMemberResourceAndUserAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Sets Attribute for Member and Resource. + * @param inputSetMemberResourceAttribute + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setMemberResourceAttribute(inputSetMemberResourceAttribute: InputSetMemberResourceAttribute, observe?: 'body', reportProgress?: boolean): Observable; + public setMemberResourceAttribute(inputSetMemberResourceAttribute: InputSetMemberResourceAttribute, observe?: 'response', reportProgress?: boolean): Observable>; + public setMemberResourceAttribute(inputSetMemberResourceAttribute: InputSetMemberResourceAttribute, observe?: 'events', reportProgress?: boolean): Observable>; + public setMemberResourceAttribute(inputSetMemberResourceAttribute: InputSetMemberResourceAttribute, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetMemberResourceAttribute === null || inputSetMemberResourceAttribute === undefined) { + throw new Error('Required parameter inputSetMemberResourceAttribute was null or undefined when calling setMemberResourceAttribute.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttribute/member-resource`, + inputSetMemberResourceAttribute, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Store the attributes associated with the resource and member combination. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). + * @param inputSetMemberResourceAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setMemberResourceAttributes(inputSetMemberResourceAttributes: InputSetMemberResourceAttributes, observe?: 'body', reportProgress?: boolean): Observable; + public setMemberResourceAttributes(inputSetMemberResourceAttributes: InputSetMemberResourceAttributes, observe?: 'response', reportProgress?: boolean): Observable>; + public setMemberResourceAttributes(inputSetMemberResourceAttributes: InputSetMemberResourceAttributes, observe?: 'events', reportProgress?: boolean): Observable>; + public setMemberResourceAttributes(inputSetMemberResourceAttributes: InputSetMemberResourceAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetMemberResourceAttributes === null || inputSetMemberResourceAttributes === undefined) { + throw new Error('Required parameter inputSetMemberResourceAttributes was null or undefined when calling setMemberResourceAttributes.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/m-r`, + inputSetMemberResourceAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Store the attributes associated with member and user (which we get from this member) if workWithUserAttributes is true. + * @param inputSetMemberWithUserAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setMemberWithUserAttributes(inputSetMemberWithUserAttributes: InputSetMemberWithUserAttributes, observe?: 'body', reportProgress?: boolean): Observable; + public setMemberWithUserAttributes(inputSetMemberWithUserAttributes: InputSetMemberWithUserAttributes, observe?: 'response', reportProgress?: boolean): Observable>; + public setMemberWithUserAttributes(inputSetMemberWithUserAttributes: InputSetMemberWithUserAttributes, observe?: 'events', reportProgress?: boolean): Observable>; + public setMemberWithUserAttributes(inputSetMemberWithUserAttributes: InputSetMemberWithUserAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetMemberWithUserAttributes === null || inputSetMemberWithUserAttributes === undefined) { + throw new Error('Required parameter inputSetMemberWithUserAttributes was null or undefined when calling setMemberWithUserAttributes.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/m-wu`, + inputSetMemberWithUserAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Sets Attribute for Resource. + * @param inputSetResourceAttribute + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setResourceAttribute(inputSetResourceAttribute: InputSetResourceAttribute, observe?: 'body', reportProgress?: boolean): Observable; + public setResourceAttribute(inputSetResourceAttribute: InputSetResourceAttribute, observe?: 'response', reportProgress?: boolean): Observable>; + public setResourceAttribute(inputSetResourceAttribute: InputSetResourceAttribute, observe?: 'events', reportProgress?: boolean): Observable>; + public setResourceAttribute(inputSetResourceAttribute: InputSetResourceAttribute, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetResourceAttribute === null || inputSetResourceAttribute === undefined) { + throw new Error('Required parameter inputSetResourceAttribute was null or undefined when calling setResourceAttribute.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttribute/resource`, + inputSetResourceAttribute, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Store the attributes associated with the resource. + * @param inputSetResourceAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setResourceAttributes(inputSetResourceAttributes: InputSetResourceAttributes, observe?: 'body', reportProgress?: boolean): Observable; + public setResourceAttributes(inputSetResourceAttributes: InputSetResourceAttributes, observe?: 'response', reportProgress?: boolean): Observable>; + public setResourceAttributes(inputSetResourceAttributes: InputSetResourceAttributes, observe?: 'events', reportProgress?: boolean): Observable>; + public setResourceAttributes(inputSetResourceAttributes: InputSetResourceAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetResourceAttributes === null || inputSetResourceAttributes === undefined) { + throw new Error('Required parameter inputSetResourceAttributes was null or undefined when calling setResourceAttributes.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/r`, + inputSetResourceAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Store the attributes associated with the group on resource. + * @param inputSetResourceGroupAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setResourceGroupAttributes(inputSetResourceGroupAttributes: InputSetResourceGroupAttributes, observe?: 'body', reportProgress?: boolean): Observable; + public setResourceGroupAttributes(inputSetResourceGroupAttributes: InputSetResourceGroupAttributes, observe?: 'response', reportProgress?: boolean): Observable>; + public setResourceGroupAttributes(inputSetResourceGroupAttributes: InputSetResourceGroupAttributes, observe?: 'events', reportProgress?: boolean): Observable>; + public setResourceGroupAttributes(inputSetResourceGroupAttributes: InputSetResourceGroupAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetResourceGroupAttributes === null || inputSetResourceGroupAttributes === undefined) { + throw new Error('Required parameter inputSetResourceGroupAttributes was null or undefined when calling setResourceGroupAttributes.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/r-g`, + inputSetResourceGroupAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Store the attributes associated with group and resource, if workWithUserAttributes is true then also from group itself. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). + * @param inputSetResourceGroupWithGroupAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setResourceGroupWithGroupAttributes(inputSetResourceGroupWithGroupAttributes: InputSetResourceGroupWithGroupAttributes, observe?: 'body', reportProgress?: boolean): Observable; + public setResourceGroupWithGroupAttributes(inputSetResourceGroupWithGroupAttributes: InputSetResourceGroupWithGroupAttributes, observe?: 'response', reportProgress?: boolean): Observable>; + public setResourceGroupWithGroupAttributes(inputSetResourceGroupWithGroupAttributes: InputSetResourceGroupWithGroupAttributes, observe?: 'events', reportProgress?: boolean): Observable>; + public setResourceGroupWithGroupAttributes(inputSetResourceGroupWithGroupAttributes: InputSetResourceGroupWithGroupAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetResourceGroupWithGroupAttributes === null || inputSetResourceGroupWithGroupAttributes === undefined) { + throw new Error('Required parameter inputSetResourceGroupWithGroupAttributes was null or undefined when calling setResourceGroupWithGroupAttributes.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/r-g-wg`, + inputSetResourceGroupWithGroupAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Sets Attribute for User. + * @param inputSetUserAttribute + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setUserAttribute(inputSetUserAttribute: InputSetUserAttribute, observe?: 'body', reportProgress?: boolean): Observable; + public setUserAttribute(inputSetUserAttribute: InputSetUserAttribute, observe?: 'response', reportProgress?: boolean): Observable>; + public setUserAttribute(inputSetUserAttribute: InputSetUserAttribute, observe?: 'events', reportProgress?: boolean): Observable>; + public setUserAttribute(inputSetUserAttribute: InputSetUserAttribute, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetUserAttribute === null || inputSetUserAttribute === undefined) { + throw new Error('Required parameter inputSetUserAttribute was null or undefined when calling setUserAttribute.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttribute/user`, + inputSetUserAttribute, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Store the attributes associated with the user. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). + * @param inputSetUserAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setUserAttributes(inputSetUserAttributes: InputSetUserAttributes, observe?: 'body', reportProgress?: boolean): Observable; + public setUserAttributes(inputSetUserAttributes: InputSetUserAttributes, observe?: 'response', reportProgress?: boolean): Observable>; + public setUserAttributes(inputSetUserAttributes: InputSetUserAttributes, observe?: 'events', reportProgress?: boolean): Observable>; + public setUserAttributes(inputSetUserAttributes: InputSetUserAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetUserAttributes === null || inputSetUserAttributes === undefined) { + throw new Error('Required parameter inputSetUserAttributes was null or undefined when calling setUserAttributes.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/u`, + inputSetUserAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Sets Attribute for UserExtSource. + * @param inputSetUserExtSourceAttribute + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setUserExtSourceAttribute(inputSetUserExtSourceAttribute: InputSetUserExtSourceAttribute, observe?: 'body', reportProgress?: boolean): Observable; + public setUserExtSourceAttribute(inputSetUserExtSourceAttribute: InputSetUserExtSourceAttribute, observe?: 'response', reportProgress?: boolean): Observable>; + public setUserExtSourceAttribute(inputSetUserExtSourceAttribute: InputSetUserExtSourceAttribute, observe?: 'events', reportProgress?: boolean): Observable>; + public setUserExtSourceAttribute(inputSetUserExtSourceAttribute: InputSetUserExtSourceAttribute, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetUserExtSourceAttribute === null || inputSetUserExtSourceAttribute === undefined) { + throw new Error('Required parameter inputSetUserExtSourceAttribute was null or undefined when calling setUserExtSourceAttribute.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttribute/userExtSource`, + inputSetUserExtSourceAttribute, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Store the attributes associated with the UserExtSource. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). + * @param inputSetUserExtSourceAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setUserExtSourceAttributes(inputSetUserExtSourceAttributes: InputSetUserExtSourceAttributes, observe?: 'body', reportProgress?: boolean): Observable; + public setUserExtSourceAttributes(inputSetUserExtSourceAttributes: InputSetUserExtSourceAttributes, observe?: 'response', reportProgress?: boolean): Observable>; + public setUserExtSourceAttributes(inputSetUserExtSourceAttributes: InputSetUserExtSourceAttributes, observe?: 'events', reportProgress?: boolean): Observable>; + public setUserExtSourceAttributes(inputSetUserExtSourceAttributes: InputSetUserExtSourceAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetUserExtSourceAttributes === null || inputSetUserExtSourceAttributes === undefined) { + throw new Error('Required parameter inputSetUserExtSourceAttributes was null or undefined when calling setUserExtSourceAttributes.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/ues`, + inputSetUserExtSourceAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Sets Attribute for User and Facility. + * @param inputSetUserFacilityAttribute + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setUserFacilityAttribute(inputSetUserFacilityAttribute: InputSetUserFacilityAttribute, observe?: 'body', reportProgress?: boolean): Observable; + public setUserFacilityAttribute(inputSetUserFacilityAttribute: InputSetUserFacilityAttribute, observe?: 'response', reportProgress?: boolean): Observable>; + public setUserFacilityAttribute(inputSetUserFacilityAttribute: InputSetUserFacilityAttribute, observe?: 'events', reportProgress?: boolean): Observable>; + public setUserFacilityAttribute(inputSetUserFacilityAttribute: InputSetUserFacilityAttribute, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetUserFacilityAttribute === null || inputSetUserFacilityAttribute === undefined) { + throw new Error('Required parameter inputSetUserFacilityAttribute was null or undefined when calling setUserFacilityAttribute.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttribute/facility-user`, + inputSetUserFacilityAttribute, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Sets Attributes for User and Facility. + * @param inputSetUserFacilityAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setUserFacilityAttributes(inputSetUserFacilityAttributes: InputSetUserFacilityAttributes, observe?: 'body', reportProgress?: boolean): Observable; + public setUserFacilityAttributes(inputSetUserFacilityAttributes: InputSetUserFacilityAttributes, observe?: 'response', reportProgress?: boolean): Observable>; + public setUserFacilityAttributes(inputSetUserFacilityAttributes: InputSetUserFacilityAttributes, observe?: 'events', reportProgress?: boolean): Observable>; + public setUserFacilityAttributes(inputSetUserFacilityAttributes: InputSetUserFacilityAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetUserFacilityAttributes === null || inputSetUserFacilityAttributes === undefined) { + throw new Error('Required parameter inputSetUserFacilityAttributes was null or undefined when calling setUserFacilityAttributes.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/facility-user`, + inputSetUserFacilityAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Sets Attribute for Vo. + * @param inputSetVoAttribute + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setVoAttribute(inputSetVoAttribute: InputSetVoAttribute, observe?: 'body', reportProgress?: boolean): Observable; + public setVoAttribute(inputSetVoAttribute: InputSetVoAttribute, observe?: 'response', reportProgress?: boolean): Observable>; + public setVoAttribute(inputSetVoAttribute: InputSetVoAttribute, observe?: 'events', reportProgress?: boolean): Observable>; + public setVoAttribute(inputSetVoAttribute: InputSetVoAttribute, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetVoAttribute === null || inputSetVoAttribute === undefined) { + throw new Error('Required parameter inputSetVoAttribute was null or undefined when calling setVoAttribute.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttribute/vo`, + inputSetVoAttribute, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Store the attributes associated with the vo. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). + * @param inputSetVoAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setVoAttributes(inputSetVoAttributes: InputSetVoAttributes, observe?: 'body', reportProgress?: boolean): Observable; + public setVoAttributes(inputSetVoAttributes: InputSetVoAttributes, observe?: 'response', reportProgress?: boolean): Observable>; + public setVoAttributes(inputSetVoAttributes: InputSetVoAttributes, observe?: 'events', reportProgress?: boolean): Observable>; + public setVoAttributes(inputSetVoAttributes: InputSetVoAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetVoAttributes === null || inputSetVoAttributes === undefined) { + throw new Error('Required parameter inputSetVoAttributes was null or undefined when calling setVoAttributes.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/vo`, + inputSetVoAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Updates AttributeDefinition in Perun based on provided object. Update is done on AttributeDefinition selected by its <code>id</code>. + * @param inputAttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateAttributeDefinition(inputAttributeDefinition: InputAttributeDefinition, observe?: 'body', reportProgress?: boolean): Observable; + public updateAttributeDefinition(inputAttributeDefinition: InputAttributeDefinition, observe?: 'response', reportProgress?: boolean): Observable>; + public updateAttributeDefinition(inputAttributeDefinition: InputAttributeDefinition, observe?: 'events', reportProgress?: boolean): Observable>; + public updateAttributeDefinition(inputAttributeDefinition: InputAttributeDefinition, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputAttributeDefinition === null || inputAttributeDefinition === undefined) { + throw new Error('Required parameter inputAttributeDefinition was null or undefined when calling updateAttributeDefinition.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/updateAttributeDefinition`, + inputAttributeDefinition, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + } diff --git a/libs/perun/openapi/src/lib/api/auditMessagesManager.service.ts b/libs/perun/openapi/src/lib/api/auditMessagesManager.service.ts index 04e0271b8..499528103 100644 --- a/libs/perun/openapi/src/lib/api/auditMessagesManager.service.ts +++ b/libs/perun/openapi/src/lib/api/auditMessagesManager.service.ts @@ -11,792 +11,606 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { AuditMessage } from '../model/auditMessage'; import { InputGetMessagesPage } from '../model/inputGetMessagesPage'; import { PaginatedAuditMessages } from '../model/paginatedAuditMessages'; import { PerunException } from '../model/perunException'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class AuditMessagesManagerService { - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration - ) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - /** - * Log arbitrary auditer message/event to the audit log. - * @param msg Message to be logged - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public auditMessagesManagerLog( - msg: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public auditMessagesManagerLog( - msg: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public auditMessagesManagerLog( - msg: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public auditMessagesManagerLog( - msg: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (msg === null || msg === undefined) { - throw new Error( - 'Required parameter msg was null or undefined when calling auditMessagesManagerLog.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (msg !== undefined && msg !== null) { - queryParameters = queryParameters.set('msg', msg); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/auditMessagesManager/log`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Creates new auditer consumer with last processed id which equals current auditer log max id. - * @param consumerName - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createAuditerConsumer( - consumerName: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public createAuditerConsumer( - consumerName: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public createAuditerConsumer( - consumerName: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public createAuditerConsumer( - consumerName: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (consumerName === null || consumerName === undefined) { - throw new Error( - 'Required parameter consumerName was null or undefined when calling createAuditerConsumer.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (consumerName !== undefined && consumerName !== null) { - queryParameters = queryParameters.set('consumerName', consumerName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/auditMessagesManager/createAuditerConsumer`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all auditer consumers as a map with key=value pairs like String(name)=Integer(lastProcessedId). - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllAuditerConsumers( - observe?: 'body', - reportProgress?: boolean - ): Observable<{ [key: string]: number }>; - public getAllAuditerConsumers( - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getAllAuditerConsumers( - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getAllAuditerConsumers( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get<{ [key: string]: number }>( - `${this.configuration.basePath}/json/auditMessagesManager/getAllAuditerConsumers`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get count of all messages stored in auditer logs. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAuditerMessagesCount(observe?: 'body', reportProgress?: boolean): Observable; - public getAuditerMessagesCount( - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getAuditerMessagesCount( - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getAuditerMessagesCount( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/auditMessagesManager/getAuditerMessagesCount`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get ID of last (newest) message in auditer logs. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getLastMessageId(observe?: 'body', reportProgress?: boolean): Observable; - public getLastMessageId( - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getLastMessageId( - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getLastMessageId(observe: any = 'body', reportProgress: boolean = false): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/auditMessagesManager/getLastMessageId`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns 100 newest audit messages from audit log. If there is a less messages than 100, then all of them are returned OR Returns exact number of newest audit messages defined by \'count\' param (disregarding message IDs). If there is less messages present, then all of them are returned.. - * @param count Messages limit - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMessages( - count?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getMessages( - count?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getMessages( - count?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getMessages( - count?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (count !== undefined && count !== null) { - queryParameters = queryParameters.set('count', count); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/auditMessagesManager/getMessages`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns all messages with IDs within the range from max(ID) to (max(ID)-count), where number of returned messages is equal or less than \'count\' param, because some IDs could be skipped in the sequence. - * @param count Number of IDs to subtract from max_id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMessagesByCount( - count: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getMessagesByCount( - count: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getMessagesByCount( - count: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getMessagesByCount( - count: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (count === null || count === undefined) { - throw new Error( - 'Required parameter count was null or undefined when calling getMessagesByCount.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (count !== undefined && count !== null) { - queryParameters = queryParameters.set('count', count); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/auditMessagesManager/getMessagesByCount`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get page of audit messages. Total count is only estimated. - * @param inputGetMessagesPage - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMessagesPage( - inputGetMessagesPage: InputGetMessagesPage, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getMessagesPage( - inputGetMessagesPage: InputGetMessagesPage, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getMessagesPage( - inputGetMessagesPage: InputGetMessagesPage, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getMessagesPage( - inputGetMessagesPage: InputGetMessagesPage, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputGetMessagesPage === null || inputGetMessagesPage === undefined) { - throw new Error( - 'Required parameter inputGetMessagesPage was null or undefined when calling getMessagesPage.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/auditMessagesManager/getMessagesPage`, - inputGetMessagesPage, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns list of AuditMessages from audit log with IDs > lastProcessedId for registered auditer consumer specified by consumerName param. - * @param consumerName - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public pollConsumerMessages( - consumerName: string, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public pollConsumerMessages( - consumerName: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public pollConsumerMessages( - consumerName: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public pollConsumerMessages( - consumerName: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (consumerName === null || consumerName === undefined) { - throw new Error( - 'Required parameter consumerName was null or undefined when calling pollConsumerMessages.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (consumerName !== undefined && consumerName !== null) { - queryParameters = queryParameters.set('consumerName', consumerName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/auditMessagesManager/pollConsumerMessages`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Set ID of last processed message for specified consumer. - * @param consumerName - * @param lastProcessedId id of message to what consumer will be set - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setLastProcessedId( - consumerName: string, - lastProcessedId: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setLastProcessedId( - consumerName: string, - lastProcessedId: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setLastProcessedId( - consumerName: string, - lastProcessedId: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setLastProcessedId( - consumerName: string, - lastProcessedId: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (consumerName === null || consumerName === undefined) { - throw new Error( - 'Required parameter consumerName was null or undefined when calling setLastProcessedId.' - ); - } - if (lastProcessedId === null || lastProcessedId === undefined) { - throw new Error( - 'Required parameter lastProcessedId was null or undefined when calling setLastProcessedId.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (consumerName !== undefined && consumerName !== null) { - queryParameters = queryParameters.set('consumerName', consumerName); - } - if (lastProcessedId !== undefined && lastProcessedId !== null) { - queryParameters = queryParameters.set('lastProcessedId', lastProcessedId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + + + /** + * Log arbitrary auditer message/event to the audit log. + * @param msg Message to be logged + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public auditMessagesManagerLog(msg: string, observe?: 'body', reportProgress?: boolean): Observable; + public auditMessagesManagerLog(msg: string, observe?: 'response', reportProgress?: boolean): Observable>; + public auditMessagesManagerLog(msg: string, observe?: 'events', reportProgress?: boolean): Observable>; + public auditMessagesManagerLog(msg: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (msg === null || msg === undefined) { + throw new Error('Required parameter msg was null or undefined when calling auditMessagesManagerLog.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (msg !== undefined && msg !== null) { + queryParameters = queryParameters.set('msg', msg); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/auditMessagesManager/log`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Creates new auditer consumer with last processed id which equals current auditer log max id. + * @param consumerName + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createAuditerConsumer(consumerName: string, observe?: 'body', reportProgress?: boolean): Observable; + public createAuditerConsumer(consumerName: string, observe?: 'response', reportProgress?: boolean): Observable>; + public createAuditerConsumer(consumerName: string, observe?: 'events', reportProgress?: boolean): Observable>; + public createAuditerConsumer(consumerName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (consumerName === null || consumerName === undefined) { + throw new Error('Required parameter consumerName was null or undefined when calling createAuditerConsumer.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (consumerName !== undefined && consumerName !== null) { + queryParameters = queryParameters.set('consumerName', consumerName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/auditMessagesManager/createAuditerConsumer`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all auditer consumers as a map with key=value pairs like String(name)=Integer(lastProcessedId). + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllAuditerConsumers(observe?: 'body', reportProgress?: boolean): Observable<{ [key: string]: number; }>; + public getAllAuditerConsumers(observe?: 'response', reportProgress?: boolean): Observable>; + public getAllAuditerConsumers(observe?: 'events', reportProgress?: boolean): Observable>; + public getAllAuditerConsumers(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}/json/auditMessagesManager/getAllAuditerConsumers`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get count of all messages stored in auditer logs. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAuditerMessagesCount(observe?: 'body', reportProgress?: boolean): Observable; + public getAuditerMessagesCount(observe?: 'response', reportProgress?: boolean): Observable>; + public getAuditerMessagesCount(observe?: 'events', reportProgress?: boolean): Observable>; + public getAuditerMessagesCount(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/auditMessagesManager/getAuditerMessagesCount`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get ID of last (newest) message in auditer logs. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getLastMessageId(observe?: 'body', reportProgress?: boolean): Observable; + public getLastMessageId(observe?: 'response', reportProgress?: boolean): Observable>; + public getLastMessageId(observe?: 'events', reportProgress?: boolean): Observable>; + public getLastMessageId(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/auditMessagesManager/getLastMessageId`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns 100 newest audit messages from audit log. If there is a less messages than 100, then all of them are returned OR Returns exact number of newest audit messages defined by \'count\' param (disregarding message IDs). If there is less messages present, then all of them are returned.. + * @param count Messages limit + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMessages(count?: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getMessages(count?: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getMessages(count?: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getMessages(count?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (count !== undefined && count !== null) { + queryParameters = queryParameters.set('count', count); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/auditMessagesManager/getMessages`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns all messages with IDs within the range from max(ID) to (max(ID)-count), where number of returned messages is equal or less than \'count\' param, because some IDs could be skipped in the sequence. + * @param count Number of IDs to subtract from max_id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMessagesByCount(count: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getMessagesByCount(count: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getMessagesByCount(count: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getMessagesByCount(count: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (count === null || count === undefined) { + throw new Error('Required parameter count was null or undefined when calling getMessagesByCount.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (count !== undefined && count !== null) { + queryParameters = queryParameters.set('count', count); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/auditMessagesManager/getMessagesByCount`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get page of audit messages. Total count is only estimated. + * @param inputGetMessagesPage + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMessagesPage(inputGetMessagesPage: InputGetMessagesPage, observe?: 'body', reportProgress?: boolean): Observable; + public getMessagesPage(inputGetMessagesPage: InputGetMessagesPage, observe?: 'response', reportProgress?: boolean): Observable>; + public getMessagesPage(inputGetMessagesPage: InputGetMessagesPage, observe?: 'events', reportProgress?: boolean): Observable>; + public getMessagesPage(inputGetMessagesPage: InputGetMessagesPage, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputGetMessagesPage === null || inputGetMessagesPage === undefined) { + throw new Error('Required parameter inputGetMessagesPage was null or undefined when calling getMessagesPage.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/auditMessagesManager/getMessagesPage`, + inputGetMessagesPage, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns list of AuditMessages from audit log with IDs > lastProcessedId for registered auditer consumer specified by consumerName param. + * @param consumerName + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public pollConsumerMessages(consumerName: string, observe?: 'body', reportProgress?: boolean): Observable>; + public pollConsumerMessages(consumerName: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public pollConsumerMessages(consumerName: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public pollConsumerMessages(consumerName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (consumerName === null || consumerName === undefined) { + throw new Error('Required parameter consumerName was null or undefined when calling pollConsumerMessages.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (consumerName !== undefined && consumerName !== null) { + queryParameters = queryParameters.set('consumerName', consumerName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/auditMessagesManager/pollConsumerMessages`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Set ID of last processed message for specified consumer. + * @param consumerName + * @param lastProcessedId id of message to what consumer will be set + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setLastProcessedId(consumerName: string, lastProcessedId: number, observe?: 'body', reportProgress?: boolean): Observable; + public setLastProcessedId(consumerName: string, lastProcessedId: number, observe?: 'response', reportProgress?: boolean): Observable>; + public setLastProcessedId(consumerName: string, lastProcessedId: number, observe?: 'events', reportProgress?: boolean): Observable>; + public setLastProcessedId(consumerName: string, lastProcessedId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (consumerName === null || consumerName === undefined) { + throw new Error('Required parameter consumerName was null or undefined when calling setLastProcessedId.'); + } + if (lastProcessedId === null || lastProcessedId === undefined) { + throw new Error('Required parameter lastProcessedId was null or undefined when calling setLastProcessedId.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (consumerName !== undefined && consumerName !== null) { + queryParameters = queryParameters.set('consumerName', consumerName); + } + if (lastProcessedId !== undefined && lastProcessedId !== null) { + queryParameters = queryParameters.set('lastProcessedId', lastProcessedId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/auditMessagesManager/setLastProcessedId`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/auditMessagesManager/setLastProcessedId`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } } diff --git a/libs/perun/openapi/src/lib/api/authzResolver.service.ts b/libs/perun/openapi/src/lib/api/authzResolver.service.ts index 8d49954d8..808c56478 100644 --- a/libs/perun/openapi/src/lib/api/authzResolver.service.ts +++ b/libs/perun/openapi/src/lib/api/authzResolver.service.ts @@ -11,17 +11,11 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { Facility } from '../model/facility'; import { Group } from '../model/group'; @@ -40,2141 +34,1610 @@ import { UnsetRoleWithUserComplementaryObject } from '../model/unsetRoleWithUser import { User } from '../model/user'; import { Vo } from '../model/vo'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class AuthzResolverService { - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration - ) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - /** - * Return all loaded perun policies. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllPolicies(observe?: 'body', reportProgress?: boolean): Observable>; - public getAllPolicies( - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllPolicies( - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAllPolicies(observe: any = 'body', reportProgress: boolean = false): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/authzResolver/getAllPolicies`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Return all loaded roles management rules. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllRolesManagementRules( - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAllRolesManagementRules( - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllRolesManagementRules( - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAllRolesManagementRules( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/authzResolver/getAllRolesManagementRules`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all groups of managers (authorizedGroups) for complementaryObject and role - * @param role - * @param complementaryObjectId Property id of complementaryObject to get managers for - * @param complementaryObjectName Property beanName of complementaryObject, meaning object type (Vo | Group | Facility | ... ) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAuthzAdminGroups( - role: string, - complementaryObjectId: number, - complementaryObjectName: string, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAuthzAdminGroups( - role: string, - complementaryObjectId: number, - complementaryObjectName: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAuthzAdminGroups( - role: string, - complementaryObjectId: number, - complementaryObjectName: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAuthzAdminGroups( - role: string, - complementaryObjectId: number, - complementaryObjectName: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (role === null || role === undefined) { - throw new Error( - 'Required parameter role was null or undefined when calling getAuthzAdminGroups.' - ); - } - if (complementaryObjectId === null || complementaryObjectId === undefined) { - throw new Error( - 'Required parameter complementaryObjectId was null or undefined when calling getAuthzAdminGroups.' - ); - } - if (complementaryObjectName === null || complementaryObjectName === undefined) { - throw new Error( - 'Required parameter complementaryObjectName was null or undefined when calling getAuthzAdminGroups.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (role !== undefined && role !== null) { - queryParameters = queryParameters.set('role', role); - } - if (complementaryObjectId !== undefined && complementaryObjectId !== null) { - queryParameters = queryParameters.set('complementaryObjectId', complementaryObjectId); - } - if (complementaryObjectName !== undefined && complementaryObjectName !== null) { - queryParameters = queryParameters.set( - 'complementaryObjectName', - complementaryObjectName - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/authzResolver/getAdminGroups`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets all rich admins - * Returns all managers for complementaryObject and role with specified attributes. - * @param role - * @param complementaryObjectId Property id of complementaryObject to get managers for - * @param complementaryObjectName Property beanName of complementaryObject, meaning object type (Vo | Group | Facility | ... ) - * @param specificAttributes list of specified attributes which are needed in object richUser - * @param allUserAttributes When true, do not specify attributes through list and return them all in objects richUser. Ignoring list of specific attributes - * @param onlyDirectAdmins When true, return only direct users of the complementary object for role with specific attributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAuthzRichAdmins( - role: string, - complementaryObjectId: number, - complementaryObjectName: string, - specificAttributes: Array, - allUserAttributes?: boolean, - onlyDirectAdmins?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAuthzRichAdmins( - role: string, - complementaryObjectId: number, - complementaryObjectName: string, - specificAttributes: Array, - allUserAttributes?: boolean, - onlyDirectAdmins?: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAuthzRichAdmins( - role: string, - complementaryObjectId: number, - complementaryObjectName: string, - specificAttributes: Array, - allUserAttributes?: boolean, - onlyDirectAdmins?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAuthzRichAdmins( - role: string, - complementaryObjectId: number, - complementaryObjectName: string, - specificAttributes: Array, - allUserAttributes?: boolean, - onlyDirectAdmins?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (role === null || role === undefined) { - throw new Error( - 'Required parameter role was null or undefined when calling getAuthzRichAdmins.' - ); - } - if (complementaryObjectId === null || complementaryObjectId === undefined) { - throw new Error( - 'Required parameter complementaryObjectId was null or undefined when calling getAuthzRichAdmins.' - ); - } - if (complementaryObjectName === null || complementaryObjectName === undefined) { - throw new Error( - 'Required parameter complementaryObjectName was null or undefined when calling getAuthzRichAdmins.' - ); - } - if (specificAttributes === null || specificAttributes === undefined) { - throw new Error( - 'Required parameter specificAttributes was null or undefined when calling getAuthzRichAdmins.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (role !== undefined && role !== null) { - queryParameters = queryParameters.set('role', role); - } - if (complementaryObjectId !== undefined && complementaryObjectId !== null) { - queryParameters = queryParameters.set('complementaryObjectId', complementaryObjectId); - } - if (complementaryObjectName !== undefined && complementaryObjectName !== null) { - queryParameters = queryParameters.set( - 'complementaryObjectName', - complementaryObjectName - ); - } - if (specificAttributes) { - specificAttributes.forEach((element) => { - queryParameters = queryParameters.append('specificAttributes', element); - }); - } - if (allUserAttributes !== undefined && allUserAttributes !== null) { - queryParameters = queryParameters.set('allUserAttributes', allUserAttributes); - } - if (onlyDirectAdmins !== undefined && onlyDirectAdmins !== null) { - queryParameters = queryParameters.set('onlyDirectAdmins', onlyDirectAdmins); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/authzResolver/getRichAdmins`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all Facilities where the given user (principal if user not sent) has set one of the given roles or the given user is a member of an authorized group with such roles. - * @param roles list of role names List<String> - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilitiesWhereUserIsInRoles( - roles: Array, - user?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getFacilitiesWhereUserIsInRoles( - roles: Array, - user?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getFacilitiesWhereUserIsInRoles( - roles: Array, - user?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getFacilitiesWhereUserIsInRoles( - roles: Array, - user?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (roles === null || roles === undefined) { - throw new Error( - 'Required parameter roles was null or undefined when calling getFacilitiesWhereUserIsInRoles.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (roles) { - roles.forEach((element) => { - queryParameters = queryParameters.append('roles[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/authzResolver/getFacilitiesWhereUserIsInRoles`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns list of group\'s role names. Perun system uses role names in the upper case format. However, for now, they are converted to the lower case format because of the compatibility with external systems. - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupRoleNames( - group: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getGroupRoleNames( - group: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getGroupRoleNames( - group: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getGroupRoleNames( - group: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getGroupRoleNames.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/authzResolver/getGroupRoleNames`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns all roles as an AuthzRoles object for a given group. - * @param groupId id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupRoles( - groupId: number, - observe?: 'body', - reportProgress?: boolean - ): Observable<{ [key: string]: { [key: string]: Array } }>; - public getGroupRoles( - groupId: number, - observe?: 'response', - reportProgress?: boolean - ): Observable } }>>; - public getGroupRoles( - groupId: number, - observe?: 'events', - reportProgress?: boolean - ): Observable } }>>; - public getGroupRoles( - groupId: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (groupId === null || groupId === undefined) { - throw new Error( - 'Required parameter groupId was null or undefined when calling getGroupRoles.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (groupId !== undefined && groupId !== null) { - queryParameters = queryParameters.set('groupId', groupId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get<{ [key: string]: { [key: string]: Array } }>( - `${this.configuration.basePath}/urlinjsonout/authzResolver/getGroupRoles`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all Groups where the given user (principal if user not sent) has set one of the given roles or the given user is a member of an authorized group with such roles. - * @param roles list of role names List<String> - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupsWhereUserIsInRoles( - roles: Array, - user?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getGroupsWhereUserIsInRoles( - roles: Array, - user?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getGroupsWhereUserIsInRoles( - roles: Array, - user?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getGroupsWhereUserIsInRoles( - roles: Array, - user?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (roles === null || roles === undefined) { - throw new Error( - 'Required parameter roles was null or undefined when calling getGroupsWhereUserIsInRoles.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (roles) { - roles.forEach((element) => { - queryParameters = queryParameters.append('roles[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/authzResolver/getGroupsWhereUserIsInRoles`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns User which is associated with credentials used to log-in to Perun. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getLoggedUser(observe?: 'body', reportProgress?: boolean): Observable; - public getLoggedUser( - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getLoggedUser(observe?: 'events', reportProgress?: boolean): Observable>; - public getLoggedUser(observe: any = 'body', reportProgress: boolean = false): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/authzResolver/getLoggedUser`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all Members where the given user (principal if user not sent) has set one of the given roles or the given user is a member of an authorized group with such roles. - * @param roles list of role names List<String> - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMembersWhereUserIsInRoles( - roles: Array, - user?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getMembersWhereUserIsInRoles( - roles: Array, - user?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getMembersWhereUserIsInRoles( - roles: Array, - user?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getMembersWhereUserIsInRoles( - roles: Array, - user?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (roles === null || roles === undefined) { - throw new Error( - 'Required parameter roles was null or undefined when calling getMembersWhereUserIsInRoles.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (roles) { - roles.forEach((element) => { - queryParameters = queryParameters.append('roles[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/authzResolver/getMembersWhereUserIsInRoles`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets current user - * Returns object representing the currently authenticated user. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getPerunPrincipal(observe?: 'body', reportProgress?: boolean): Observable; - public getPerunPrincipal( - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getPerunPrincipal( - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getPerunPrincipal( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/authzResolver/getPerunPrincipal`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns list of caller\'s role names. Perun system uses role names in the upper case format. However, for now, they are converted to the lower case format because of the compatibility with external systems. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getPrincipalRoleNames( - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getPrincipalRoleNames( - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getPrincipalRoleNames( - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getPrincipalRoleNames( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/authzResolver/getPrincipalRoleNames`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all Resources where the given user (principal if user not sent) has set one of the given roles or the given user is a member of an authorized group with such roles. - * @param roles list of role names List<String> - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourcesWhereUserIsInRoles( - roles: Array, - user?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getResourcesWhereUserIsInRoles( - roles: Array, - user?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getResourcesWhereUserIsInRoles( - roles: Array, - user?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getResourcesWhereUserIsInRoles( - roles: Array, - user?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (roles === null || roles === undefined) { - throw new Error( - 'Required parameter roles was null or undefined when calling getResourcesWhereUserIsInRoles.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (roles) { - roles.forEach((element) => { - queryParameters = queryParameters.append('roles[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/authzResolver/getResourcesWhereUserIsInRoles`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all SecurityTeams where the given user (principal if user not sent) has set one of the given roles or the given user is a member of an authorized group with such roles. - * @param roles list of role names List<String> - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getSecurityTeamsWhereUserIsInRoles( - roles: Array, - user?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getSecurityTeamsWhereUserIsInRoles( - roles: Array, - user?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getSecurityTeamsWhereUserIsInRoles( - roles: Array, - user?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getSecurityTeamsWhereUserIsInRoles( - roles: Array, - user?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (roles === null || roles === undefined) { - throw new Error( - 'Required parameter roles was null or undefined when calling getSecurityTeamsWhereUserIsInRoles.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (roles) { - roles.forEach((element) => { - queryParameters = queryParameters.append('roles[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/authzResolver/getSecurityTeamsWhereUserIsInRoles`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns list of user\'s role names. Perun system uses role names in the upper case format. However, for now, they are converted to the lower case format because of the compatibility with external systems. - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserRoleNames( - user: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getUserRoleNames( - user: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getUserRoleNames( - user: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getUserRoleNames( - user: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling getUserRoleNames.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/authzResolver/getUserRoleNames`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns all roles as an AuthzRoles object for a given user. - * @param userId id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserRoles( - userId: number, - observe?: 'body', - reportProgress?: boolean - ): Observable<{ [key: string]: { [key: string]: Array } }>; - public getUserRoles( - userId: number, - observe?: 'response', - reportProgress?: boolean - ): Observable } }>>; - public getUserRoles( - userId: number, - observe?: 'events', - reportProgress?: boolean - ): Observable } }>>; - public getUserRoles( - userId: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (userId === null || userId === undefined) { - throw new Error('Required parameter userId was null or undefined when calling getUserRoles.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (userId !== undefined && userId !== null) { - queryParameters = queryParameters.set('userId', userId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get<{ [key: string]: { [key: string]: Array } }>( - `${this.configuration.basePath}/json/authzResolver/getUserRoles`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all Vos where the given user (principal if user not sent) has set one of the given roles or the given user is a member of an authorized group with such roles. - * @param roles list of role names List<String> - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVosWhereUserIsInRoles( - roles: Array, - user?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getVosWhereUserIsInRoles( - roles: Array, - user?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getVosWhereUserIsInRoles( - roles: Array, - user?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getVosWhereUserIsInRoles( - roles: Array, - user?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (roles === null || roles === undefined) { - throw new Error( - 'Required parameter roles was null or undefined when calling getVosWhereUserIsInRoles.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (roles) { - roles.forEach((element) => { - queryParameters = queryParameters.append('roles[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/authzResolver/getVosWhereUserIsInRoles`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns 1 if User has Facility manager role (FACILITYADMIN) or for specific Facility defined by id - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public isFacilityAdmin( - facility?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public isFacilityAdmin( - facility?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public isFacilityAdmin( - facility?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public isFacilityAdmin( - facility?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/urlinjsonout/authzResolver/isFacilityAdmin`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns 1 if User has Group manager role (GROUPADMIN) or for specific Group defined by id - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public isGroupAdmin( - group?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public isGroupAdmin( - group?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public isGroupAdmin( - group?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public isGroupAdmin( - group?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/urlinjsonout/authzResolver/isGroupAdmin`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns 1 if User has Perun admin role (perunadmin). - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public isPerunAdmin(observe?: 'body', reportProgress?: boolean): Observable; - public isPerunAdmin( - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public isPerunAdmin(observe?: 'events', reportProgress?: boolean): Observable>; - public isPerunAdmin(observe: any = 'body', reportProgress: boolean = false): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/authzResolver/isPerunAdmin`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns 1 if User has VO manager role (VOADMIN) or for specific VO defined by id - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public isVoAdmin(vo?: number, observe?: 'body', reportProgress?: boolean): Observable; - public isVoAdmin( - vo?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public isVoAdmin( - vo?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public isVoAdmin( - vo?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/urlinjsonout/authzResolver/isVoAdmin`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns \"OK\" string. Helper method for GUI check if connection is alive. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public keepAlive(observe?: 'body', reportProgress?: boolean): Observable; - public keepAlive( - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public keepAlive(observe?: 'events', reportProgress?: boolean): Observable>; - public keepAlive(observe: any = 'body', reportProgress: boolean = false): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/authzResolver/keepAlive`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Load perun roles and policies from the configuration file perun-roles.yml. Roles are loaded to the database and policies are loaded to the PerunPoliciesContainer. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public loadAuthorizationComponents(observe?: 'body', reportProgress?: boolean): Observable; - public loadAuthorizationComponents( - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public loadAuthorizationComponents( - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public loadAuthorizationComponents( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/authzResolver/loadAuthorizationComponents`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Set role for authorizedGroup and complementaryObject - * @param setRoleWithGroupComplementaryObject - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setRoleWithGroupComplementaryObject( - setRoleWithGroupComplementaryObject: SetRoleWithGroupComplementaryObject, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setRoleWithGroupComplementaryObject( - setRoleWithGroupComplementaryObject: SetRoleWithGroupComplementaryObject, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setRoleWithGroupComplementaryObject( - setRoleWithGroupComplementaryObject: SetRoleWithGroupComplementaryObject, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setRoleWithGroupComplementaryObject( - setRoleWithGroupComplementaryObject: SetRoleWithGroupComplementaryObject, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if ( - setRoleWithGroupComplementaryObject === null || - setRoleWithGroupComplementaryObject === undefined - ) { - throw new Error( - 'Required parameter setRoleWithGroupComplementaryObject was null or undefined when calling setRoleWithGroupComplementaryObject.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/authzResolver/setRole/g-co`, - setRoleWithGroupComplementaryObject, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Set role for user and complementaryObject - * @param setRoleWithUserComplementaryObject - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setRoleWithUserComplementaryObject( - setRoleWithUserComplementaryObject: SetRoleWithUserComplementaryObject, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setRoleWithUserComplementaryObject( - setRoleWithUserComplementaryObject: SetRoleWithUserComplementaryObject, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setRoleWithUserComplementaryObject( - setRoleWithUserComplementaryObject: SetRoleWithUserComplementaryObject, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setRoleWithUserComplementaryObject( - setRoleWithUserComplementaryObject: SetRoleWithUserComplementaryObject, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if ( - setRoleWithUserComplementaryObject === null || - setRoleWithUserComplementaryObject === undefined - ) { - throw new Error( - 'Required parameter setRoleWithUserComplementaryObject was null or undefined when calling setRoleWithUserComplementaryObject.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/authzResolver/setRole/u-co`, - setRoleWithUserComplementaryObject, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Unset role for authorizedGroup and complementaryObject - * @param unsetRoleWithGroupComplementaryObject - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public unsetRoleWithGroupComplementaryObject( - unsetRoleWithGroupComplementaryObject: UnsetRoleWithGroupComplementaryObject, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public unsetRoleWithGroupComplementaryObject( - unsetRoleWithGroupComplementaryObject: UnsetRoleWithGroupComplementaryObject, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public unsetRoleWithGroupComplementaryObject( - unsetRoleWithGroupComplementaryObject: UnsetRoleWithGroupComplementaryObject, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public unsetRoleWithGroupComplementaryObject( - unsetRoleWithGroupComplementaryObject: UnsetRoleWithGroupComplementaryObject, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if ( - unsetRoleWithGroupComplementaryObject === null || - unsetRoleWithGroupComplementaryObject === undefined - ) { - throw new Error( - 'Required parameter unsetRoleWithGroupComplementaryObject was null or undefined when calling unsetRoleWithGroupComplementaryObject.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/authzResolver/unsetRole/g-co`, - unsetRoleWithGroupComplementaryObject, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Unset role for user and complementaryObject - * @param unsetRoleWithUserComplementaryObject - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public unsetRoleWithUserComplementaryObject( - unsetRoleWithUserComplementaryObject: UnsetRoleWithUserComplementaryObject, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public unsetRoleWithUserComplementaryObject( - unsetRoleWithUserComplementaryObject: UnsetRoleWithUserComplementaryObject, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public unsetRoleWithUserComplementaryObject( - unsetRoleWithUserComplementaryObject: UnsetRoleWithUserComplementaryObject, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public unsetRoleWithUserComplementaryObject( - unsetRoleWithUserComplementaryObject: UnsetRoleWithUserComplementaryObject, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if ( - unsetRoleWithUserComplementaryObject === null || - unsetRoleWithUserComplementaryObject === undefined - ) { - throw new Error( - 'Required parameter unsetRoleWithUserComplementaryObject was null or undefined when calling unsetRoleWithUserComplementaryObject.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + + + /** + * Return all loaded perun policies. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllPolicies(observe?: 'body', reportProgress?: boolean): Observable>; + public getAllPolicies(observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllPolicies(observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllPolicies(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/authzResolver/getAllPolicies`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Return all loaded roles management rules. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllRolesManagementRules(observe?: 'body', reportProgress?: boolean): Observable>; + public getAllRolesManagementRules(observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllRolesManagementRules(observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllRolesManagementRules(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/authzResolver/getAllRolesManagementRules`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all groups of managers (authorizedGroups) for complementaryObject and role + * @param role + * @param complementaryObjectId Property id of complementaryObject to get managers for + * @param complementaryObjectName Property beanName of complementaryObject, meaning object type (Vo | Group | Facility | ... ) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAuthzAdminGroups(role: string, complementaryObjectId: number, complementaryObjectName: string, observe?: 'body', reportProgress?: boolean): Observable>; + public getAuthzAdminGroups(role: string, complementaryObjectId: number, complementaryObjectName: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAuthzAdminGroups(role: string, complementaryObjectId: number, complementaryObjectName: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAuthzAdminGroups(role: string, complementaryObjectId: number, complementaryObjectName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (role === null || role === undefined) { + throw new Error('Required parameter role was null or undefined when calling getAuthzAdminGroups.'); + } + if (complementaryObjectId === null || complementaryObjectId === undefined) { + throw new Error('Required parameter complementaryObjectId was null or undefined when calling getAuthzAdminGroups.'); + } + if (complementaryObjectName === null || complementaryObjectName === undefined) { + throw new Error('Required parameter complementaryObjectName was null or undefined when calling getAuthzAdminGroups.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (role !== undefined && role !== null) { + queryParameters = queryParameters.set('role', role); + } + if (complementaryObjectId !== undefined && complementaryObjectId !== null) { + queryParameters = queryParameters.set('complementaryObjectId', complementaryObjectId); + } + if (complementaryObjectName !== undefined && complementaryObjectName !== null) { + queryParameters = queryParameters.set('complementaryObjectName', complementaryObjectName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/authzResolver/getAdminGroups`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Gets all valid rich admins + * Get all valid richUser administrators (for group-based rights, status must be VALID for both Vo and group) for complementary object and role with specified attributes. + * @param role + * @param complementaryObjectId Property id of complementaryObject to get managers for + * @param complementaryObjectName Property beanName of complementaryObject, meaning object type (Vo | Group | Facility | ... ) + * @param specificAttributes list of specified attributes which are needed in object richUser + * @param allUserAttributes When true, do not specify attributes through list and return them all in objects richUser. Ignoring list of specific attributes + * @param onlyDirectAdmins When true, return only direct users of the complementary object for role with specific attributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAuthzRichAdmins(role: string, complementaryObjectId: number, complementaryObjectName: string, specificAttributes: Array, allUserAttributes?: boolean, onlyDirectAdmins?: boolean, observe?: 'body', reportProgress?: boolean): Observable>; + public getAuthzRichAdmins(role: string, complementaryObjectId: number, complementaryObjectName: string, specificAttributes: Array, allUserAttributes?: boolean, onlyDirectAdmins?: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAuthzRichAdmins(role: string, complementaryObjectId: number, complementaryObjectName: string, specificAttributes: Array, allUserAttributes?: boolean, onlyDirectAdmins?: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAuthzRichAdmins(role: string, complementaryObjectId: number, complementaryObjectName: string, specificAttributes: Array, allUserAttributes?: boolean, onlyDirectAdmins?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (role === null || role === undefined) { + throw new Error('Required parameter role was null or undefined when calling getAuthzRichAdmins.'); + } + if (complementaryObjectId === null || complementaryObjectId === undefined) { + throw new Error('Required parameter complementaryObjectId was null or undefined when calling getAuthzRichAdmins.'); + } + if (complementaryObjectName === null || complementaryObjectName === undefined) { + throw new Error('Required parameter complementaryObjectName was null or undefined when calling getAuthzRichAdmins.'); + } + if (specificAttributes === null || specificAttributes === undefined) { + throw new Error('Required parameter specificAttributes was null or undefined when calling getAuthzRichAdmins.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (role !== undefined && role !== null) { + queryParameters = queryParameters.set('role', role); + } + if (complementaryObjectId !== undefined && complementaryObjectId !== null) { + queryParameters = queryParameters.set('complementaryObjectId', complementaryObjectId); + } + if (complementaryObjectName !== undefined && complementaryObjectName !== null) { + queryParameters = queryParameters.set('complementaryObjectName', complementaryObjectName); + } + if (specificAttributes) { + specificAttributes.forEach((element) => { + queryParameters = queryParameters.append('specificAttributes', element); + }) + } + if (allUserAttributes !== undefined && allUserAttributes !== null) { + queryParameters = queryParameters.set('allUserAttributes', allUserAttributes); + } + if (onlyDirectAdmins !== undefined && onlyDirectAdmins !== null) { + queryParameters = queryParameters.set('onlyDirectAdmins', onlyDirectAdmins); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/authzResolver/getRichAdmins`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all Facilities where the given user (principal if user not sent) has set one of the given roles or the given user is a member of an authorized group with such roles. + * @param roles list of role names List<String> + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilitiesWhereUserIsInRoles(roles: Array, user?: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getFacilitiesWhereUserIsInRoles(roles: Array, user?: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getFacilitiesWhereUserIsInRoles(roles: Array, user?: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getFacilitiesWhereUserIsInRoles(roles: Array, user?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (roles === null || roles === undefined) { + throw new Error('Required parameter roles was null or undefined when calling getFacilitiesWhereUserIsInRoles.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (roles) { + roles.forEach((element) => { + queryParameters = queryParameters.append('roles[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/authzResolver/getFacilitiesWhereUserIsInRoles`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns list of group\'s role names. Perun system uses role names in the upper case format. However, for now, they are converted to the lower case format because of the compatibility with external systems. + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupRoleNames(group: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getGroupRoleNames(group: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getGroupRoleNames(group: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getGroupRoleNames(group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getGroupRoleNames.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/authzResolver/getGroupRoleNames`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns all roles as an AuthzRoles object for a given group. + * @param groupId id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupRoles(groupId: number, observe?: 'body', reportProgress?: boolean): Observable<{ [key: string]: { [key: string]: Array; }; }>; + public getGroupRoles(groupId: number, observe?: 'response', reportProgress?: boolean): Observable; }; }>>; + public getGroupRoles(groupId: number, observe?: 'events', reportProgress?: boolean): Observable; }; }>>; + public getGroupRoles(groupId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (groupId === null || groupId === undefined) { + throw new Error('Required parameter groupId was null or undefined when calling getGroupRoles.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (groupId !== undefined && groupId !== null) { + queryParameters = queryParameters.set('groupId', groupId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get<{ [key: string]: { [key: string]: Array; }; }>(`${this.configuration.basePath}/urlinjsonout/authzResolver/getGroupRoles`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all Groups where the given user (principal if user not sent) has set one of the given roles or the given user is a member of an authorized group with such roles. + * @param roles list of role names List<String> + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupsWhereUserIsInRoles(roles: Array, user?: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getGroupsWhereUserIsInRoles(roles: Array, user?: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getGroupsWhereUserIsInRoles(roles: Array, user?: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getGroupsWhereUserIsInRoles(roles: Array, user?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (roles === null || roles === undefined) { + throw new Error('Required parameter roles was null or undefined when calling getGroupsWhereUserIsInRoles.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (roles) { + roles.forEach((element) => { + queryParameters = queryParameters.append('roles[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/authzResolver/getGroupsWhereUserIsInRoles`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns User which is associated with credentials used to log-in to Perun. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getLoggedUser(observe?: 'body', reportProgress?: boolean): Observable; + public getLoggedUser(observe?: 'response', reportProgress?: boolean): Observable>; + public getLoggedUser(observe?: 'events', reportProgress?: boolean): Observable>; + public getLoggedUser(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/authzResolver/getLoggedUser`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all Members where the given user (principal if user not sent) has set one of the given roles or the given user is a member of an authorized group with such roles. + * @param roles list of role names List<String> + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMembersWhereUserIsInRoles(roles: Array, user?: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getMembersWhereUserIsInRoles(roles: Array, user?: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getMembersWhereUserIsInRoles(roles: Array, user?: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getMembersWhereUserIsInRoles(roles: Array, user?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (roles === null || roles === undefined) { + throw new Error('Required parameter roles was null or undefined when calling getMembersWhereUserIsInRoles.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (roles) { + roles.forEach((element) => { + queryParameters = queryParameters.append('roles[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/authzResolver/getMembersWhereUserIsInRoles`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Gets current user + * Returns object representing the currently authenticated user. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getPerunPrincipal(observe?: 'body', reportProgress?: boolean): Observable; + public getPerunPrincipal(observe?: 'response', reportProgress?: boolean): Observable>; + public getPerunPrincipal(observe?: 'events', reportProgress?: boolean): Observable>; + public getPerunPrincipal(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/authzResolver/getPerunPrincipal`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns list of caller\'s role names. Perun system uses role names in the upper case format. However, for now, they are converted to the lower case format because of the compatibility with external systems. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getPrincipalRoleNames(observe?: 'body', reportProgress?: boolean): Observable>; + public getPrincipalRoleNames(observe?: 'response', reportProgress?: boolean): Observable>>; + public getPrincipalRoleNames(observe?: 'events', reportProgress?: boolean): Observable>>; + public getPrincipalRoleNames(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/authzResolver/getPrincipalRoleNames`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all Resources where the given user (principal if user not sent) has set one of the given roles or the given user is a member of an authorized group with such roles. + * @param roles list of role names List<String> + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourcesWhereUserIsInRoles(roles: Array, user?: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getResourcesWhereUserIsInRoles(roles: Array, user?: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getResourcesWhereUserIsInRoles(roles: Array, user?: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getResourcesWhereUserIsInRoles(roles: Array, user?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (roles === null || roles === undefined) { + throw new Error('Required parameter roles was null or undefined when calling getResourcesWhereUserIsInRoles.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (roles) { + roles.forEach((element) => { + queryParameters = queryParameters.append('roles[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/authzResolver/getResourcesWhereUserIsInRoles`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all SecurityTeams where the given user (principal if user not sent) has set one of the given roles or the given user is a member of an authorized group with such roles. + * @param roles list of role names List<String> + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getSecurityTeamsWhereUserIsInRoles(roles: Array, user?: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getSecurityTeamsWhereUserIsInRoles(roles: Array, user?: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getSecurityTeamsWhereUserIsInRoles(roles: Array, user?: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getSecurityTeamsWhereUserIsInRoles(roles: Array, user?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (roles === null || roles === undefined) { + throw new Error('Required parameter roles was null or undefined when calling getSecurityTeamsWhereUserIsInRoles.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (roles) { + roles.forEach((element) => { + queryParameters = queryParameters.append('roles[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/authzResolver/getSecurityTeamsWhereUserIsInRoles`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns list of user\'s role names. Perun system uses role names in the upper case format. However, for now, they are converted to the lower case format because of the compatibility with external systems. + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserRoleNames(user: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getUserRoleNames(user: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getUserRoleNames(user: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getUserRoleNames(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getUserRoleNames.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/authzResolver/getUserRoleNames`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns all roles as an AuthzRoles object for a given user. + * @param userId id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserRoles(userId: number, observe?: 'body', reportProgress?: boolean): Observable<{ [key: string]: { [key: string]: Array; }; }>; + public getUserRoles(userId: number, observe?: 'response', reportProgress?: boolean): Observable; }; }>>; + public getUserRoles(userId: number, observe?: 'events', reportProgress?: boolean): Observable; }; }>>; + public getUserRoles(userId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling getUserRoles.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (userId !== undefined && userId !== null) { + queryParameters = queryParameters.set('userId', userId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get<{ [key: string]: { [key: string]: Array; }; }>(`${this.configuration.basePath}/json/authzResolver/getUserRoles`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all Vos where the given user (principal if user not sent) has set one of the given roles or the given user is a member of an authorized group with such roles. + * @param roles list of role names List<String> + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVosWhereUserIsInRoles(roles: Array, user?: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getVosWhereUserIsInRoles(roles: Array, user?: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getVosWhereUserIsInRoles(roles: Array, user?: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getVosWhereUserIsInRoles(roles: Array, user?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (roles === null || roles === undefined) { + throw new Error('Required parameter roles was null or undefined when calling getVosWhereUserIsInRoles.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (roles) { + roles.forEach((element) => { + queryParameters = queryParameters.append('roles[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/authzResolver/getVosWhereUserIsInRoles`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns 1 if User has Facility manager role (FACILITYADMIN) or for specific Facility defined by id + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public isFacilityAdmin(facility?: number, observe?: 'body', reportProgress?: boolean): Observable; + public isFacilityAdmin(facility?: number, observe?: 'response', reportProgress?: boolean): Observable>; + public isFacilityAdmin(facility?: number, observe?: 'events', reportProgress?: boolean): Observable>; + public isFacilityAdmin(facility?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/urlinjsonout/authzResolver/isFacilityAdmin`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns 1 if User has Group manager role (GROUPADMIN) or for specific Group defined by id + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public isGroupAdmin(group?: number, observe?: 'body', reportProgress?: boolean): Observable; + public isGroupAdmin(group?: number, observe?: 'response', reportProgress?: boolean): Observable>; + public isGroupAdmin(group?: number, observe?: 'events', reportProgress?: boolean): Observable>; + public isGroupAdmin(group?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/urlinjsonout/authzResolver/isGroupAdmin`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns 1 if User has Perun admin role (perunadmin). + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public isPerunAdmin(observe?: 'body', reportProgress?: boolean): Observable; + public isPerunAdmin(observe?: 'response', reportProgress?: boolean): Observable>; + public isPerunAdmin(observe?: 'events', reportProgress?: boolean): Observable>; + public isPerunAdmin(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/authzResolver/isPerunAdmin`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns 1 if User has VO manager role (VOADMIN) or for specific VO defined by id + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public isVoAdmin(vo?: number, observe?: 'body', reportProgress?: boolean): Observable; + public isVoAdmin(vo?: number, observe?: 'response', reportProgress?: boolean): Observable>; + public isVoAdmin(vo?: number, observe?: 'events', reportProgress?: boolean): Observable>; + public isVoAdmin(vo?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/urlinjsonout/authzResolver/isVoAdmin`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns \"OK\" string. Helper method for GUI check if connection is alive. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public keepAlive(observe?: 'body', reportProgress?: boolean): Observable; + public keepAlive(observe?: 'response', reportProgress?: boolean): Observable>; + public keepAlive(observe?: 'events', reportProgress?: boolean): Observable>; + public keepAlive(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/authzResolver/keepAlive`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Load perun roles and policies from the configuration file perun-roles.yml. Roles are loaded to the database and policies are loaded to the PerunPoliciesContainer. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public loadAuthorizationComponents(observe?: 'body', reportProgress?: boolean): Observable; + public loadAuthorizationComponents(observe?: 'response', reportProgress?: boolean): Observable>; + public loadAuthorizationComponents(observe?: 'events', reportProgress?: boolean): Observable>; + public loadAuthorizationComponents(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/authzResolver/loadAuthorizationComponents`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Set role for authorizedGroup and complementaryObject + * @param setRoleWithGroupComplementaryObject + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setRoleWithGroupComplementaryObject(setRoleWithGroupComplementaryObject: SetRoleWithGroupComplementaryObject, observe?: 'body', reportProgress?: boolean): Observable; + public setRoleWithGroupComplementaryObject(setRoleWithGroupComplementaryObject: SetRoleWithGroupComplementaryObject, observe?: 'response', reportProgress?: boolean): Observable>; + public setRoleWithGroupComplementaryObject(setRoleWithGroupComplementaryObject: SetRoleWithGroupComplementaryObject, observe?: 'events', reportProgress?: boolean): Observable>; + public setRoleWithGroupComplementaryObject(setRoleWithGroupComplementaryObject: SetRoleWithGroupComplementaryObject, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (setRoleWithGroupComplementaryObject === null || setRoleWithGroupComplementaryObject === undefined) { + throw new Error('Required parameter setRoleWithGroupComplementaryObject was null or undefined when calling setRoleWithGroupComplementaryObject.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/authzResolver/setRole/g-co`, + setRoleWithGroupComplementaryObject, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Set role for user and complementaryObject + * @param setRoleWithUserComplementaryObject + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setRoleWithUserComplementaryObject(setRoleWithUserComplementaryObject: SetRoleWithUserComplementaryObject, observe?: 'body', reportProgress?: boolean): Observable; + public setRoleWithUserComplementaryObject(setRoleWithUserComplementaryObject: SetRoleWithUserComplementaryObject, observe?: 'response', reportProgress?: boolean): Observable>; + public setRoleWithUserComplementaryObject(setRoleWithUserComplementaryObject: SetRoleWithUserComplementaryObject, observe?: 'events', reportProgress?: boolean): Observable>; + public setRoleWithUserComplementaryObject(setRoleWithUserComplementaryObject: SetRoleWithUserComplementaryObject, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (setRoleWithUserComplementaryObject === null || setRoleWithUserComplementaryObject === undefined) { + throw new Error('Required parameter setRoleWithUserComplementaryObject was null or undefined when calling setRoleWithUserComplementaryObject.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/authzResolver/setRole/u-co`, + setRoleWithUserComplementaryObject, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Unset role for authorizedGroup and complementaryObject + * @param unsetRoleWithGroupComplementaryObject + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public unsetRoleWithGroupComplementaryObject(unsetRoleWithGroupComplementaryObject: UnsetRoleWithGroupComplementaryObject, observe?: 'body', reportProgress?: boolean): Observable; + public unsetRoleWithGroupComplementaryObject(unsetRoleWithGroupComplementaryObject: UnsetRoleWithGroupComplementaryObject, observe?: 'response', reportProgress?: boolean): Observable>; + public unsetRoleWithGroupComplementaryObject(unsetRoleWithGroupComplementaryObject: UnsetRoleWithGroupComplementaryObject, observe?: 'events', reportProgress?: boolean): Observable>; + public unsetRoleWithGroupComplementaryObject(unsetRoleWithGroupComplementaryObject: UnsetRoleWithGroupComplementaryObject, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (unsetRoleWithGroupComplementaryObject === null || unsetRoleWithGroupComplementaryObject === undefined) { + throw new Error('Required parameter unsetRoleWithGroupComplementaryObject was null or undefined when calling unsetRoleWithGroupComplementaryObject.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/authzResolver/unsetRole/g-co`, + unsetRoleWithGroupComplementaryObject, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Unset role for user and complementaryObject + * @param unsetRoleWithUserComplementaryObject + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public unsetRoleWithUserComplementaryObject(unsetRoleWithUserComplementaryObject: UnsetRoleWithUserComplementaryObject, observe?: 'body', reportProgress?: boolean): Observable; + public unsetRoleWithUserComplementaryObject(unsetRoleWithUserComplementaryObject: UnsetRoleWithUserComplementaryObject, observe?: 'response', reportProgress?: boolean): Observable>; + public unsetRoleWithUserComplementaryObject(unsetRoleWithUserComplementaryObject: UnsetRoleWithUserComplementaryObject, observe?: 'events', reportProgress?: boolean): Observable>; + public unsetRoleWithUserComplementaryObject(unsetRoleWithUserComplementaryObject: UnsetRoleWithUserComplementaryObject, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (unsetRoleWithUserComplementaryObject === null || unsetRoleWithUserComplementaryObject === undefined) { + throw new Error('Required parameter unsetRoleWithUserComplementaryObject was null or undefined when calling unsetRoleWithUserComplementaryObject.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/authzResolver/unsetRole/u-co`, + unsetRoleWithUserComplementaryObject, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } - return this.httpClient.post( - `${this.configuration.basePath}/json/authzResolver/unsetRole/u-co`, - unsetRoleWithUserComplementaryObject, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } } diff --git a/libs/perun/openapi/src/lib/api/cabinetManager.service.ts b/libs/perun/openapi/src/lib/api/cabinetManager.service.ts index d0484073a..0db4cee4d 100644 --- a/libs/perun/openapi/src/lib/api/cabinetManager.service.ts +++ b/libs/perun/openapi/src/lib/api/cabinetManager.service.ts @@ -11,17 +11,11 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { Author } from '../model/author'; import { Authorship } from '../model/authorship'; @@ -43,2251 +37,1685 @@ import { PublicationSystem } from '../model/publicationSystem'; import { Thanks } from '../model/thanks'; import { ThanksForGUI } from '../model/thanksForGUI'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class CabinetManagerService { - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration - ) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - /** - * Creates Authorship. Everything except current date must be already set in Authorship object. Authorship is checked for existence before creation, if exists, existing object is returned. When authorship is successfully created, users priority coefficient is updated. - * @param inputCreateAuthorship - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createAutorship( - inputCreateAuthorship: InputCreateAuthorship, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public createAutorship( - inputCreateAuthorship: InputCreateAuthorship, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public createAutorship( - inputCreateAuthorship: InputCreateAuthorship, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public createAutorship( - inputCreateAuthorship: InputCreateAuthorship, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputCreateAuthorship === null || inputCreateAuthorship === undefined) { - throw new Error( - 'Required parameter inputCreateAuthorship was null or undefined when calling createAutorship.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/cabinetManager/createAuthorship`, - inputCreateAuthorship, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Creates new Category for Publications with specified name and rank. Category object\'s parameter name must be non-empty, max 128 chars long and rank must be double with single digit after decimal point. Other parameters are ignored. - * @param inputCreateCategory - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createCategoryCat( - inputCreateCategory: InputCreateCategory, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public createCategoryCat( - inputCreateCategory: InputCreateCategory, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public createCategoryCat( - inputCreateCategory: InputCreateCategory, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public createCategoryCat( - inputCreateCategory: InputCreateCategory, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputCreateCategory === null || inputCreateCategory === undefined) { - throw new Error( - 'Required parameter inputCreateCategory was null or undefined when calling createCategoryCat.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/cabinetManager/createCategory/cat`, - inputCreateCategory, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Creates new Category for Publications with specified name and rank. - * @param inputCreateCategory1 - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createCategoryNR( - inputCreateCategory1: InputCreateCategory1, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public createCategoryNR( - inputCreateCategory1: InputCreateCategory1, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public createCategoryNR( - inputCreateCategory1: InputCreateCategory1, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public createCategoryNR( - inputCreateCategory1: InputCreateCategory1, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputCreateCategory1 === null || inputCreateCategory1 === undefined) { - throw new Error( - 'Required parameter inputCreateCategory1 was null or undefined when calling createCategoryNR.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/cabinetManager/createCategory/n-r`, - inputCreateCategory1, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Create Publication. If exists by its ID or EXT_ID,PUB_SYS_ID then existing publication is returned. - * @param inputCreatePublication - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createPublication( - inputCreatePublication: InputCreatePublication, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public createPublication( - inputCreatePublication: InputCreatePublication, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public createPublication( - inputCreatePublication: InputCreatePublication, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public createPublication( - inputCreatePublication: InputCreatePublication, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputCreatePublication === null || inputCreatePublication === undefined) { - throw new Error( - 'Required parameter inputCreatePublication was null or undefined when calling createPublication.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/cabinetManager/createPublication`, - inputCreatePublication, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Creates new PublicationSystem. - * @param inputCreatePublicationSystem - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createPublicationSystem( - inputCreatePublicationSystem: InputCreatePublicationSystem, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public createPublicationSystem( - inputCreatePublicationSystem: InputCreatePublicationSystem, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public createPublicationSystem( - inputCreatePublicationSystem: InputCreatePublicationSystem, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public createPublicationSystem( - inputCreatePublicationSystem: InputCreatePublicationSystem, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputCreatePublicationSystem === null || inputCreatePublicationSystem === undefined) { - throw new Error( - 'Required parameter inputCreatePublicationSystem was null or undefined when calling createPublicationSystem.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/cabinetManager/createPublicationSystem`, - inputCreatePublicationSystem, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Creates new Thanks for Publication - * @param inputCreateThanks - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createThanks( - inputCreateThanks: InputCreateThanks, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public createThanks( - inputCreateThanks: InputCreateThanks, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public createThanks( - inputCreateThanks: InputCreateThanks, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public createThanks( - inputCreateThanks: InputCreateThanks, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputCreateThanks === null || inputCreateThanks === undefined) { - throw new Error( - 'Required parameter inputCreateThanks was null or undefined when calling createThanks.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/cabinetManager/createThanks`, - inputCreateThanks, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Delete Authorship by its userId and publicationId. - * @param publicationId id of publication - * @param userId id of user - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteAuthorship( - publicationId: number, - userId: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public deleteAuthorship( - publicationId: number, - userId: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deleteAuthorship( - publicationId: number, - userId: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deleteAuthorship( - publicationId: number, - userId: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (publicationId === null || publicationId === undefined) { - throw new Error( - 'Required parameter publicationId was null or undefined when calling deleteAuthorship.' - ); - } - if (userId === null || userId === undefined) { - throw new Error( - 'Required parameter userId was null or undefined when calling deleteAuthorship.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (publicationId !== undefined && publicationId !== null) { - queryParameters = queryParameters.set('publicationId', publicationId); - } - if (userId !== undefined && userId !== null) { - queryParameters = queryParameters.set('userId', userId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/cabinetManager/deleteAuthorship`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Delete category by its ID. If category contains any publications, it can\'t be deleted. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteCategory(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public deleteCategory( - id: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deleteCategory( - id: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deleteCategory( - id: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling deleteCategory.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/cabinetManager/deleteCategory`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Delete publication by its ID. Only Author of the record or PerunAdmin can do this. - Author deletes Authorships and Thanks from publication. - PerunAdmin also delete publication record. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deletePublication(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public deletePublication( - id: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deletePublication( - id: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deletePublication( - id: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling deletePublication.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/cabinetManager/deletePublication`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Deletes PublicationSystem by its ID. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deletePublicationSystem( - id: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public deletePublicationSystem( - id: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deletePublicationSystem( - id: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deletePublicationSystem( - id: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling deletePublicationSystem.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/cabinetManager/deletePublicationSystem`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Delete Thanks by its ID. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteThanks(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public deleteThanks( - id: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deleteThanks( - id: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deleteThanks( - id: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling deleteThanks.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/cabinetManager/deleteThanks`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Return all Authors of Publications. Empty list of none found. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findAllAuthors(observe?: 'body', reportProgress?: boolean): Observable>; - public findAllAuthors( - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public findAllAuthors( - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public findAllAuthors(observe: any = 'body', reportProgress: boolean = false): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/cabinetManager/findAllAuthors`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Return all Authors of Publication specified by its ID. Empty list of none found. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findAuthorsByPublicationId( - id: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public findAuthorsByPublicationId( - id: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public findAuthorsByPublicationId( - id: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public findAuthorsByPublicationId( - id: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling findAuthorsByPublicationId.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/cabinetManager/findAuthorsByPublicationId`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Finds publications of perun\'s user specified in param Search is done in external publication systems (MU, ZCU) All parameters are required. - * @param user id of User - * @param yearSince Year since - * @param yearTill Year till - * @param pubSysNamespace (MU or ZCU) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findExternalPublications( - user: number, - yearSince: number, - yearTill: number, - pubSysNamespace: string, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public findExternalPublications( - user: number, - yearSince: number, - yearTill: number, - pubSysNamespace: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public findExternalPublications( - user: number, - yearSince: number, - yearTill: number, - pubSysNamespace: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public findExternalPublications( - user: number, - yearSince: number, - yearTill: number, - pubSysNamespace: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling findExternalPublications.' - ); - } - if (yearSince === null || yearSince === undefined) { - throw new Error( - 'Required parameter yearSince was null or undefined when calling findExternalPublications.' - ); - } - if (yearTill === null || yearTill === undefined) { - throw new Error( - 'Required parameter yearTill was null or undefined when calling findExternalPublications.' - ); - } - if (pubSysNamespace === null || pubSysNamespace === undefined) { - throw new Error( - 'Required parameter pubSysNamespace was null or undefined when calling findExternalPublications.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (yearSince !== undefined && yearSince !== null) { - queryParameters = queryParameters.set('yearSince', yearSince); - } - if (yearTill !== undefined && yearTill !== null) { - queryParameters = queryParameters.set('yearTill', yearTill); - } - if (pubSysNamespace !== undefined && pubSysNamespace !== null) { - queryParameters = queryParameters.set('pubSysNamespace', pubSysNamespace); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/cabinetManager/findExternalPublications`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Find new Authors for Publication. Empty list of none found. Used by users to search for colleagues to add them as co-authors. - * @param searchString Text to search by - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findNewAuthors( - searchString: string, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public findNewAuthors( - searchString: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public findNewAuthors( - searchString: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public findNewAuthors( - searchString: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (searchString === null || searchString === undefined) { - throw new Error( - 'Required parameter searchString was null or undefined when calling findNewAuthors.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (searchString !== undefined && searchString !== null) { - queryParameters = queryParameters.set('searchString', searchString); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/cabinetManager/findNewAuthors`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Return Publication by its ID. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findPublicationById( - id: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public findPublicationById( - id: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public findPublicationById( - id: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public findPublicationById( - id: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling findPublicationById.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/cabinetManager/findPublicationById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Finds publications in Cabinet by filter. - * @param userId User id - * @param yearSince Year since - * @param yearTill Year till - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findPublicationsByFilter( - userId: number, - yearSince?: number, - yearTill?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public findPublicationsByFilter( - userId: number, - yearSince?: number, - yearTill?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public findPublicationsByFilter( - userId: number, - yearSince?: number, - yearTill?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public findPublicationsByFilter( - userId: number, - yearSince?: number, - yearTill?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (userId === null || userId === undefined) { - throw new Error( - 'Required parameter userId was null or undefined when calling findPublicationsByFilter.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (yearSince !== undefined && yearSince !== null) { - queryParameters = queryParameters.set('yearSince', yearSince); - } - if (yearTill !== undefined && yearTill !== null) { - queryParameters = queryParameters.set('yearTill', yearTill); - } - if (userId !== undefined && userId !== null) { - queryParameters = queryParameters.set('userId', userId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/cabinetManager/findPublicationsByFilter`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Finds rich publications in Cabinet by GUI filter: id = exact match (used when search for publication of authors) title = if \"like\" this substring year = exact match isbn = if \"like\" this substring category = exact match yearSince = if year >= yearSince yearTill = if year <= yearTill userId = exact match or 0 If you don\'t want to filter by publication params, do not include the attribute in the query. - * @param title Title - * @param isbn ISBN - * @param doi DOI - * @param id Publication id - * @param year Year - * @param category Category - * @param yearSince Year since - * @param yearTill Year till - * @param userId User id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findPublicationsByGUIFilter( - title?: string, - isbn?: string, - doi?: string, - id?: number, - year?: number, - category?: number, - yearSince?: number, - yearTill?: number, - userId?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public findPublicationsByGUIFilter( - title?: string, - isbn?: string, - doi?: string, - id?: number, - year?: number, - category?: number, - yearSince?: number, - yearTill?: number, - userId?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public findPublicationsByGUIFilter( - title?: string, - isbn?: string, - doi?: string, - id?: number, - year?: number, - category?: number, - yearSince?: number, - yearTill?: number, - userId?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public findPublicationsByGUIFilter( - title?: string, - isbn?: string, - doi?: string, - id?: number, - year?: number, - category?: number, - yearSince?: number, - yearTill?: number, - userId?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (title !== undefined && title !== null) { - queryParameters = queryParameters.set('title', title); - } - if (isbn !== undefined && isbn !== null) { - queryParameters = queryParameters.set('isbn', isbn); - } - if (doi !== undefined && doi !== null) { - queryParameters = queryParameters.set('doi', doi); - } - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - if (year !== undefined && year !== null) { - queryParameters = queryParameters.set('year', year); - } - if (category !== undefined && category !== null) { - queryParameters = queryParameters.set('category', category); - } - if (yearSince !== undefined && yearSince !== null) { - queryParameters = queryParameters.set('yearSince', yearSince); - } - if (yearTill !== undefined && yearTill !== null) { - queryParameters = queryParameters.set('yearTill', yearTill); - } - if (userId !== undefined && userId !== null) { - queryParameters = queryParameters.set('userId', userId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/cabinetManager/findPublicationsByGUIFilter`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Finds similar publications - * @param title Title - * @param doi DOI - * @param isbn ISBN - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findSimilarPublications( - title?: string, - doi?: string, - isbn?: string, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public findSimilarPublications( - title?: string, - doi?: string, - isbn?: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public findSimilarPublications( - title?: string, - doi?: string, - isbn?: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public findSimilarPublications( - title?: string, - doi?: string, - isbn?: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (title !== undefined && title !== null) { - queryParameters = queryParameters.set('title', title); - } - if (doi !== undefined && doi !== null) { - queryParameters = queryParameters.set('doi', doi); - } - if (isbn !== undefined && isbn !== null) { - queryParameters = queryParameters.set('isbn', isbn); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/cabinetManager/findSimilarPublications`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Return list of all Categories in Perun or empty list of none present. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getCategories(observe?: 'body', reportProgress?: boolean): Observable>; - public getCategories( - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getCategories( - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getCategories(observe: any = 'body', reportProgress: boolean = false): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/cabinetManager/getCategories`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all PublicationSystems in Perun. If none, return empty list. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getPublicationSystems( - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getPublicationSystems( - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getPublicationSystems( - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getPublicationSystems( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/cabinetManager/getPublicationSystems`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets overall rank of given user as sum of all his publications Authorships. - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRank(user: number, observe?: 'body', reportProgress?: boolean): Observable; - public getRank( - user: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getRank( - user: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getRank( - user: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getRank.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/cabinetManager/getRank`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get ThanksForGUI of Publication specified by its ID or empty list. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRichThanksByPublicationId( - id: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getRichThanksByPublicationId( - id: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getRichThanksByPublicationId( - id: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getRichThanksByPublicationId( - id: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling getRichThanksByPublicationId.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/cabinetManager/getRichThanksByPublicationId`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * (Un)Lock passed Publications for changes. - * @param inputLockPublications - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public lockPublications( - inputLockPublications: InputLockPublications, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public lockPublications( - inputLockPublications: InputLockPublications, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public lockPublications( - inputLockPublications: InputLockPublications, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public lockPublications( - inputLockPublications: InputLockPublications, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputLockPublications === null || inputLockPublications === undefined) { - throw new Error( - 'Required parameter inputLockPublications was null or undefined when calling lockPublications.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/cabinetManager/lockPublications`, - inputLockPublications, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Updates publications category in Perun. Category to update is found by ID. When category rank is changed, priorityCoefficient for all authors of books from this category, is recalculated. - * @param inputUpdateCategory - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateCategory( - inputUpdateCategory: InputUpdateCategory, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public updateCategory( - inputUpdateCategory: InputUpdateCategory, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public updateCategory( - inputUpdateCategory: InputUpdateCategory, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public updateCategory( - inputUpdateCategory: InputUpdateCategory, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputUpdateCategory === null || inputUpdateCategory === undefined) { - throw new Error( - 'Required parameter inputUpdateCategory was null or undefined when calling updateCategory.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/cabinetManager/updateCategory`, - inputUpdateCategory, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Update existing publication by its ID. - * @param inputUpdatePublication - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updatePublication( - inputUpdatePublication: InputUpdatePublication, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public updatePublication( - inputUpdatePublication: InputUpdatePublication, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public updatePublication( - inputUpdatePublication: InputUpdatePublication, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public updatePublication( - inputUpdatePublication: InputUpdatePublication, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputUpdatePublication === null || inputUpdatePublication === undefined) { - throw new Error( - 'Required parameter inputUpdatePublication was null or undefined when calling updatePublication.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/cabinetManager/updatePublication`, - inputUpdatePublication, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Updates PublicationSystem by its ID. - * @param inputUpdatePublicationSystem - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updatePublicationSystem( - inputUpdatePublicationSystem: InputUpdatePublicationSystem, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public updatePublicationSystem( - inputUpdatePublicationSystem: InputUpdatePublicationSystem, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public updatePublicationSystem( - inputUpdatePublicationSystem: InputUpdatePublicationSystem, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public updatePublicationSystem( - inputUpdatePublicationSystem: InputUpdatePublicationSystem, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputUpdatePublicationSystem === null || inputUpdatePublicationSystem === undefined) { - throw new Error( - 'Required parameter inputUpdatePublicationSystem was null or undefined when calling updatePublicationSystem.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + + + /** + * Creates Authorship. Everything except current date must be already set in Authorship object. Authorship is checked for existence before creation, if exists, existing object is returned. When authorship is successfully created, users priority coefficient is updated. + * @param inputCreateAuthorship + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createAutorship(inputCreateAuthorship: InputCreateAuthorship, observe?: 'body', reportProgress?: boolean): Observable; + public createAutorship(inputCreateAuthorship: InputCreateAuthorship, observe?: 'response', reportProgress?: boolean): Observable>; + public createAutorship(inputCreateAuthorship: InputCreateAuthorship, observe?: 'events', reportProgress?: boolean): Observable>; + public createAutorship(inputCreateAuthorship: InputCreateAuthorship, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputCreateAuthorship === null || inputCreateAuthorship === undefined) { + throw new Error('Required parameter inputCreateAuthorship was null or undefined when calling createAutorship.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/cabinetManager/createAuthorship`, + inputCreateAuthorship, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Creates new Category for Publications with specified name and rank. Category object\'s parameter name must be non-empty, max 128 chars long and rank must be double with single digit after decimal point. Other parameters are ignored. + * @param inputCreateCategory + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createCategoryCat(inputCreateCategory: InputCreateCategory, observe?: 'body', reportProgress?: boolean): Observable; + public createCategoryCat(inputCreateCategory: InputCreateCategory, observe?: 'response', reportProgress?: boolean): Observable>; + public createCategoryCat(inputCreateCategory: InputCreateCategory, observe?: 'events', reportProgress?: boolean): Observable>; + public createCategoryCat(inputCreateCategory: InputCreateCategory, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputCreateCategory === null || inputCreateCategory === undefined) { + throw new Error('Required parameter inputCreateCategory was null or undefined when calling createCategoryCat.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/cabinetManager/createCategory/cat`, + inputCreateCategory, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Creates new Category for Publications with specified name and rank. + * @param inputCreateCategory1 + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createCategoryNR(inputCreateCategory1: InputCreateCategory1, observe?: 'body', reportProgress?: boolean): Observable; + public createCategoryNR(inputCreateCategory1: InputCreateCategory1, observe?: 'response', reportProgress?: boolean): Observable>; + public createCategoryNR(inputCreateCategory1: InputCreateCategory1, observe?: 'events', reportProgress?: boolean): Observable>; + public createCategoryNR(inputCreateCategory1: InputCreateCategory1, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputCreateCategory1 === null || inputCreateCategory1 === undefined) { + throw new Error('Required parameter inputCreateCategory1 was null or undefined when calling createCategoryNR.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/cabinetManager/createCategory/n-r`, + inputCreateCategory1, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Create Publication. If exists by its ID or EXT_ID,PUB_SYS_ID then existing publication is returned. + * @param inputCreatePublication + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createPublication(inputCreatePublication: InputCreatePublication, observe?: 'body', reportProgress?: boolean): Observable; + public createPublication(inputCreatePublication: InputCreatePublication, observe?: 'response', reportProgress?: boolean): Observable>; + public createPublication(inputCreatePublication: InputCreatePublication, observe?: 'events', reportProgress?: boolean): Observable>; + public createPublication(inputCreatePublication: InputCreatePublication, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputCreatePublication === null || inputCreatePublication === undefined) { + throw new Error('Required parameter inputCreatePublication was null or undefined when calling createPublication.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/cabinetManager/createPublication`, + inputCreatePublication, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Creates new PublicationSystem. + * @param inputCreatePublicationSystem + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createPublicationSystem(inputCreatePublicationSystem: InputCreatePublicationSystem, observe?: 'body', reportProgress?: boolean): Observable; + public createPublicationSystem(inputCreatePublicationSystem: InputCreatePublicationSystem, observe?: 'response', reportProgress?: boolean): Observable>; + public createPublicationSystem(inputCreatePublicationSystem: InputCreatePublicationSystem, observe?: 'events', reportProgress?: boolean): Observable>; + public createPublicationSystem(inputCreatePublicationSystem: InputCreatePublicationSystem, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputCreatePublicationSystem === null || inputCreatePublicationSystem === undefined) { + throw new Error('Required parameter inputCreatePublicationSystem was null or undefined when calling createPublicationSystem.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/cabinetManager/createPublicationSystem`, + inputCreatePublicationSystem, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Creates new Thanks for Publication + * @param inputCreateThanks + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createThanks(inputCreateThanks: InputCreateThanks, observe?: 'body', reportProgress?: boolean): Observable; + public createThanks(inputCreateThanks: InputCreateThanks, observe?: 'response', reportProgress?: boolean): Observable>; + public createThanks(inputCreateThanks: InputCreateThanks, observe?: 'events', reportProgress?: boolean): Observable>; + public createThanks(inputCreateThanks: InputCreateThanks, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputCreateThanks === null || inputCreateThanks === undefined) { + throw new Error('Required parameter inputCreateThanks was null or undefined when calling createThanks.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/cabinetManager/createThanks`, + inputCreateThanks, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Delete Authorship by its userId and publicationId. + * @param publicationId id of publication + * @param userId id of user + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteAuthorship(publicationId: number, userId: number, observe?: 'body', reportProgress?: boolean): Observable; + public deleteAuthorship(publicationId: number, userId: number, observe?: 'response', reportProgress?: boolean): Observable>; + public deleteAuthorship(publicationId: number, userId: number, observe?: 'events', reportProgress?: boolean): Observable>; + public deleteAuthorship(publicationId: number, userId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (publicationId === null || publicationId === undefined) { + throw new Error('Required parameter publicationId was null or undefined when calling deleteAuthorship.'); + } + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling deleteAuthorship.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (publicationId !== undefined && publicationId !== null) { + queryParameters = queryParameters.set('publicationId', publicationId); + } + if (userId !== undefined && userId !== null) { + queryParameters = queryParameters.set('userId', userId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/cabinetManager/deleteAuthorship`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Delete category by its ID. If category contains any publications, it can\'t be deleted. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteCategory(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public deleteCategory(id: number, observe?: 'response', reportProgress?: boolean): Observable>; + public deleteCategory(id: number, observe?: 'events', reportProgress?: boolean): Observable>; + public deleteCategory(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling deleteCategory.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/cabinetManager/deleteCategory`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Delete publication by its ID. Only Author of the record or PerunAdmin can do this. - Author deletes Authorships and Thanks from publication. - PerunAdmin also delete publication record. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deletePublication(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public deletePublication(id: number, observe?: 'response', reportProgress?: boolean): Observable>; + public deletePublication(id: number, observe?: 'events', reportProgress?: boolean): Observable>; + public deletePublication(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling deletePublication.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/cabinetManager/deletePublication`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Deletes PublicationSystem by its ID. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deletePublicationSystem(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public deletePublicationSystem(id: number, observe?: 'response', reportProgress?: boolean): Observable>; + public deletePublicationSystem(id: number, observe?: 'events', reportProgress?: boolean): Observable>; + public deletePublicationSystem(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling deletePublicationSystem.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/cabinetManager/deletePublicationSystem`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Delete Thanks by its ID. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteThanks(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public deleteThanks(id: number, observe?: 'response', reportProgress?: boolean): Observable>; + public deleteThanks(id: number, observe?: 'events', reportProgress?: boolean): Observable>; + public deleteThanks(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling deleteThanks.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/cabinetManager/deleteThanks`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Return all Authors of Publications. Empty list of none found. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findAllAuthors(observe?: 'body', reportProgress?: boolean): Observable>; + public findAllAuthors(observe?: 'response', reportProgress?: boolean): Observable>>; + public findAllAuthors(observe?: 'events', reportProgress?: boolean): Observable>>; + public findAllAuthors(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/cabinetManager/findAllAuthors`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Return all Authors of Publication specified by its ID. Empty list of none found. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findAuthorsByPublicationId(id: number, observe?: 'body', reportProgress?: boolean): Observable>; + public findAuthorsByPublicationId(id: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public findAuthorsByPublicationId(id: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public findAuthorsByPublicationId(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling findAuthorsByPublicationId.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/cabinetManager/findAuthorsByPublicationId`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Finds publications of perun\'s user specified in param Search is done in external publication systems (MU, ZCU) All parameters are required. + * @param user id of User + * @param yearSince Year since + * @param yearTill Year till + * @param pubSysNamespace (MU or ZCU) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findExternalPublications(user: number, yearSince: number, yearTill: number, pubSysNamespace: string, observe?: 'body', reportProgress?: boolean): Observable>; + public findExternalPublications(user: number, yearSince: number, yearTill: number, pubSysNamespace: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public findExternalPublications(user: number, yearSince: number, yearTill: number, pubSysNamespace: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public findExternalPublications(user: number, yearSince: number, yearTill: number, pubSysNamespace: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling findExternalPublications.'); + } + if (yearSince === null || yearSince === undefined) { + throw new Error('Required parameter yearSince was null or undefined when calling findExternalPublications.'); + } + if (yearTill === null || yearTill === undefined) { + throw new Error('Required parameter yearTill was null or undefined when calling findExternalPublications.'); + } + if (pubSysNamespace === null || pubSysNamespace === undefined) { + throw new Error('Required parameter pubSysNamespace was null or undefined when calling findExternalPublications.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (yearSince !== undefined && yearSince !== null) { + queryParameters = queryParameters.set('yearSince', yearSince); + } + if (yearTill !== undefined && yearTill !== null) { + queryParameters = queryParameters.set('yearTill', yearTill); + } + if (pubSysNamespace !== undefined && pubSysNamespace !== null) { + queryParameters = queryParameters.set('pubSysNamespace', pubSysNamespace); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/cabinetManager/findExternalPublications`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Find new Authors for Publication. Empty list of none found. Used by users to search for colleagues to add them as co-authors. + * @param searchString Text to search by + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findNewAuthors(searchString: string, observe?: 'body', reportProgress?: boolean): Observable>; + public findNewAuthors(searchString: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public findNewAuthors(searchString: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public findNewAuthors(searchString: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (searchString === null || searchString === undefined) { + throw new Error('Required parameter searchString was null or undefined when calling findNewAuthors.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (searchString !== undefined && searchString !== null) { + queryParameters = queryParameters.set('searchString', searchString); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/cabinetManager/findNewAuthors`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Return Publication by its ID. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findPublicationById(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public findPublicationById(id: number, observe?: 'response', reportProgress?: boolean): Observable>; + public findPublicationById(id: number, observe?: 'events', reportProgress?: boolean): Observable>; + public findPublicationById(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling findPublicationById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/cabinetManager/findPublicationById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Finds publications in Cabinet by filter. + * @param userId User id + * @param yearSince Year since + * @param yearTill Year till + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findPublicationsByFilter(userId: number, yearSince?: number, yearTill?: number, observe?: 'body', reportProgress?: boolean): Observable>; + public findPublicationsByFilter(userId: number, yearSince?: number, yearTill?: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public findPublicationsByFilter(userId: number, yearSince?: number, yearTill?: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public findPublicationsByFilter(userId: number, yearSince?: number, yearTill?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling findPublicationsByFilter.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (yearSince !== undefined && yearSince !== null) { + queryParameters = queryParameters.set('yearSince', yearSince); + } + if (yearTill !== undefined && yearTill !== null) { + queryParameters = queryParameters.set('yearTill', yearTill); + } + if (userId !== undefined && userId !== null) { + queryParameters = queryParameters.set('userId', userId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/cabinetManager/findPublicationsByFilter`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Finds rich publications in Cabinet by GUI filter: id = exact match (used when search for publication of authors) title = if \"like\" this substring year = exact match isbn = if \"like\" this substring category = exact match yearSince = if year >= yearSince yearTill = if year <= yearTill userId = exact match or 0 If you don\'t want to filter by publication params, do not include the attribute in the query. + * @param title Title + * @param isbn ISBN + * @param doi DOI + * @param id Publication id + * @param year Year + * @param category Category + * @param yearSince Year since + * @param yearTill Year till + * @param userId User id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findPublicationsByGUIFilter(title?: string, isbn?: string, doi?: string, id?: number, year?: number, category?: number, yearSince?: number, yearTill?: number, userId?: number, observe?: 'body', reportProgress?: boolean): Observable>; + public findPublicationsByGUIFilter(title?: string, isbn?: string, doi?: string, id?: number, year?: number, category?: number, yearSince?: number, yearTill?: number, userId?: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public findPublicationsByGUIFilter(title?: string, isbn?: string, doi?: string, id?: number, year?: number, category?: number, yearSince?: number, yearTill?: number, userId?: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public findPublicationsByGUIFilter(title?: string, isbn?: string, doi?: string, id?: number, year?: number, category?: number, yearSince?: number, yearTill?: number, userId?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (title !== undefined && title !== null) { + queryParameters = queryParameters.set('title', title); + } + if (isbn !== undefined && isbn !== null) { + queryParameters = queryParameters.set('isbn', isbn); + } + if (doi !== undefined && doi !== null) { + queryParameters = queryParameters.set('doi', doi); + } + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + if (year !== undefined && year !== null) { + queryParameters = queryParameters.set('year', year); + } + if (category !== undefined && category !== null) { + queryParameters = queryParameters.set('category', category); + } + if (yearSince !== undefined && yearSince !== null) { + queryParameters = queryParameters.set('yearSince', yearSince); + } + if (yearTill !== undefined && yearTill !== null) { + queryParameters = queryParameters.set('yearTill', yearTill); + } + if (userId !== undefined && userId !== null) { + queryParameters = queryParameters.set('userId', userId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/cabinetManager/findPublicationsByGUIFilter`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Finds similar publications + * @param title Title + * @param doi DOI + * @param isbn ISBN + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findSimilarPublications(title?: string, doi?: string, isbn?: string, observe?: 'body', reportProgress?: boolean): Observable>; + public findSimilarPublications(title?: string, doi?: string, isbn?: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public findSimilarPublications(title?: string, doi?: string, isbn?: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public findSimilarPublications(title?: string, doi?: string, isbn?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (title !== undefined && title !== null) { + queryParameters = queryParameters.set('title', title); + } + if (doi !== undefined && doi !== null) { + queryParameters = queryParameters.set('doi', doi); + } + if (isbn !== undefined && isbn !== null) { + queryParameters = queryParameters.set('isbn', isbn); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/cabinetManager/findSimilarPublications`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Return list of all Categories in Perun or empty list of none present. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getCategories(observe?: 'body', reportProgress?: boolean): Observable>; + public getCategories(observe?: 'response', reportProgress?: boolean): Observable>>; + public getCategories(observe?: 'events', reportProgress?: boolean): Observable>>; + public getCategories(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/cabinetManager/getCategories`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all PublicationSystems in Perun. If none, return empty list. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getPublicationSystems(observe?: 'body', reportProgress?: boolean): Observable>; + public getPublicationSystems(observe?: 'response', reportProgress?: boolean): Observable>>; + public getPublicationSystems(observe?: 'events', reportProgress?: boolean): Observable>>; + public getPublicationSystems(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/cabinetManager/getPublicationSystems`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Gets overall rank of given user as sum of all his publications Authorships. + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRank(user: number, observe?: 'body', reportProgress?: boolean): Observable; + public getRank(user: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getRank(user: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getRank(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getRank.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/cabinetManager/getRank`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get ThanksForGUI of Publication specified by its ID or empty list. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRichThanksByPublicationId(id: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getRichThanksByPublicationId(id: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getRichThanksByPublicationId(id: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getRichThanksByPublicationId(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getRichThanksByPublicationId.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/cabinetManager/getRichThanksByPublicationId`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * (Un)Lock passed Publications for changes. + * @param inputLockPublications + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public lockPublications(inputLockPublications: InputLockPublications, observe?: 'body', reportProgress?: boolean): Observable; + public lockPublications(inputLockPublications: InputLockPublications, observe?: 'response', reportProgress?: boolean): Observable>; + public lockPublications(inputLockPublications: InputLockPublications, observe?: 'events', reportProgress?: boolean): Observable>; + public lockPublications(inputLockPublications: InputLockPublications, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputLockPublications === null || inputLockPublications === undefined) { + throw new Error('Required parameter inputLockPublications was null or undefined when calling lockPublications.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/cabinetManager/lockPublications`, + inputLockPublications, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Updates publications category in Perun. Category to update is found by ID. When category rank is changed, priorityCoefficient for all authors of books from this category, is recalculated. + * @param inputUpdateCategory + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateCategory(inputUpdateCategory: InputUpdateCategory, observe?: 'body', reportProgress?: boolean): Observable; + public updateCategory(inputUpdateCategory: InputUpdateCategory, observe?: 'response', reportProgress?: boolean): Observable>; + public updateCategory(inputUpdateCategory: InputUpdateCategory, observe?: 'events', reportProgress?: boolean): Observable>; + public updateCategory(inputUpdateCategory: InputUpdateCategory, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputUpdateCategory === null || inputUpdateCategory === undefined) { + throw new Error('Required parameter inputUpdateCategory was null or undefined when calling updateCategory.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/cabinetManager/updateCategory`, + inputUpdateCategory, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Update existing publication by its ID. + * @param inputUpdatePublication + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updatePublication(inputUpdatePublication: InputUpdatePublication, observe?: 'body', reportProgress?: boolean): Observable; + public updatePublication(inputUpdatePublication: InputUpdatePublication, observe?: 'response', reportProgress?: boolean): Observable>; + public updatePublication(inputUpdatePublication: InputUpdatePublication, observe?: 'events', reportProgress?: boolean): Observable>; + public updatePublication(inputUpdatePublication: InputUpdatePublication, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputUpdatePublication === null || inputUpdatePublication === undefined) { + throw new Error('Required parameter inputUpdatePublication was null or undefined when calling updatePublication.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/cabinetManager/updatePublication`, + inputUpdatePublication, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Updates PublicationSystem by its ID. + * @param inputUpdatePublicationSystem + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updatePublicationSystem(inputUpdatePublicationSystem: InputUpdatePublicationSystem, observe?: 'body', reportProgress?: boolean): Observable; + public updatePublicationSystem(inputUpdatePublicationSystem: InputUpdatePublicationSystem, observe?: 'response', reportProgress?: boolean): Observable>; + public updatePublicationSystem(inputUpdatePublicationSystem: InputUpdatePublicationSystem, observe?: 'events', reportProgress?: boolean): Observable>; + public updatePublicationSystem(inputUpdatePublicationSystem: InputUpdatePublicationSystem, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputUpdatePublicationSystem === null || inputUpdatePublicationSystem === undefined) { + throw new Error('Required parameter inputUpdatePublicationSystem was null or undefined when calling updatePublicationSystem.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/cabinetManager/updatePublicationSystem`, + inputUpdatePublicationSystem, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } - return this.httpClient.post( - `${this.configuration.basePath}/json/cabinetManager/updatePublicationSystem`, - inputUpdatePublicationSystem, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } } diff --git a/libs/perun/openapi/src/lib/api/databaseManager.service.ts b/libs/perun/openapi/src/lib/api/databaseManager.service.ts index c658d79ec..2fd7c0988 100644 --- a/libs/perun/openapi/src/lib/api/databaseManager.service.ts +++ b/libs/perun/openapi/src/lib/api/databaseManager.service.ts @@ -11,285 +11,234 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { PerunException } from '../model/perunException'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class DatabaseManagerService { - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration - ) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - /** - * Returns current database version, e.g. \"3.1.55\" - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getCurrentDatabaseVersion(observe?: 'body', reportProgress?: boolean): Observable; - public getCurrentDatabaseVersion( - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getCurrentDatabaseVersion( - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getCurrentDatabaseVersion( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/databaseManager/getCurrentDatabaseVersion`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns current database driver info, e.g. \"PostgreSQL JDBC Driver-42.2.8\" - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDatabaseDriverInformation( - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getDatabaseDriverInformation( - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getDatabaseDriverInformation( - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getDatabaseDriverInformation( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/databaseManager/getDatabaseDriverInformation`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns current database info, e.g. \"PostgreSQL-12.0 (Debian 12.0-2.pgdg100+1)\" - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDatabaseInformation(observe?: 'body', reportProgress?: boolean): Observable; - public getDatabaseInformation( - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getDatabaseInformation( - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getDatabaseInformation( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/databaseManager/getDatabaseInformation`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get time in ns \"nanoseconds\" of calling 1 simple update query to DB - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getTimeOfQueryPerformance(observe?: 'body', reportProgress?: boolean): Observable; - public getTimeOfQueryPerformance( - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getTimeOfQueryPerformance( - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getTimeOfQueryPerformance( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + + + /** + * Returns current database version, e.g. \"3.1.55\" + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getCurrentDatabaseVersion(observe?: 'body', reportProgress?: boolean): Observable; + public getCurrentDatabaseVersion(observe?: 'response', reportProgress?: boolean): Observable>; + public getCurrentDatabaseVersion(observe?: 'events', reportProgress?: boolean): Observable>; + public getCurrentDatabaseVersion(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/databaseManager/getCurrentDatabaseVersion`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns current database driver info, e.g. \"PostgreSQL JDBC Driver-42.2.8\" + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDatabaseDriverInformation(observe?: 'body', reportProgress?: boolean): Observable; + public getDatabaseDriverInformation(observe?: 'response', reportProgress?: boolean): Observable>; + public getDatabaseDriverInformation(observe?: 'events', reportProgress?: boolean): Observable>; + public getDatabaseDriverInformation(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/databaseManager/getDatabaseDriverInformation`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns current database info, e.g. \"PostgreSQL-12.0 (Debian 12.0-2.pgdg100+1)\" + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDatabaseInformation(observe?: 'body', reportProgress?: boolean): Observable; + public getDatabaseInformation(observe?: 'response', reportProgress?: boolean): Observable>; + public getDatabaseInformation(observe?: 'events', reportProgress?: boolean): Observable>; + public getDatabaseInformation(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/databaseManager/getDatabaseInformation`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get time in ns \"nanoseconds\" of calling 1 simple update query to DB + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getTimeOfQueryPerformance(observe?: 'body', reportProgress?: boolean): Observable; + public getTimeOfQueryPerformance(observe?: 'response', reportProgress?: boolean): Observable>; + public getTimeOfQueryPerformance(observe?: 'events', reportProgress?: boolean): Observable>; + public getTimeOfQueryPerformance(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/databaseManager/getTimeOfQueryPerformance`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } - return this.httpClient.get( - `${this.configuration.basePath}/json/databaseManager/getTimeOfQueryPerformance`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } } diff --git a/libs/perun/openapi/src/lib/api/extSourcesManager.service.ts b/libs/perun/openapi/src/lib/api/extSourcesManager.service.ts index 7702317e4..f100cd52c 100644 --- a/libs/perun/openapi/src/lib/api/extSourcesManager.service.ts +++ b/libs/perun/openapi/src/lib/api/extSourcesManager.service.ts @@ -11,1096 +11,823 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { ExtSource } from '../model/extSource'; import { ExtSourceObject } from '../model/extSourceObject'; import { PerunException } from '../model/perunException'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class ExtSourcesManagerService { - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration - ) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - /** - * Associate an external source definition with a GROUP. - * @param group id of Group - * @param source external source id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addExtSourceWithGroupSource( - group: number, - source: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public addExtSourceWithGroupSource( - group: number, - source: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public addExtSourceWithGroupSource( - group: number, - source: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public addExtSourceWithGroupSource( - group: number, - source: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling addExtSourceWithGroupSource.' - ); - } - if (source === null || source === undefined) { - throw new Error( - 'Required parameter source was null or undefined when calling addExtSourceWithGroupSource.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (source !== undefined && source !== null) { - queryParameters = queryParameters.set('source', source); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/extSourcesManager/addExtSource/g-s`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Associate an external source definition with a VO. - * @param vo id of Vo - * @param source external source id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addExtSourceWithVoSource( - vo: number, - source: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public addExtSourceWithVoSource( - vo: number, - source: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public addExtSourceWithVoSource( - vo: number, - source: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public addExtSourceWithVoSource( - vo: number, - source: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling addExtSourceWithVoSource.' - ); - } - if (source === null || source === undefined) { - throw new Error( - 'Required parameter source was null or undefined when calling addExtSourceWithVoSource.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (source !== undefined && source !== null) { - queryParameters = queryParameters.set('source', source); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/extSourcesManager/addExtSource/v-s`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Creates an external source. ExtSource object must contain: name, type. Other parameters are ignored. - * @param extSourceObject - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createExtSourceFromExtSourceObject( - extSourceObject: ExtSourceObject, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public createExtSourceFromExtSourceObject( - extSourceObject: ExtSourceObject, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public createExtSourceFromExtSourceObject( - extSourceObject: ExtSourceObject, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public createExtSourceFromExtSourceObject( - extSourceObject: ExtSourceObject, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (extSourceObject === null || extSourceObject === undefined) { - throw new Error( - 'Required parameter extSourceObject was null or undefined when calling createExtSourceFromExtSourceObject.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/extSourcesManager/createExtSource/es`, - extSourceObject, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Creates an external source. - * @param name name of entity - * @param type type of ExtSource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createExtSourceWithNameType( - name: string, - type: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public createExtSourceWithNameType( - name: string, - type: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public createExtSourceWithNameType( - name: string, - type: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public createExtSourceWithNameType( - name: string, - type: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (name === null || name === undefined) { - throw new Error( - 'Required parameter name was null or undefined when calling createExtSourceWithNameType.' - ); - } - if (type === null || type === undefined) { - throw new Error( - 'Required parameter type was null or undefined when calling createExtSourceWithNameType.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (name !== undefined && name !== null) { - queryParameters = queryParameters.set('name', name); - } - if (type !== undefined && type !== null) { - queryParameters = queryParameters.set('type', type); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/extSourcesManager/createExtSource/n-t`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Delete an external source. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteExtSource(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public deleteExtSource( - id: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deleteExtSource( - id: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deleteExtSource( - id: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling deleteExtSource.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/extSourcesManager/deleteExtSource`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns an external source by its id. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getExtSourceById( - id: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getExtSourceById( - id: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getExtSourceById( - id: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getExtSourceById( - id: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getExtSourceById.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/extSourcesManager/getExtSourceById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns an external source by its name. - * @param name name of entity - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getExtSourceByName( - name: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getExtSourceByName( - name: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getExtSourceByName( - name: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getExtSourceByName( - name: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (name === null || name === undefined) { - throw new Error( - 'Required parameter name was null or undefined when calling getExtSourceByName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (name !== undefined && name !== null) { - queryParameters = queryParameters.set('name', name); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/extSourcesManager/getExtSourceByName`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns the list of all external sources. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getExtSources(observe?: 'body', reportProgress?: boolean): Observable>; - public getExtSources( - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getExtSources( - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getExtSources(observe: any = 'body', reportProgress: boolean = false): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/extSourcesManager/getExtSources`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns the list of external sources associated with a GROUP. - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupExtSources( - group: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getGroupExtSources( - group: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getGroupExtSources( - group: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getGroupExtSources( - group: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getGroupExtSources.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/extSourcesManager/getGroupExtSources`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns the list of external sources associated with a VO. - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVoExtSources( - vo: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getVoExtSources( - vo: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getVoExtSources( - vo: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getVoExtSources( - vo: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getVoExtSources.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/extSourcesManager/getVoExtSources`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Loads ext source definitions from the configuration file and updates entries stored in the DB. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public loadExtSourcesDefinitions(observe?: 'body', reportProgress?: boolean): Observable; - public loadExtSourcesDefinitions( - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public loadExtSourcesDefinitions( - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public loadExtSourcesDefinitions( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/extSourcesManager/loadExtSourcesDefinitions`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove an association of an external source from a GROUP. - * @param group id of Group - * @param source external source id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeExtSourceWithGroupSource( - group: number, - source: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeExtSourceWithGroupSource( - group: number, - source: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeExtSourceWithGroupSource( - group: number, - source: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeExtSourceWithGroupSource( - group: number, - source: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling removeExtSourceWithGroupSource.' - ); - } - if (source === null || source === undefined) { - throw new Error( - 'Required parameter source was null or undefined when calling removeExtSourceWithGroupSource.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (source !== undefined && source !== null) { - queryParameters = queryParameters.set('source', source); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/extSourcesManager/removeExtSource/g-s`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove an association of an external source from a VO. - * @param vo id of Vo - * @param source external source id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeExtSourceWithVoSource( - vo: number, - source: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeExtSourceWithVoSource( - vo: number, - source: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeExtSourceWithVoSource( - vo: number, - source: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeExtSourceWithVoSource( - vo: number, - source: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling removeExtSourceWithVoSource.' - ); - } - if (source === null || source === undefined) { - throw new Error( - 'Required parameter source was null or undefined when calling removeExtSourceWithVoSource.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (source !== undefined && source !== null) { - queryParameters = queryParameters.set('source', source); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + + + /** + * Associate an external source definition with a GROUP. + * @param group id of Group + * @param source external source id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addExtSourceWithGroupSource(group: number, source: number, observe?: 'body', reportProgress?: boolean): Observable; + public addExtSourceWithGroupSource(group: number, source: number, observe?: 'response', reportProgress?: boolean): Observable>; + public addExtSourceWithGroupSource(group: number, source: number, observe?: 'events', reportProgress?: boolean): Observable>; + public addExtSourceWithGroupSource(group: number, source: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling addExtSourceWithGroupSource.'); + } + if (source === null || source === undefined) { + throw new Error('Required parameter source was null or undefined when calling addExtSourceWithGroupSource.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (source !== undefined && source !== null) { + queryParameters = queryParameters.set('source', source); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/extSourcesManager/addExtSource/g-s`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Associate an external source definition with a VO. + * @param vo id of Vo + * @param source external source id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addExtSourceWithVoSource(vo: number, source: number, observe?: 'body', reportProgress?: boolean): Observable; + public addExtSourceWithVoSource(vo: number, source: number, observe?: 'response', reportProgress?: boolean): Observable>; + public addExtSourceWithVoSource(vo: number, source: number, observe?: 'events', reportProgress?: boolean): Observable>; + public addExtSourceWithVoSource(vo: number, source: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling addExtSourceWithVoSource.'); + } + if (source === null || source === undefined) { + throw new Error('Required parameter source was null or undefined when calling addExtSourceWithVoSource.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (source !== undefined && source !== null) { + queryParameters = queryParameters.set('source', source); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/extSourcesManager/addExtSource/v-s`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Creates an external source. ExtSource object must contain: name, type. Other parameters are ignored. + * @param extSourceObject + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createExtSourceFromExtSourceObject(extSourceObject: ExtSourceObject, observe?: 'body', reportProgress?: boolean): Observable; + public createExtSourceFromExtSourceObject(extSourceObject: ExtSourceObject, observe?: 'response', reportProgress?: boolean): Observable>; + public createExtSourceFromExtSourceObject(extSourceObject: ExtSourceObject, observe?: 'events', reportProgress?: boolean): Observable>; + public createExtSourceFromExtSourceObject(extSourceObject: ExtSourceObject, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (extSourceObject === null || extSourceObject === undefined) { + throw new Error('Required parameter extSourceObject was null or undefined when calling createExtSourceFromExtSourceObject.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/extSourcesManager/createExtSource/es`, + extSourceObject, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Creates an external source. + * @param name name of entity + * @param type type of ExtSource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createExtSourceWithNameType(name: string, type: string, observe?: 'body', reportProgress?: boolean): Observable; + public createExtSourceWithNameType(name: string, type: string, observe?: 'response', reportProgress?: boolean): Observable>; + public createExtSourceWithNameType(name: string, type: string, observe?: 'events', reportProgress?: boolean): Observable>; + public createExtSourceWithNameType(name: string, type: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling createExtSourceWithNameType.'); + } + if (type === null || type === undefined) { + throw new Error('Required parameter type was null or undefined when calling createExtSourceWithNameType.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (name !== undefined && name !== null) { + queryParameters = queryParameters.set('name', name); + } + if (type !== undefined && type !== null) { + queryParameters = queryParameters.set('type', type); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/extSourcesManager/createExtSource/n-t`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Delete an external source. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteExtSource(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public deleteExtSource(id: number, observe?: 'response', reportProgress?: boolean): Observable>; + public deleteExtSource(id: number, observe?: 'events', reportProgress?: boolean): Observable>; + public deleteExtSource(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling deleteExtSource.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/extSourcesManager/deleteExtSource`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns an external source by its id. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getExtSourceById(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public getExtSourceById(id: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getExtSourceById(id: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getExtSourceById(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getExtSourceById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/extSourcesManager/getExtSourceById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns an external source by its name. + * @param name name of entity + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getExtSourceByName(name: string, observe?: 'body', reportProgress?: boolean): Observable; + public getExtSourceByName(name: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getExtSourceByName(name: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getExtSourceByName(name: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling getExtSourceByName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (name !== undefined && name !== null) { + queryParameters = queryParameters.set('name', name); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/extSourcesManager/getExtSourceByName`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns the list of all external sources. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getExtSources(observe?: 'body', reportProgress?: boolean): Observable>; + public getExtSources(observe?: 'response', reportProgress?: boolean): Observable>>; + public getExtSources(observe?: 'events', reportProgress?: boolean): Observable>>; + public getExtSources(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/extSourcesManager/getExtSources`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns the list of external sources associated with a GROUP. + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupExtSources(group: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getGroupExtSources(group: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getGroupExtSources(group: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getGroupExtSources(group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getGroupExtSources.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/extSourcesManager/getGroupExtSources`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns the list of external sources associated with a VO. + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVoExtSources(vo: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getVoExtSources(vo: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getVoExtSources(vo: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getVoExtSources(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getVoExtSources.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/extSourcesManager/getVoExtSources`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Loads ext source definitions from the configuration file and updates entries stored in the DB. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public loadExtSourcesDefinitions(observe?: 'body', reportProgress?: boolean): Observable; + public loadExtSourcesDefinitions(observe?: 'response', reportProgress?: boolean): Observable>; + public loadExtSourcesDefinitions(observe?: 'events', reportProgress?: boolean): Observable>; + public loadExtSourcesDefinitions(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/extSourcesManager/loadExtSourcesDefinitions`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove an association of an external source from a GROUP. + * @param group id of Group + * @param source external source id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeExtSourceWithGroupSource(group: number, source: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeExtSourceWithGroupSource(group: number, source: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeExtSourceWithGroupSource(group: number, source: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeExtSourceWithGroupSource(group: number, source: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling removeExtSourceWithGroupSource.'); + } + if (source === null || source === undefined) { + throw new Error('Required parameter source was null or undefined when calling removeExtSourceWithGroupSource.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (source !== undefined && source !== null) { + queryParameters = queryParameters.set('source', source); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/extSourcesManager/removeExtSource/g-s`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove an association of an external source from a VO. + * @param vo id of Vo + * @param source external source id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeExtSourceWithVoSource(vo: number, source: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeExtSourceWithVoSource(vo: number, source: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeExtSourceWithVoSource(vo: number, source: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeExtSourceWithVoSource(vo: number, source: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling removeExtSourceWithVoSource.'); + } + if (source === null || source === undefined) { + throw new Error('Required parameter source was null or undefined when calling removeExtSourceWithVoSource.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (source !== undefined && source !== null) { + queryParameters = queryParameters.set('source', source); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/extSourcesManager/removeExtSource/v-s`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/extSourcesManager/removeExtSource/v-s`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } } diff --git a/libs/perun/openapi/src/lib/api/facilitiesManager.service.ts b/libs/perun/openapi/src/lib/api/facilitiesManager.service.ts index 145137563..248859e50 100644 --- a/libs/perun/openapi/src/lib/api/facilitiesManager.service.ts +++ b/libs/perun/openapi/src/lib/api/facilitiesManager.service.ts @@ -11,17 +11,11 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { BanOnFacility } from '../model/banOnFacility'; import { EnrichedFacility } from '../model/enrichedFacility'; @@ -42,8481 +36,6151 @@ import { SecurityTeam } from '../model/securityTeam'; import { User } from '../model/user'; import { Vo } from '../model/vo'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class FacilitiesManagerService { - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration - ) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - /** - * Adds a group as a Facility admin. - * @param facility id of Facility - * @param authorizedGroup Group id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addFacilityAdminGroup( - facility: number, - authorizedGroup: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public addFacilityAdminGroup( - facility: number, - authorizedGroup: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public addFacilityAdminGroup( - facility: number, - authorizedGroup: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public addFacilityAdminGroup( - facility: number, - authorizedGroup: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling addFacilityAdminGroup.' - ); - } - if (authorizedGroup === null || authorizedGroup === undefined) { - throw new Error( - 'Required parameter authorizedGroup was null or undefined when calling addFacilityAdminGroup.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (authorizedGroup !== undefined && authorizedGroup !== null) { - queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/addAdmin/group`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Adds a group as a Facility admin. - * @param facility name of Facility - * @param authorizedGroup Group id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addFacilityAdminGroupByFacilityName( - facility: string, - authorizedGroup: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public addFacilityAdminGroupByFacilityName( - facility: string, - authorizedGroup: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public addFacilityAdminGroupByFacilityName( - facility: string, - authorizedGroup: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public addFacilityAdminGroupByFacilityName( - facility: string, - authorizedGroup: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling addFacilityAdminGroupByFacilityName.' - ); - } - if (authorizedGroup === null || authorizedGroup === undefined) { - throw new Error( - 'Required parameter authorizedGroup was null or undefined when calling addFacilityAdminGroupByFacilityName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (authorizedGroup !== undefined && authorizedGroup !== null) { - queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/addAdmin/group/f-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Adds a user as a Facility admin. - * @param facility id of Facility - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addFacilityAdminUser( - facility: number, - user: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public addFacilityAdminUser( - facility: number, - user: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public addFacilityAdminUser( - facility: number, - user: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public addFacilityAdminUser( - facility: number, - user: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling addFacilityAdminUser.' - ); - } - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling addFacilityAdminUser.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/addAdmin/user`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Adds a user as a Facility admin. - * @param facility name of Facility - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addFacilityAdminUserByFacilityName( - facility: string, - user: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public addFacilityAdminUserByFacilityName( - facility: string, - user: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public addFacilityAdminUserByFacilityName( - facility: string, - user: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public addFacilityAdminUserByFacilityName( - facility: string, - user: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling addFacilityAdminUserByFacilityName.' - ); - } - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling addFacilityAdminUserByFacilityName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/addAdmin/user/f-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Adds owner of a facility. - * @param facility id of Facility - * @param owner id of Owner - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addFacilityOwner( - facility: number, - owner: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public addFacilityOwner( - facility: number, - owner: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public addFacilityOwner( - facility: number, - owner: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public addFacilityOwner( - facility: number, - owner: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling addFacilityOwner.' - ); - } - if (owner === null || owner === undefined) { - throw new Error( - 'Required parameter owner was null or undefined when calling addFacilityOwner.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (owner !== undefined && owner !== null) { - queryParameters = queryParameters.set('owner', owner); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/addOwner`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Adds owner of a facility. - * @param facility name of Facility - * @param owner id of Owner - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addFacilityOwnerByFacilityName( - facility: string, - owner: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public addFacilityOwnerByFacilityName( - facility: string, - owner: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public addFacilityOwnerByFacilityName( - facility: string, - owner: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public addFacilityOwnerByFacilityName( - facility: string, - owner: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling addFacilityOwnerByFacilityName.' - ); - } - if (owner === null || owner === undefined) { - throw new Error( - 'Required parameter owner was null or undefined when calling addFacilityOwnerByFacilityName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (owner !== undefined && owner !== null) { - queryParameters = queryParameters.set('owner', owner); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/addOwner/f-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Adds owner of a facility. - * @param facility name of Facility - * @param owner name of Owner - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addFacilityOwnerByFacilityNameOwnerName( - facility: string, - owner: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public addFacilityOwnerByFacilityNameOwnerName( - facility: string, - owner: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public addFacilityOwnerByFacilityNameOwnerName( - facility: string, - owner: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public addFacilityOwnerByFacilityNameOwnerName( - facility: string, - owner: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling addFacilityOwnerByFacilityNameOwnerName.' - ); - } - if (owner === null || owner === undefined) { - throw new Error( - 'Required parameter owner was null or undefined when calling addFacilityOwnerByFacilityNameOwnerName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (owner !== undefined && owner !== null) { - queryParameters = queryParameters.set('owner', owner); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/addOwner/f-o-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Adds owner of a facility. - * @param facility id of Facility - * @param owner name of Owner - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addFacilityOwnerByOwnerName( - facility: number, - owner: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public addFacilityOwnerByOwnerName( - facility: number, - owner: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public addFacilityOwnerByOwnerName( - facility: number, - owner: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public addFacilityOwnerByOwnerName( - facility: number, - owner: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling addFacilityOwnerByOwnerName.' - ); - } - if (owner === null || owner === undefined) { - throw new Error( - 'Required parameter owner was null or undefined when calling addFacilityOwnerByOwnerName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (owner !== undefined && owner !== null) { - queryParameters = queryParameters.set('owner', owner); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/addOwner/o-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Adds a host to the Facility. - * InvalidHostnameException is thrown when host has invalid hostname. - * @param facility id of Facility - * @param hostname DNS name of host - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addHost( - facility: number, - hostname: string, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public addHost( - facility: number, - hostname: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public addHost( - facility: number, - hostname: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public addHost( - facility: number, - hostname: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling addHost.'); - } - if (hostname === null || hostname === undefined) { - throw new Error('Required parameter hostname was null or undefined when calling addHost.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (hostname !== undefined && hostname !== null) { - queryParameters = queryParameters.set('hostname', hostname); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post>( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/addHost`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Adds a host to the Facility. - * InvalidHostnameException is thrown when host has invalid hostname. - * @param facility name of Facility - * @param hostname DNS name of host - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addHostByFacilityName( - facility: string, - hostname: string, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public addHostByFacilityName( - facility: string, - hostname: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public addHostByFacilityName( - facility: string, - hostname: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public addHostByFacilityName( - facility: string, - hostname: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling addHostByFacilityName.' - ); - } - if (hostname === null || hostname === undefined) { - throw new Error( - 'Required parameter hostname was null or undefined when calling addHostByFacilityName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (hostname !== undefined && hostname !== null) { - queryParameters = queryParameters.set('hostname', hostname); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post>( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/addHost/f-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Adds hosts to the Facility. - * InvalidHostnameException is thrown when any host has invalid hostname. - * @param facility id of Facility - * @param hostnames list of host names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addHosts( - facility: number, - hostnames: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public addHosts( - facility: number, - hostnames: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public addHosts( - facility: number, - hostnames: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public addHosts( - facility: number, - hostnames: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling addHosts.'); - } - if (hostnames === null || hostnames === undefined) { - throw new Error('Required parameter hostnames was null or undefined when calling addHosts.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (hostnames) { - hostnames.forEach((element) => { - queryParameters = queryParameters.append('hostnames[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post>( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/addHosts`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Adds hosts to the Facility. - * InvalidHostnameException is thrown when any host has invalid hostname. - * @param facility name of Facility - * @param hostnames list of host names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addHostsByFacilityName( - facility: string, - hostnames: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public addHostsByFacilityName( - facility: string, - hostnames: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public addHostsByFacilityName( - facility: string, - hostnames: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public addHostsByFacilityName( - facility: string, - hostnames: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling addHostsByFacilityName.' - ); - } - if (hostnames === null || hostnames === undefined) { - throw new Error( - 'Required parameter hostnames was null or undefined when calling addHostsByFacilityName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (hostnames) { - hostnames.forEach((element) => { - queryParameters = queryParameters.append('hostnames[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post>( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/addHosts/f-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Assign given security team to given facility (means the facility trusts the security team) - * @param facility id of Facility - * @param securityTeam SecurityTeam id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public assignSecurityTeam( - facility: number, - securityTeam: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public assignSecurityTeam( - facility: number, - securityTeam: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public assignSecurityTeam( - facility: number, - securityTeam: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public assignSecurityTeam( - facility: number, - securityTeam: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling assignSecurityTeam.' - ); - } - if (securityTeam === null || securityTeam === undefined) { - throw new Error( - 'Required parameter securityTeam was null or undefined when calling assignSecurityTeam.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (securityTeam !== undefined && securityTeam !== null) { - queryParameters = queryParameters.set('securityTeam', securityTeam); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/assignSecurityTeam`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Assign given security team to given facility (means the facility trusts the security team) - * @param facility name of Facility - * @param securityTeam SecurityTeam id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public assignSecurityTeamByFacilityName( - facility: string, - securityTeam: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public assignSecurityTeamByFacilityName( - facility: string, - securityTeam: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public assignSecurityTeamByFacilityName( - facility: string, - securityTeam: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public assignSecurityTeamByFacilityName( - facility: string, - securityTeam: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling assignSecurityTeamByFacilityName.' - ); - } - if (securityTeam === null || securityTeam === undefined) { - throw new Error( - 'Required parameter securityTeam was null or undefined when calling assignSecurityTeamByFacilityName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (securityTeam !== undefined && securityTeam !== null) { - queryParameters = queryParameters.set('securityTeam', securityTeam); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/assignSecurityTeam/f-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Copy attributes (settings) from source facility to destination facility. You must be facility manager of both. - * @param srcFacility source facility id - * @param destFacility destination facility id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyAttributes( - srcFacility: number, - destFacility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public copyAttributes( - srcFacility: number, - destFacility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public copyAttributes( - srcFacility: number, - destFacility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public copyAttributes( - srcFacility: number, - destFacility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (srcFacility === null || srcFacility === undefined) { - throw new Error( - 'Required parameter srcFacility was null or undefined when calling copyAttributes.' - ); - } - if (destFacility === null || destFacility === undefined) { - throw new Error( - 'Required parameter destFacility was null or undefined when calling copyAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (srcFacility !== undefined && srcFacility !== null) { - queryParameters = queryParameters.set('srcFacility', srcFacility); - } - if (destFacility !== undefined && destFacility !== null) { - queryParameters = queryParameters.set('destFacility', destFacility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyAttributes`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Copy attributes (settings) from source facility to destination facility. You must be facility manager of both. - * @param srcFacility source facility id - * @param destFacilityName destination facility name - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyAttributesByDestinationName( - srcFacility: number, - destFacilityName: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public copyAttributesByDestinationName( - srcFacility: number, - destFacilityName: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public copyAttributesByDestinationName( - srcFacility: number, - destFacilityName: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public copyAttributesByDestinationName( - srcFacility: number, - destFacilityName: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (srcFacility === null || srcFacility === undefined) { - throw new Error( - 'Required parameter srcFacility was null or undefined when calling copyAttributesByDestinationName.' - ); - } - if (destFacilityName === null || destFacilityName === undefined) { - throw new Error( - 'Required parameter destFacilityName was null or undefined when calling copyAttributesByDestinationName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (srcFacility !== undefined && srcFacility !== null) { - queryParameters = queryParameters.set('srcFacility', srcFacility); - } - if (destFacilityName !== undefined && destFacilityName !== null) { - queryParameters = queryParameters.set('destFacilityName', destFacilityName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyAttributes/dest-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Copy attributes (settings) from source facility to destination facility. You must be facility manager of both. - * @param srcFacilityName source facility name - * @param destFacilityName destination facility name - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyAttributesBySourceDestinationNames( - srcFacilityName: string, - destFacilityName: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public copyAttributesBySourceDestinationNames( - srcFacilityName: string, - destFacilityName: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public copyAttributesBySourceDestinationNames( - srcFacilityName: string, - destFacilityName: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public copyAttributesBySourceDestinationNames( - srcFacilityName: string, - destFacilityName: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (srcFacilityName === null || srcFacilityName === undefined) { - throw new Error( - 'Required parameter srcFacilityName was null or undefined when calling copyAttributesBySourceDestinationNames.' - ); - } - if (destFacilityName === null || destFacilityName === undefined) { - throw new Error( - 'Required parameter destFacilityName was null or undefined when calling copyAttributesBySourceDestinationNames.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (srcFacilityName !== undefined && srcFacilityName !== null) { - queryParameters = queryParameters.set('srcFacilityName', srcFacilityName); - } - if (destFacilityName !== undefined && destFacilityName !== null) { - queryParameters = queryParameters.set('destFacilityName', destFacilityName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyAttributes/src-dest-names`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Copy attributes (settings) from source facility to destination facility. You must be facility manager of both. - * @param srcFacilityName source facility name - * @param destFacility destination facility id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyAttributesBySourceName( - srcFacilityName: string, - destFacility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public copyAttributesBySourceName( - srcFacilityName: string, - destFacility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public copyAttributesBySourceName( - srcFacilityName: string, - destFacility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public copyAttributesBySourceName( - srcFacilityName: string, - destFacility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (srcFacilityName === null || srcFacilityName === undefined) { - throw new Error( - 'Required parameter srcFacilityName was null or undefined when calling copyAttributesBySourceName.' - ); - } - if (destFacility === null || destFacility === undefined) { - throw new Error( - 'Required parameter destFacility was null or undefined when calling copyAttributesBySourceName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (srcFacilityName !== undefined && srcFacilityName !== null) { - queryParameters = queryParameters.set('srcFacilityName', srcFacilityName); - } - if (destFacility !== undefined && destFacility !== null) { - queryParameters = queryParameters.set('destFacility', destFacility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyAttributes/src-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Copy managers from source facility to destination facility. You must be facility manager of both. - * @param srcFacility source facility id - * @param destFacility destination facility id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyManagers( - srcFacility: number, - destFacility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public copyManagers( - srcFacility: number, - destFacility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public copyManagers( - srcFacility: number, - destFacility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public copyManagers( - srcFacility: number, - destFacility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (srcFacility === null || srcFacility === undefined) { - throw new Error( - 'Required parameter srcFacility was null or undefined when calling copyManagers.' - ); - } - if (destFacility === null || destFacility === undefined) { - throw new Error( - 'Required parameter destFacility was null or undefined when calling copyManagers.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (srcFacility !== undefined && srcFacility !== null) { - queryParameters = queryParameters.set('srcFacility', srcFacility); - } - if (destFacility !== undefined && destFacility !== null) { - queryParameters = queryParameters.set('destFacility', destFacility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyManagers`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Copy managers from source facility to destination facility. You must be facility manager of both. - * @param srcFacility source facility id - * @param destFacilityName destination facility name - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyManagersByDestinationName( - srcFacility: number, - destFacilityName: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public copyManagersByDestinationName( - srcFacility: number, - destFacilityName: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public copyManagersByDestinationName( - srcFacility: number, - destFacilityName: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public copyManagersByDestinationName( - srcFacility: number, - destFacilityName: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (srcFacility === null || srcFacility === undefined) { - throw new Error( - 'Required parameter srcFacility was null or undefined when calling copyManagersByDestinationName.' - ); - } - if (destFacilityName === null || destFacilityName === undefined) { - throw new Error( - 'Required parameter destFacilityName was null or undefined when calling copyManagersByDestinationName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (srcFacility !== undefined && srcFacility !== null) { - queryParameters = queryParameters.set('srcFacility', srcFacility); - } - if (destFacilityName !== undefined && destFacilityName !== null) { - queryParameters = queryParameters.set('destFacilityName', destFacilityName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyManagers/dest-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Copy managers from source facility to destination facility. You must be facility manager of both. - * @param srcFacilityName source facility name - * @param destFacilityName destination facility name - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyManagersBySourceDestinationNames( - srcFacilityName: string, - destFacilityName: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public copyManagersBySourceDestinationNames( - srcFacilityName: string, - destFacilityName: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public copyManagersBySourceDestinationNames( - srcFacilityName: string, - destFacilityName: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public copyManagersBySourceDestinationNames( - srcFacilityName: string, - destFacilityName: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (srcFacilityName === null || srcFacilityName === undefined) { - throw new Error( - 'Required parameter srcFacilityName was null or undefined when calling copyManagersBySourceDestinationNames.' - ); - } - if (destFacilityName === null || destFacilityName === undefined) { - throw new Error( - 'Required parameter destFacilityName was null or undefined when calling copyManagersBySourceDestinationNames.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (srcFacilityName !== undefined && srcFacilityName !== null) { - queryParameters = queryParameters.set('srcFacilityName', srcFacilityName); - } - if (destFacilityName !== undefined && destFacilityName !== null) { - queryParameters = queryParameters.set('destFacilityName', destFacilityName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyManagers/src-dest-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Copy managers from source facility to destination facility. You must be facility manager of both. - * @param srcFacilityName source facility name - * @param destFacility destination facility id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyManagersBySourceName( - srcFacilityName: string, - destFacility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public copyManagersBySourceName( - srcFacilityName: string, - destFacility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public copyManagersBySourceName( - srcFacilityName: string, - destFacility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public copyManagersBySourceName( - srcFacilityName: string, - destFacility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (srcFacilityName === null || srcFacilityName === undefined) { - throw new Error( - 'Required parameter srcFacilityName was null or undefined when calling copyManagersBySourceName.' - ); - } - if (destFacility === null || destFacility === undefined) { - throw new Error( - 'Required parameter destFacility was null or undefined when calling copyManagersBySourceName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (srcFacilityName !== undefined && srcFacilityName !== null) { - queryParameters = queryParameters.set('srcFacilityName', srcFacilityName); - } - if (destFacility !== undefined && destFacility !== null) { - queryParameters = queryParameters.set('destFacility', destFacility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyManagers/src-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Copy owners from source facility to destination facility. You must be facility manager of both. - * @param srcFacility source facility id - * @param destFacility destination facility id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyOwners( - srcFacility: number, - destFacility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public copyOwners( - srcFacility: number, - destFacility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public copyOwners( - srcFacility: number, - destFacility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public copyOwners( - srcFacility: number, - destFacility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (srcFacility === null || srcFacility === undefined) { - throw new Error( - 'Required parameter srcFacility was null or undefined when calling copyOwners.' - ); - } - if (destFacility === null || destFacility === undefined) { - throw new Error( - 'Required parameter destFacility was null or undefined when calling copyOwners.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (srcFacility !== undefined && srcFacility !== null) { - queryParameters = queryParameters.set('srcFacility', srcFacility); - } - if (destFacility !== undefined && destFacility !== null) { - queryParameters = queryParameters.set('destFacility', destFacility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyOwners`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Copy owners from source facility to destination facility. You must be facility manager of both. - * @param srcFacility source facility id - * @param destFacilityName destination facility name - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyOwnersByDestinationName( - srcFacility: number, - destFacilityName: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public copyOwnersByDestinationName( - srcFacility: number, - destFacilityName: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public copyOwnersByDestinationName( - srcFacility: number, - destFacilityName: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public copyOwnersByDestinationName( - srcFacility: number, - destFacilityName: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (srcFacility === null || srcFacility === undefined) { - throw new Error( - 'Required parameter srcFacility was null or undefined when calling copyOwnersByDestinationName.' - ); - } - if (destFacilityName === null || destFacilityName === undefined) { - throw new Error( - 'Required parameter destFacilityName was null or undefined when calling copyOwnersByDestinationName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (srcFacility !== undefined && srcFacility !== null) { - queryParameters = queryParameters.set('srcFacility', srcFacility); - } - if (destFacilityName !== undefined && destFacilityName !== null) { - queryParameters = queryParameters.set('destFacilityName', destFacilityName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyOwners/dest-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Copy owners from source facility to destination facility. You must be facility manager of both. - * @param srcFacilityName source facility name - * @param destFacilityName destination facility name - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyOwnersBySourceDestinationNames( - srcFacilityName: string, - destFacilityName: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public copyOwnersBySourceDestinationNames( - srcFacilityName: string, - destFacilityName: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public copyOwnersBySourceDestinationNames( - srcFacilityName: string, - destFacilityName: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public copyOwnersBySourceDestinationNames( - srcFacilityName: string, - destFacilityName: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (srcFacilityName === null || srcFacilityName === undefined) { - throw new Error( - 'Required parameter srcFacilityName was null or undefined when calling copyOwnersBySourceDestinationNames.' - ); - } - if (destFacilityName === null || destFacilityName === undefined) { - throw new Error( - 'Required parameter destFacilityName was null or undefined when calling copyOwnersBySourceDestinationNames.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (srcFacilityName !== undefined && srcFacilityName !== null) { - queryParameters = queryParameters.set('srcFacilityName', srcFacilityName); - } - if (destFacilityName !== undefined && destFacilityName !== null) { - queryParameters = queryParameters.set('destFacilityName', destFacilityName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyOwners/src-dest-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Copy owners from source facility to destination facility. You must be facility manager of both. - * @param srcFacilityName source facility name - * @param destFacility destination facility id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyOwnersBySourceName( - srcFacilityName: string, - destFacility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public copyOwnersBySourceName( - srcFacilityName: string, - destFacility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public copyOwnersBySourceName( - srcFacilityName: string, - destFacility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public copyOwnersBySourceName( - srcFacilityName: string, - destFacility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (srcFacilityName === null || srcFacilityName === undefined) { - throw new Error( - 'Required parameter srcFacilityName was null or undefined when calling copyOwnersBySourceName.' - ); - } - if (destFacility === null || destFacility === undefined) { - throw new Error( - 'Required parameter destFacility was null or undefined when calling copyOwnersBySourceName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (srcFacilityName !== undefined && srcFacilityName !== null) { - queryParameters = queryParameters.set('srcFacilityName', srcFacilityName); - } - if (destFacility !== undefined && destFacility !== null) { - queryParameters = queryParameters.set('destFacility', destFacility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyOwners/src-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Creates a facility. Caller is automatically set as facility manager. - * @param name name of entity - * @param description optional description of a facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createFacility( - name: string, - description?: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public createFacility( - name: string, - description?: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public createFacility( - name: string, - description?: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public createFacility( - name: string, - description?: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling createFacility.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (name !== undefined && name !== null) { - queryParameters = queryParameters.set('name', name); - } - if (description !== undefined && description !== null) { - queryParameters = queryParameters.set('description', description); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/createFacility`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Deletes a facility. - * @param facility id of Facility - * @param force If true, delete entity forcefully. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteFacility( - facility: number, - force?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public deleteFacility( - facility: number, - force?: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deleteFacility( - facility: number, - force?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deleteFacility( - facility: number, - force?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling deleteFacility.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (force !== undefined && force !== null) { - queryParameters = queryParameters.set('force', force); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/deleteFacility`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Deletes a facility. - * @param facility name of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteFacilityByFacilityName( - facility: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public deleteFacilityByFacilityName( - facility: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deleteFacilityByFacilityName( - facility: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deleteFacilityByFacilityName( - facility: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling deleteFacilityByFacilityName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/deleteFacility/f-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all facilities. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllFacilities(observe?: 'body', reportProgress?: boolean): Observable>; - public getAllFacilities( - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllFacilities( - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAllFacilities(observe: any = 'body', reportProgress: boolean = false): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getFacilities`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all assigned groups on Facility, optionally filtered by Vo or Service or both. - * @param facility id of Facility - * @param vo id of Vo - * @param service id of Service - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllowedGroups( - facility: number, - vo?: number, - service?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAllowedGroups( - facility: number, - vo?: number, - service?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllowedGroups( - facility: number, - vo?: number, - service?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAllowedGroups( - facility: number, - vo?: number, - service?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getAllowedGroups.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getAllowedGroups`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all assigned groups on Facility, optionally filtered by Vo or Service or both. - * @param facility name of Facility - * @param vo id of Vo - * @param service id of Service - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllowedGroupsByFacilityName( - facility: string, - vo?: number, - service?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAllowedGroupsByFacilityName( - facility: string, - vo?: number, - service?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllowedGroupsByFacilityName( - facility: string, - vo?: number, - service?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAllowedGroupsByFacilityName( - facility: string, - vo?: number, - service?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getAllowedGroupsByFacilityName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getAllowedGroups/f-name`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all assigned RichGroups on Facility with specified set of attributes, optionally filtered by Vo or Service or both. - * @param facility id of Facility - * @param attrNames list of attribute names List<String> - * @param vo id of Vo - * @param service id of Service - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllowedRichGroupsWithAttributes( - facility: number, - attrNames: Array, - vo?: number, - service?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAllowedRichGroupsWithAttributes( - facility: number, - attrNames: Array, - vo?: number, - service?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllowedRichGroupsWithAttributes( - facility: number, - attrNames: Array, - vo?: number, - service?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAllowedRichGroupsWithAttributes( - facility: number, - attrNames: Array, - vo?: number, - service?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getAllowedRichGroupsWithAttributes.' - ); - } - if (attrNames === null || attrNames === undefined) { - throw new Error( - 'Required parameter attrNames was null or undefined when calling getAllowedRichGroupsWithAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getAllowedRichGroupsWithAttributes`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all assigned RichGroups on Facility with specified set of attributes, optionally filtered by Vo or Service or both. - * @param facility name of Facility - * @param attrNames list of attribute names List<String> - * @param vo id of Vo - * @param service id of Service - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllowedRichGroupsWithAttributesByFacilityName( - facility: string, - attrNames: Array, - vo?: number, - service?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAllowedRichGroupsWithAttributesByFacilityName( - facility: string, - attrNames: Array, - vo?: number, - service?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllowedRichGroupsWithAttributesByFacilityName( - facility: string, - attrNames: Array, - vo?: number, - service?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAllowedRichGroupsWithAttributesByFacilityName( - facility: string, - attrNames: Array, - vo?: number, - service?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getAllowedRichGroupsWithAttributesByFacilityName.' - ); - } - if (attrNames === null || attrNames === undefined) { - throw new Error( - 'Required parameter attrNames was null or undefined when calling getAllowedRichGroupsWithAttributesByFacilityName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getAllowedRichGroupsWithAttributes/f-name`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Return all users which can use this facility - * @param facility id of Facility - * @param vo VO id, if provided, filter out users who aren\'t in specific VO - * @param service Service id, if provided, filter out users who aren\'t allowed to use the service on the facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllowedUsersOfFacility( - facility: number, - vo?: number, - service?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAllowedUsersOfFacility( - facility: number, - vo?: number, - service?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllowedUsersOfFacility( - facility: number, - vo?: number, - service?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAllowedUsersOfFacility( - facility: number, - vo?: number, - service?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getAllowedUsersOfFacility.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getAllowedUsers/v-f-s`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Return all users which can use this facility - * @param facility name of Facility - * @param vo VO id, if provided, filter out users who aren\'t in specific VO - * @param service Service id, if provided, filter out users who aren\'t allowed to use the service on the facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllowedUsersOfFacilityByFacilityName( - facility: string, - vo?: number, - service?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAllowedUsersOfFacilityByFacilityName( - facility: string, - vo?: number, - service?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllowedUsersOfFacilityByFacilityName( - facility: string, - vo?: number, - service?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAllowedUsersOfFacilityByFacilityName( - facility: string, - vo?: number, - service?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getAllowedUsersOfFacilityByFacilityName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getAllowedUsers/v-f-s/f-name`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Return all VO which can use a facility. (VO must have the resource which belongs to this facility.) - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllowedVos( - facility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAllowedVos( - facility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllowedVos( - facility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAllowedVos( - facility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getAllowedVos.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post>( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/getAllowedVos`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Return all VO which can use a facility. (VO must have the resource which belongs to this facility.) - * @param facility name of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllowedVosByFacilityName( - facility: string, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAllowedVosByFacilityName( - facility: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllowedVosByFacilityName( - facility: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAllowedVosByFacilityName( - facility: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getAllowedVosByFacilityName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post>( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/getAllowedVos/f-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get facilities which are assigned to a Group (via resource). - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedFacilitiesByGroup( - group: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAssignedFacilitiesByGroup( - group: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAssignedFacilitiesByGroup( - group: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAssignedFacilitiesByGroup( - group: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getAssignedFacilitiesByGroup.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getAssignedFacilities/group`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get facilities which have the member access on. - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedFacilitiesByMember( - member: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAssignedFacilitiesByMember( - member: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAssignedFacilitiesByMember( - member: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAssignedFacilitiesByMember( - member: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getAssignedFacilitiesByMember.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getAssignedFacilities/member`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get facilities where the service is defined.. - * @param service id of Service - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedFacilitiesByService( - service: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAssignedFacilitiesByService( - service: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAssignedFacilitiesByService( - service: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAssignedFacilitiesByService( - service: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling getAssignedFacilitiesByService.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getAssignedFacilities/service`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * et facilities which have the user access on. - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedFacilitiesByUser( - user: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAssignedFacilitiesByUser( - user: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAssignedFacilitiesByUser( - user: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAssignedFacilitiesByUser( - user: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling getAssignedFacilitiesByUser.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getAssignedFacilities/user`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns resources with specific service assigned to the facility. - * @param facility id of Facility - * @param service id of Service - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedResourcesByAssignedServiceForFacility( - facility: number, - service: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAssignedResourcesByAssignedServiceForFacility( - facility: number, - service: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAssignedResourcesByAssignedServiceForFacility( - facility: number, - service: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAssignedResourcesByAssignedServiceForFacility( - facility: number, - service: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getAssignedResourcesByAssignedServiceForFacility.' - ); - } - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling getAssignedResourcesByAssignedServiceForFacility.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getAssignedResourcesByAssignedService`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns all resources assigned to a facility. - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedResourcesForFacility( - facility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAssignedResourcesForFacility( - facility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAssignedResourcesForFacility( - facility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAssignedResourcesForFacility( - facility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getAssignedResourcesForFacility.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getAssignedResources`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns all resources assigned to a facility. - * @param facility name of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedResourcesForFacilityByFacilityName( - facility: string, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAssignedResourcesForFacilityByFacilityName( - facility: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAssignedResourcesForFacilityByFacilityName( - facility: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAssignedResourcesForFacilityByFacilityName( - facility: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getAssignedResourcesForFacilityByFacilityName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getAssignedResources/f-name`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns all rich resources assigned to a facility with VO property filled. - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedRichResourcesForFacility( - facility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAssignedRichResourcesForFacility( - facility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAssignedRichResourcesForFacility( - facility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAssignedRichResourcesForFacility( - facility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getAssignedRichResourcesForFacility.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getAssignedRichResources`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns all rich resources assigned to a facility with VO property filled. - * @param facility name of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedRichResourcesForFacilityByFacilityName( - facility: string, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAssignedRichResourcesForFacilityByFacilityName( - facility: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAssignedRichResourcesForFacilityByFacilityName( - facility: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAssignedRichResourcesForFacilityByFacilityName( - facility: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getAssignedRichResourcesForFacilityByFacilityName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getAssignedRichResources/f-name`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Return assigned security teams for specific facility - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedSecurityTeams( - facility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAssignedSecurityTeams( - facility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAssignedSecurityTeams( - facility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAssignedSecurityTeams( - facility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getAssignedSecurityTeams.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getAssignedSecurityTeams`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Return assigned security teams for specific facility - * @param facility name of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedSecurityTeamsByFacilityName( - facility: string, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAssignedSecurityTeamsByFacilityName( - facility: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAssignedSecurityTeamsByFacilityName( - facility: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAssignedSecurityTeamsByFacilityName( - facility: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getAssignedSecurityTeamsByFacilityName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getAssignedSecurityTeams/f-name`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Lists all users assigned to facility containing resources where service is assigned. - * @param facility id of Facility - * @param service id of Service - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedUsers( - facility: number, - service?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAssignedUsers( - facility: number, - service?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAssignedUsers( - facility: number, - service?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAssignedUsers( - facility: number, - service?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getAssignedUsers.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getAssignedUsers`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Lists all users assigned to facility containing resources where service is assigned. - * @param facility name of Facility - * @param service id of Service - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedUsersByFacilityName( - facility: string, - service?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAssignedUsersByFacilityName( - facility: string, - service?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAssignedUsersByFacilityName( - facility: string, - service?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAssignedUsersByFacilityName( - facility: string, - service?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getAssignedUsersByFacilityName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getAssignedUsers/f-name`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all bans for user on the facility. - * @param facilityId id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getBansForFacility( - facilityId: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getBansForFacility( - facilityId: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getBansForFacility( - facilityId: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getBansForFacility( - facilityId: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facilityId === null || facilityId === undefined) { - throw new Error( - 'Required parameter facilityId was null or undefined when calling getBansForFacility.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facilityId !== undefined && facilityId !== null) { - queryParameters = queryParameters.set('facilityId', facilityId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getBansForFacility`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all bans for user on any facility. - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getBansForUser( - user: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getBansForUser( - user: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getBansForUser( - user: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getBansForUser( - user: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getBansForUser.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getBansForUser`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets all enriched facilities user has access rights to. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getEnrichedFacilities( - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getEnrichedFacilities( - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getEnrichedFacilities( - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getEnrichedFacilities( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getEnrichedFacilities`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Return all enriched hosts of given facility. That is host with all its attributes. - * @param facility id of Facility - * @param attrNames list of attribute names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getEnrichedHosts( - facility: number, - attrNames: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getEnrichedHosts( - facility: number, - attrNames: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getEnrichedHosts( - facility: number, - attrNames: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getEnrichedHosts( - facility: number, - attrNames: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getEnrichedHosts.' - ); - } - if (attrNames === null || attrNames === undefined) { - throw new Error( - 'Required parameter attrNames was null or undefined when calling getEnrichedHosts.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getEnrichedHosts`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns all facilities that have the attribute \'attributeName\' with the string value \'attributeValue\'. - * Searching only def and opt attributes. Large attributes are not supported. - * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) - * @param attributeValue string value of Attribute - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilitiesByAttribute( - attributeName: string, - attributeValue: string, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getFacilitiesByAttribute( - attributeName: string, - attributeValue: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getFacilitiesByAttribute( - attributeName: string, - attributeValue: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getFacilitiesByAttribute( - attributeName: string, - attributeValue: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (attributeName === null || attributeName === undefined) { - throw new Error( - 'Required parameter attributeName was null or undefined when calling getFacilitiesByAttribute.' - ); - } - if (attributeValue === null || attributeValue === undefined) { - throw new Error( - 'Required parameter attributeValue was null or undefined when calling getFacilitiesByAttribute.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (attributeName !== undefined && attributeName !== null) { - queryParameters = queryParameters.set('attributeName', attributeName); - } - if (attributeValue !== undefined && attributeValue !== null) { - queryParameters = queryParameters.set('attributeValue', attributeValue); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getFacilitiesByAttribute`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Searches for the Facilities by theirs destination. - * @param destination string name of destination - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilitiesByDestination( - destination: string, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getFacilitiesByDestination( - destination: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getFacilitiesByDestination( - destination: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getFacilitiesByDestination( - destination: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (destination === null || destination === undefined) { - throw new Error( - 'Required parameter destination was null or undefined when calling getFacilitiesByDestination.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (destination !== undefined && destination !== null) { - queryParameters = queryParameters.set('destination', destination); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getFacilitiesByDestination`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Return all facilities where exists host with the specific hostname - * @param hostname specific hostname - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilitiesByHostName( - hostname: string, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getFacilitiesByHostName( - hostname: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getFacilitiesByHostName( - hostname: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getFacilitiesByHostName( - hostname: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (hostname === null || hostname === undefined) { - throw new Error( - 'Required parameter hostname was null or undefined when calling getFacilitiesByHostName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (hostname !== undefined && hostname !== null) { - queryParameters = queryParameters.set('hostname', hostname); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getFacilitiesByHostName`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns list of Facilities by their ids. - * @param ids list of ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilitiesByIds( - ids: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getFacilitiesByIds( - ids: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getFacilitiesByIds( - ids: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getFacilitiesByIds( - ids: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (ids === null || ids === undefined) { - throw new Error( - 'Required parameter ids was null or undefined when calling getFacilitiesByIds.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (ids) { - ids.forEach((element) => { - queryParameters = queryParameters.append('ids[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getFacilitiesByIds`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets count of all facilities. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilitiesCount(observe?: 'body', reportProgress?: boolean): Observable; - public getFacilitiesCount( - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getFacilitiesCount( - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getFacilitiesCount( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/facilitiesManager/getFacilitiesCount`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns list of Facilities, where the user is an Administrator. - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilitiesWhereUserIsAdmin( - user: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getFacilitiesWhereUserIsAdmin( - user: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getFacilitiesWhereUserIsAdmin( - user: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getFacilitiesWhereUserIsAdmin( - user: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling getFacilitiesWhereUserIsAdmin.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getFacilitiesWhereUserIsAdmin`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all Facility group admins. - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityAdminGroups( - facility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getFacilityAdminGroups( - facility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getFacilityAdminGroups( - facility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getFacilityAdminGroups( - facility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getFacilityAdminGroups.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getAdminGroups`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get list of all facility administrators for supported role and given facility. If onlyDirectAdmins is true, return only direct admins of the group for supported role. Supported roles: FacilityAdmin - * @param facility id of Facility - * @param onlyDirectAdmins if true, get only direct facility administrators (if false, get both direct and indirect) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityAdminUsers( - facility: number, - onlyDirectAdmins: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getFacilityAdminUsers( - facility: number, - onlyDirectAdmins: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getFacilityAdminUsers( - facility: number, - onlyDirectAdmins: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getFacilityAdminUsers( - facility: number, - onlyDirectAdmins: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getFacilityAdminUsers.' - ); - } - if (onlyDirectAdmins === null || onlyDirectAdmins === undefined) { - throw new Error( - 'Required parameter onlyDirectAdmins was null or undefined when calling getFacilityAdminUsers.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (onlyDirectAdmins !== undefined && onlyDirectAdmins !== null) { - queryParameters = queryParameters.set('onlyDirectAdmins', onlyDirectAdmins); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getAdmins`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get list of all facility administrators for supported role and given facility. If onlyDirectAdmins is true, return only direct admins of the group for supported role. Supported roles: FacilityAdmin - * @param facility name of Facility - * @param onlyDirectAdmins if true, get only direct facility administrators (if false, get both direct and indirect) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityAdminUsersByFacilityName( - facility: string, - onlyDirectAdmins: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getFacilityAdminUsersByFacilityName( - facility: string, - onlyDirectAdmins: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getFacilityAdminUsersByFacilityName( - facility: string, - onlyDirectAdmins: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getFacilityAdminUsersByFacilityName( - facility: string, - onlyDirectAdmins: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getFacilityAdminUsersByFacilityName.' - ); - } - if (onlyDirectAdmins === null || onlyDirectAdmins === undefined) { - throw new Error( - 'Required parameter onlyDirectAdmins was null or undefined when calling getFacilityAdminUsersByFacilityName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (onlyDirectAdmins !== undefined && onlyDirectAdmins !== null) { - queryParameters = queryParameters.set('onlyDirectAdmins', onlyDirectAdmins); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getAdmins/f-name`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get ban by userId and facilityId. - * @param user id of User - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityBan( - user: number, - facility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getFacilityBan( - user: number, - facility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getFacilityBan( - user: number, - facility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getFacilityBan( - user: number, - facility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getFacilityBan.'); - } - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getFacilityBan.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/facilitiesManager/getBan`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get Ban for user on facility by it\'s id. - * @param banId BanOnFacility id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityBanById( - banId: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getFacilityBanById( - banId: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getFacilityBanById( - banId: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getFacilityBanById( - banId: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (banId === null || banId === undefined) { - throw new Error( - 'Required parameter banId was null or undefined when calling getFacilityBanById.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (banId !== undefined && banId !== null) { - queryParameters = queryParameters.set('banId', banId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/facilitiesManager/getBanById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns Facility with specified id. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityById( - id: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getFacilityById( - id: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getFacilityById( - id: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getFacilityById( - id: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getFacilityById.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/facilitiesManager/getFacilityById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns Facility with specified name. - * @param name name of entity - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityByName( - name: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getFacilityByName( - name: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getFacilityByName( - name: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getFacilityByName( - name: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (name === null || name === undefined) { - throw new Error( - 'Required parameter name was null or undefined when calling getFacilityByName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (name !== undefined && name !== null) { - queryParameters = queryParameters.set('name', name); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/facilitiesManager/getFacilityByName`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Return facility which has the host. - * @param host id of Host - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityForHost( - host: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getFacilityForHost( - host: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getFacilityForHost( - host: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getFacilityForHost( - host: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (host === null || host === undefined) { - throw new Error( - 'Required parameter host was null or undefined when calling getFacilityForHost.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (host !== undefined && host !== null) { - queryParameters = queryParameters.set('host', host); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/facilitiesManager/getFacilityForHost`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns owners of a facility. - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityOwners( - facility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getFacilityOwners( - facility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getFacilityOwners( - facility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getFacilityOwners( - facility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getFacilityOwners.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getOwners`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns owners of a facility. - * @param facility name of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityOwnersByFacilityName( - facility: string, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getFacilityOwnersByFacilityName( - facility: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getFacilityOwnersByFacilityName( - facility: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getFacilityOwnersByFacilityName( - facility: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getFacilityOwnersByFacilityName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getOwners/f-name`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns a host by its id. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getHostById(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public getHostById( - id: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getHostById( - id: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getHostById( - id: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getHostById.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/facilitiesManager/getHostById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns Hosts of a Facility. - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getHosts( - facility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getHosts( - facility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getHosts( - facility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getHosts( - facility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getHosts.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getHosts`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns Hosts of a Facility. - * @param facility name of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getHostsByFacilityName( - facility: string, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getHostsByFacilityName( - facility: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getHostsByFacilityName( - facility: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getHostsByFacilityName( - facility: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getHostsByFacilityName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getHosts/f-name`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns hosts by hostname. (from all facilities) - * @param hostname name of a host - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getHostsByHostname( - hostname: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getHostsByHostname( - hostname: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getHostsByHostname( - hostname: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getHostsByHostname( - hostname: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (hostname === null || hostname === undefined) { - throw new Error( - 'Required parameter hostname was null or undefined when calling getHostsByHostname.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (hostname !== undefined && hostname !== null) { - queryParameters = queryParameters.set('hostname', hostname); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/facilitiesManager/getHostsByHostname`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Count hosts of Facility. - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getHostsCount( - facility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getHostsCount( - facility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getHostsCount( - facility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getHostsCount( - facility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getHostsCount.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/facilitiesManager/getHostsCount`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Count hosts of Facility. - * @param facility name of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getHostsCountByFacilityName( - facility: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getHostsCountByFacilityName( - facility: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getHostsCountByFacilityName( - facility: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getHostsCountByFacilityName( - facility: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getHostsCountByFacilityName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/facilitiesManager/getHostsCount/f-name`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns list of all facilities owned by the owner. - * @param owner id of Owner - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getOwnerFacilities( - owner: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getOwnerFacilities( - owner: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getOwnerFacilities( - owner: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getOwnerFacilities( - owner: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (owner === null || owner === undefined) { - throw new Error( - 'Required parameter owner was null or undefined when calling getOwnerFacilities.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (owner !== undefined && owner !== null) { - queryParameters = queryParameters.set('owner', owner); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getOwnerFacilities`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets all possible rich facilities with all their owners. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRichFacilities( - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getRichFacilities( - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getRichFacilities( - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getRichFacilities( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getRichFacilities`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove specific ban by userId and facilityId. - * @param user id of User - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeBanByUserIdFacilityId( - user: number, - facility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeBanByUserIdFacilityId( - user: number, - facility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeBanByUserIdFacilityId( - user: number, - facility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeBanByUserIdFacilityId( - user: number, - facility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling removeBanByUserIdFacilityId.' - ); - } - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling removeBanByUserIdFacilityId.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeBan/byUserIdFacilityId`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Removes a group as a Facility admin. - * @param facility id of Facility - * @param authorizedGroup Group id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeFacilityAdminGroup( - facility: number, - authorizedGroup: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeFacilityAdminGroup( - facility: number, - authorizedGroup: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeFacilityAdminGroup( - facility: number, - authorizedGroup: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeFacilityAdminGroup( - facility: number, - authorizedGroup: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling removeFacilityAdminGroup.' - ); - } - if (authorizedGroup === null || authorizedGroup === undefined) { - throw new Error( - 'Required parameter authorizedGroup was null or undefined when calling removeFacilityAdminGroup.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (authorizedGroup !== undefined && authorizedGroup !== null) { - queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeAdmin/group`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Removes a group as a Facility admin. - * @param facility name of Facility - * @param authorizedGroup Group id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeFacilityAdminGroupByFacilityName( - facility: string, - authorizedGroup: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeFacilityAdminGroupByFacilityName( - facility: string, - authorizedGroup: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeFacilityAdminGroupByFacilityName( - facility: string, - authorizedGroup: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeFacilityAdminGroupByFacilityName( - facility: string, - authorizedGroup: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling removeFacilityAdminGroupByFacilityName.' - ); - } - if (authorizedGroup === null || authorizedGroup === undefined) { - throw new Error( - 'Required parameter authorizedGroup was null or undefined when calling removeFacilityAdminGroupByFacilityName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (authorizedGroup !== undefined && authorizedGroup !== null) { - queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeAdmin/group/f-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Removes a user as a Facility admin. - * @param facility id of Facility - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeFacilityAdminUser( - facility: number, - user: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeFacilityAdminUser( - facility: number, - user: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeFacilityAdminUser( - facility: number, - user: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeFacilityAdminUser( - facility: number, - user: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling removeFacilityAdminUser.' - ); - } - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling removeFacilityAdminUser.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeAdmin/user`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Removes a user as a Facility admin. - * @param facility name of Facility - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeFacilityAdminUserByFacilityName( - facility: string, - user: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeFacilityAdminUserByFacilityName( - facility: string, - user: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeFacilityAdminUserByFacilityName( - facility: string, - user: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeFacilityAdminUserByFacilityName( - facility: string, - user: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling removeFacilityAdminUserByFacilityName.' - ); - } - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling removeFacilityAdminUserByFacilityName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeAdmin/user/f-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove specific ban by it\'s id. - * @param banId BanOnFacility id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeFacilityBanById( - banId: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeFacilityBanById( - banId: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeFacilityBanById( - banId: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeFacilityBanById( - banId: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (banId === null || banId === undefined) { - throw new Error( - 'Required parameter banId was null or undefined when calling removeFacilityBanById.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (banId !== undefined && banId !== null) { - queryParameters = queryParameters.set('banId', banId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeBan/byId`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Removes owner from a facility. - * @param facility id of Facility - * @param owner id of Owner - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeFacilityOwner( - facility: number, - owner: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeFacilityOwner( - facility: number, - owner: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeFacilityOwner( - facility: number, - owner: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeFacilityOwner( - facility: number, - owner: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling removeFacilityOwner.' - ); - } - if (owner === null || owner === undefined) { - throw new Error( - 'Required parameter owner was null or undefined when calling removeFacilityOwner.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (owner !== undefined && owner !== null) { - queryParameters = queryParameters.set('owner', owner); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeOwner`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Removes owner from a facility. - * @param facility name of Facility - * @param owner id of Owner - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeFacilityOwnerByFacilityName( - facility: string, - owner: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeFacilityOwnerByFacilityName( - facility: string, - owner: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeFacilityOwnerByFacilityName( - facility: string, - owner: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeFacilityOwnerByFacilityName( - facility: string, - owner: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling removeFacilityOwnerByFacilityName.' - ); - } - if (owner === null || owner === undefined) { - throw new Error( - 'Required parameter owner was null or undefined when calling removeFacilityOwnerByFacilityName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (owner !== undefined && owner !== null) { - queryParameters = queryParameters.set('owner', owner); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeOwner/f-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Removes owner from a facility. - * @param facility name of Facility - * @param owner name of Owner - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeFacilityOwnerByFacilityNameOwnerName( - facility: string, - owner: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeFacilityOwnerByFacilityNameOwnerName( - facility: string, - owner: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeFacilityOwnerByFacilityNameOwnerName( - facility: string, - owner: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeFacilityOwnerByFacilityNameOwnerName( - facility: string, - owner: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling removeFacilityOwnerByFacilityNameOwnerName.' - ); - } - if (owner === null || owner === undefined) { - throw new Error( - 'Required parameter owner was null or undefined when calling removeFacilityOwnerByFacilityNameOwnerName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (owner !== undefined && owner !== null) { - queryParameters = queryParameters.set('owner', owner); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeOwner/f-o-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Removes owner from a facility. - * @param facility id of Facility - * @param owner name of Owner - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeFacilityOwnerByOwnerName( - facility: number, - owner: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeFacilityOwnerByOwnerName( - facility: number, - owner: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeFacilityOwnerByOwnerName( - facility: number, - owner: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeFacilityOwnerByOwnerName( - facility: number, - owner: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling removeFacilityOwnerByOwnerName.' - ); - } - if (owner === null || owner === undefined) { - throw new Error( - 'Required parameter owner was null or undefined when calling removeFacilityOwnerByOwnerName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (owner !== undefined && owner !== null) { - queryParameters = queryParameters.set('owner', owner); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeOwner/o-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Removes a host. - * @param host id of Host - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeHost(host: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeHost( - host: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeHost( - host: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeHost( - host: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (host === null || host === undefined) { - throw new Error('Required parameter host was null or undefined when calling removeHost.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (host !== undefined && host !== null) { - queryParameters = queryParameters.set('host', host); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeHost`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove host from the Facility based on hostname. If there is ambiguity, method throws exception and no host is removed. - * @param hostname specific hostname - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeHostByHostname( - hostname: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeHostByHostname( - hostname: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeHostByHostname( - hostname: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeHostByHostname( - hostname: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (hostname === null || hostname === undefined) { - throw new Error( - 'Required parameter hostname was null or undefined when calling removeHostByHostname.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (hostname !== undefined && hostname !== null) { - queryParameters = queryParameters.set('hostname', hostname); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeHostByHostname`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove hosts from a Facility. - * @param facility id of Facility - * @param hosts list of host ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeHosts( - facility: number, - hosts: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeHosts( - facility: number, - hosts: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeHosts( - facility: number, - hosts: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeHosts( - facility: number, - hosts: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling removeHosts.' - ); - } - if (hosts === null || hosts === undefined) { - throw new Error('Required parameter hosts was null or undefined when calling removeHosts.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (hosts) { - hosts.forEach((element) => { - queryParameters = queryParameters.append('hosts[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeHosts`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove hosts from a Facility. - * @param facility name of Facility - * @param hosts list of host ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeHostsByFacilityName( - facility: string, - hosts: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeHostsByFacilityName( - facility: string, - hosts: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeHostsByFacilityName( - facility: string, - hosts: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeHostsByFacilityName( - facility: string, - hosts: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling removeHostsByFacilityName.' - ); - } - if (hosts === null || hosts === undefined) { - throw new Error( - 'Required parameter hosts was null or undefined when calling removeHostsByFacilityName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (hosts) { - hosts.forEach((element) => { - queryParameters = queryParameters.append('hosts[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeHosts/f-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove (Unassign) given security team from given facility - * @param facility id of Facility - * @param securityTeam SecurityTeam id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeSecurityTeam( - facility: number, - securityTeam: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeSecurityTeam( - facility: number, - securityTeam: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeSecurityTeam( - facility: number, - securityTeam: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeSecurityTeam( - facility: number, - securityTeam: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling removeSecurityTeam.' - ); - } - if (securityTeam === null || securityTeam === undefined) { - throw new Error( - 'Required parameter securityTeam was null or undefined when calling removeSecurityTeam.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (securityTeam !== undefined && securityTeam !== null) { - queryParameters = queryParameters.set('securityTeam', securityTeam); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeSecurityTeam`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove (Unassign) given security team from given facility - * @param facility name of Facility - * @param securityTeam SecurityTeam id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeSecurityTeamByFacilityName( - facility: string, - securityTeam: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeSecurityTeamByFacilityName( - facility: string, - securityTeam: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeSecurityTeamByFacilityName( - facility: string, - securityTeam: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeSecurityTeamByFacilityName( - facility: string, - securityTeam: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling removeSecurityTeamByFacilityName.' - ); - } - if (securityTeam === null || securityTeam === undefined) { - throw new Error( - 'Required parameter securityTeam was null or undefined when calling removeSecurityTeamByFacilityName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (securityTeam !== undefined && securityTeam !== null) { - queryParameters = queryParameters.set('securityTeam', securityTeam); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeSecurityTeam/f-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Set ban for user on facility. - * @param inputSetBanForUserOnFacility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setFacilityBan( - inputSetBanForUserOnFacility: InputSetBanForUserOnFacility, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setFacilityBan( - inputSetBanForUserOnFacility: InputSetBanForUserOnFacility, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setFacilityBan( - inputSetBanForUserOnFacility: InputSetBanForUserOnFacility, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setFacilityBan( - inputSetBanForUserOnFacility: InputSetBanForUserOnFacility, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputSetBanForUserOnFacility === null || inputSetBanForUserOnFacility === undefined) { - throw new Error( - 'Required parameter inputSetBanForUserOnFacility was null or undefined when calling setFacilityBan.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/facilitiesManager/setBan`, - inputSetBanForUserOnFacility, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Updates a facility. - * @param inputUpdateFacility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateFacility( - inputUpdateFacility: InputUpdateFacility, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public updateFacility( - inputUpdateFacility: InputUpdateFacility, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public updateFacility( - inputUpdateFacility: InputUpdateFacility, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public updateFacility( - inputUpdateFacility: InputUpdateFacility, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputUpdateFacility === null || inputUpdateFacility === undefined) { - throw new Error( - 'Required parameter inputUpdateFacility was null or undefined when calling updateFacility.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/facilitiesManager/updateFacility`, - inputUpdateFacility, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Update existing ban (description, validation timestamp) - * @param inputUpdateBanForFacility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateFacilityBan( - inputUpdateBanForFacility: InputUpdateBanForFacility, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public updateFacilityBan( - inputUpdateBanForFacility: InputUpdateBanForFacility, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public updateFacilityBan( - inputUpdateBanForFacility: InputUpdateBanForFacility, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public updateFacilityBan( - inputUpdateBanForFacility: InputUpdateBanForFacility, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputUpdateBanForFacility === null || inputUpdateBanForFacility === undefined) { - throw new Error( - 'Required parameter inputUpdateBanForFacility was null or undefined when calling updateFacilityBan.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + + + /** + * Adds a group as a Facility admin. + * @param facility id of Facility + * @param authorizedGroup Group id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addFacilityAdminGroup(facility: number, authorizedGroup: number, observe?: 'body', reportProgress?: boolean): Observable; + public addFacilityAdminGroup(facility: number, authorizedGroup: number, observe?: 'response', reportProgress?: boolean): Observable>; + public addFacilityAdminGroup(facility: number, authorizedGroup: number, observe?: 'events', reportProgress?: boolean): Observable>; + public addFacilityAdminGroup(facility: number, authorizedGroup: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling addFacilityAdminGroup.'); + } + if (authorizedGroup === null || authorizedGroup === undefined) { + throw new Error('Required parameter authorizedGroup was null or undefined when calling addFacilityAdminGroup.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (authorizedGroup !== undefined && authorizedGroup !== null) { + queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/addAdmin/group`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Adds a group as a Facility admin. + * @param facility name of Facility + * @param authorizedGroup Group id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addFacilityAdminGroupByFacilityName(facility: string, authorizedGroup: number, observe?: 'body', reportProgress?: boolean): Observable; + public addFacilityAdminGroupByFacilityName(facility: string, authorizedGroup: number, observe?: 'response', reportProgress?: boolean): Observable>; + public addFacilityAdminGroupByFacilityName(facility: string, authorizedGroup: number, observe?: 'events', reportProgress?: boolean): Observable>; + public addFacilityAdminGroupByFacilityName(facility: string, authorizedGroup: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling addFacilityAdminGroupByFacilityName.'); + } + if (authorizedGroup === null || authorizedGroup === undefined) { + throw new Error('Required parameter authorizedGroup was null or undefined when calling addFacilityAdminGroupByFacilityName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (authorizedGroup !== undefined && authorizedGroup !== null) { + queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/addAdmin/group/f-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Adds a user as a Facility admin. + * @param facility id of Facility + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addFacilityAdminUser(facility: number, user: number, observe?: 'body', reportProgress?: boolean): Observable; + public addFacilityAdminUser(facility: number, user: number, observe?: 'response', reportProgress?: boolean): Observable>; + public addFacilityAdminUser(facility: number, user: number, observe?: 'events', reportProgress?: boolean): Observable>; + public addFacilityAdminUser(facility: number, user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling addFacilityAdminUser.'); + } + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling addFacilityAdminUser.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/addAdmin/user`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Adds a user as a Facility admin. + * @param facility name of Facility + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addFacilityAdminUserByFacilityName(facility: string, user: number, observe?: 'body', reportProgress?: boolean): Observable; + public addFacilityAdminUserByFacilityName(facility: string, user: number, observe?: 'response', reportProgress?: boolean): Observable>; + public addFacilityAdminUserByFacilityName(facility: string, user: number, observe?: 'events', reportProgress?: boolean): Observable>; + public addFacilityAdminUserByFacilityName(facility: string, user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling addFacilityAdminUserByFacilityName.'); + } + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling addFacilityAdminUserByFacilityName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/addAdmin/user/f-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Adds owner of a facility. + * @param facility id of Facility + * @param owner id of Owner + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addFacilityOwner(facility: number, owner: number, observe?: 'body', reportProgress?: boolean): Observable; + public addFacilityOwner(facility: number, owner: number, observe?: 'response', reportProgress?: boolean): Observable>; + public addFacilityOwner(facility: number, owner: number, observe?: 'events', reportProgress?: boolean): Observable>; + public addFacilityOwner(facility: number, owner: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling addFacilityOwner.'); + } + if (owner === null || owner === undefined) { + throw new Error('Required parameter owner was null or undefined when calling addFacilityOwner.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (owner !== undefined && owner !== null) { + queryParameters = queryParameters.set('owner', owner); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/addOwner`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Adds owner of a facility. + * @param facility name of Facility + * @param owner id of Owner + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addFacilityOwnerByFacilityName(facility: string, owner: number, observe?: 'body', reportProgress?: boolean): Observable; + public addFacilityOwnerByFacilityName(facility: string, owner: number, observe?: 'response', reportProgress?: boolean): Observable>; + public addFacilityOwnerByFacilityName(facility: string, owner: number, observe?: 'events', reportProgress?: boolean): Observable>; + public addFacilityOwnerByFacilityName(facility: string, owner: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling addFacilityOwnerByFacilityName.'); + } + if (owner === null || owner === undefined) { + throw new Error('Required parameter owner was null or undefined when calling addFacilityOwnerByFacilityName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (owner !== undefined && owner !== null) { + queryParameters = queryParameters.set('owner', owner); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/addOwner/f-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Adds owner of a facility. + * @param facility name of Facility + * @param owner name of Owner + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addFacilityOwnerByFacilityNameOwnerName(facility: string, owner: string, observe?: 'body', reportProgress?: boolean): Observable; + public addFacilityOwnerByFacilityNameOwnerName(facility: string, owner: string, observe?: 'response', reportProgress?: boolean): Observable>; + public addFacilityOwnerByFacilityNameOwnerName(facility: string, owner: string, observe?: 'events', reportProgress?: boolean): Observable>; + public addFacilityOwnerByFacilityNameOwnerName(facility: string, owner: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling addFacilityOwnerByFacilityNameOwnerName.'); + } + if (owner === null || owner === undefined) { + throw new Error('Required parameter owner was null or undefined when calling addFacilityOwnerByFacilityNameOwnerName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (owner !== undefined && owner !== null) { + queryParameters = queryParameters.set('owner', owner); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/addOwner/f-o-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Adds owner of a facility. + * @param facility id of Facility + * @param owner name of Owner + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addFacilityOwnerByOwnerName(facility: number, owner: string, observe?: 'body', reportProgress?: boolean): Observable; + public addFacilityOwnerByOwnerName(facility: number, owner: string, observe?: 'response', reportProgress?: boolean): Observable>; + public addFacilityOwnerByOwnerName(facility: number, owner: string, observe?: 'events', reportProgress?: boolean): Observable>; + public addFacilityOwnerByOwnerName(facility: number, owner: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling addFacilityOwnerByOwnerName.'); + } + if (owner === null || owner === undefined) { + throw new Error('Required parameter owner was null or undefined when calling addFacilityOwnerByOwnerName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (owner !== undefined && owner !== null) { + queryParameters = queryParameters.set('owner', owner); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/addOwner/o-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Adds a host to the Facility. + * InvalidHostnameException is thrown when host has invalid hostname. + * @param facility id of Facility + * @param hostname DNS name of host + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addHost(facility: number, hostname: string, observe?: 'body', reportProgress?: boolean): Observable>; + public addHost(facility: number, hostname: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public addHost(facility: number, hostname: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public addHost(facility: number, hostname: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling addHost.'); + } + if (hostname === null || hostname === undefined) { + throw new Error('Required parameter hostname was null or undefined when calling addHost.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (hostname !== undefined && hostname !== null) { + queryParameters = queryParameters.set('hostname', hostname); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post>(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/addHost`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Adds a host to the Facility. + * InvalidHostnameException is thrown when host has invalid hostname. + * @param facility name of Facility + * @param hostname DNS name of host + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addHostByFacilityName(facility: string, hostname: string, observe?: 'body', reportProgress?: boolean): Observable>; + public addHostByFacilityName(facility: string, hostname: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public addHostByFacilityName(facility: string, hostname: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public addHostByFacilityName(facility: string, hostname: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling addHostByFacilityName.'); + } + if (hostname === null || hostname === undefined) { + throw new Error('Required parameter hostname was null or undefined when calling addHostByFacilityName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (hostname !== undefined && hostname !== null) { + queryParameters = queryParameters.set('hostname', hostname); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post>(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/addHost/f-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Adds hosts to the Facility. + * InvalidHostnameException is thrown when any host has invalid hostname. + * @param facility id of Facility + * @param hostnames list of host names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addHosts(facility: number, hostnames: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public addHosts(facility: number, hostnames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public addHosts(facility: number, hostnames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public addHosts(facility: number, hostnames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling addHosts.'); + } + if (hostnames === null || hostnames === undefined) { + throw new Error('Required parameter hostnames was null or undefined when calling addHosts.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (hostnames) { + hostnames.forEach((element) => { + queryParameters = queryParameters.append('hostnames[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post>(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/addHosts`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Adds hosts to the Facility. + * InvalidHostnameException is thrown when any host has invalid hostname. + * @param facility name of Facility + * @param hostnames list of host names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addHostsByFacilityName(facility: string, hostnames: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public addHostsByFacilityName(facility: string, hostnames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public addHostsByFacilityName(facility: string, hostnames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public addHostsByFacilityName(facility: string, hostnames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling addHostsByFacilityName.'); + } + if (hostnames === null || hostnames === undefined) { + throw new Error('Required parameter hostnames was null or undefined when calling addHostsByFacilityName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (hostnames) { + hostnames.forEach((element) => { + queryParameters = queryParameters.append('hostnames[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post>(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/addHosts/f-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Assign given security team to given facility (means the facility trusts the security team) + * @param facility id of Facility + * @param securityTeam SecurityTeam id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public assignSecurityTeam(facility: number, securityTeam: number, observe?: 'body', reportProgress?: boolean): Observable; + public assignSecurityTeam(facility: number, securityTeam: number, observe?: 'response', reportProgress?: boolean): Observable>; + public assignSecurityTeam(facility: number, securityTeam: number, observe?: 'events', reportProgress?: boolean): Observable>; + public assignSecurityTeam(facility: number, securityTeam: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling assignSecurityTeam.'); + } + if (securityTeam === null || securityTeam === undefined) { + throw new Error('Required parameter securityTeam was null or undefined when calling assignSecurityTeam.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (securityTeam !== undefined && securityTeam !== null) { + queryParameters = queryParameters.set('securityTeam', securityTeam); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/assignSecurityTeam`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Assign given security team to given facility (means the facility trusts the security team) + * @param facility name of Facility + * @param securityTeam SecurityTeam id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public assignSecurityTeamByFacilityName(facility: string, securityTeam: number, observe?: 'body', reportProgress?: boolean): Observable; + public assignSecurityTeamByFacilityName(facility: string, securityTeam: number, observe?: 'response', reportProgress?: boolean): Observable>; + public assignSecurityTeamByFacilityName(facility: string, securityTeam: number, observe?: 'events', reportProgress?: boolean): Observable>; + public assignSecurityTeamByFacilityName(facility: string, securityTeam: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling assignSecurityTeamByFacilityName.'); + } + if (securityTeam === null || securityTeam === undefined) { + throw new Error('Required parameter securityTeam was null or undefined when calling assignSecurityTeamByFacilityName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (securityTeam !== undefined && securityTeam !== null) { + queryParameters = queryParameters.set('securityTeam', securityTeam); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/assignSecurityTeam/f-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Copy attributes (settings) from source facility to destination facility. You must be facility manager of both. + * @param srcFacility source facility id + * @param destFacility destination facility id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyAttributes(srcFacility: number, destFacility: number, observe?: 'body', reportProgress?: boolean): Observable; + public copyAttributes(srcFacility: number, destFacility: number, observe?: 'response', reportProgress?: boolean): Observable>; + public copyAttributes(srcFacility: number, destFacility: number, observe?: 'events', reportProgress?: boolean): Observable>; + public copyAttributes(srcFacility: number, destFacility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (srcFacility === null || srcFacility === undefined) { + throw new Error('Required parameter srcFacility was null or undefined when calling copyAttributes.'); + } + if (destFacility === null || destFacility === undefined) { + throw new Error('Required parameter destFacility was null or undefined when calling copyAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (srcFacility !== undefined && srcFacility !== null) { + queryParameters = queryParameters.set('srcFacility', srcFacility); + } + if (destFacility !== undefined && destFacility !== null) { + queryParameters = queryParameters.set('destFacility', destFacility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyAttributes`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Copy attributes (settings) from source facility to destination facility. You must be facility manager of both. + * @param srcFacility source facility id + * @param destFacilityName destination facility name + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyAttributesByDestinationName(srcFacility: number, destFacilityName: string, observe?: 'body', reportProgress?: boolean): Observable; + public copyAttributesByDestinationName(srcFacility: number, destFacilityName: string, observe?: 'response', reportProgress?: boolean): Observable>; + public copyAttributesByDestinationName(srcFacility: number, destFacilityName: string, observe?: 'events', reportProgress?: boolean): Observable>; + public copyAttributesByDestinationName(srcFacility: number, destFacilityName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (srcFacility === null || srcFacility === undefined) { + throw new Error('Required parameter srcFacility was null or undefined when calling copyAttributesByDestinationName.'); + } + if (destFacilityName === null || destFacilityName === undefined) { + throw new Error('Required parameter destFacilityName was null or undefined when calling copyAttributesByDestinationName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (srcFacility !== undefined && srcFacility !== null) { + queryParameters = queryParameters.set('srcFacility', srcFacility); + } + if (destFacilityName !== undefined && destFacilityName !== null) { + queryParameters = queryParameters.set('destFacilityName', destFacilityName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyAttributes/dest-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Copy attributes (settings) from source facility to destination facility. You must be facility manager of both. + * @param srcFacilityName source facility name + * @param destFacilityName destination facility name + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyAttributesBySourceDestinationNames(srcFacilityName: string, destFacilityName: string, observe?: 'body', reportProgress?: boolean): Observable; + public copyAttributesBySourceDestinationNames(srcFacilityName: string, destFacilityName: string, observe?: 'response', reportProgress?: boolean): Observable>; + public copyAttributesBySourceDestinationNames(srcFacilityName: string, destFacilityName: string, observe?: 'events', reportProgress?: boolean): Observable>; + public copyAttributesBySourceDestinationNames(srcFacilityName: string, destFacilityName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (srcFacilityName === null || srcFacilityName === undefined) { + throw new Error('Required parameter srcFacilityName was null or undefined when calling copyAttributesBySourceDestinationNames.'); + } + if (destFacilityName === null || destFacilityName === undefined) { + throw new Error('Required parameter destFacilityName was null or undefined when calling copyAttributesBySourceDestinationNames.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (srcFacilityName !== undefined && srcFacilityName !== null) { + queryParameters = queryParameters.set('srcFacilityName', srcFacilityName); + } + if (destFacilityName !== undefined && destFacilityName !== null) { + queryParameters = queryParameters.set('destFacilityName', destFacilityName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyAttributes/src-dest-names`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Copy attributes (settings) from source facility to destination facility. You must be facility manager of both. + * @param srcFacilityName source facility name + * @param destFacility destination facility id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyAttributesBySourceName(srcFacilityName: string, destFacility: number, observe?: 'body', reportProgress?: boolean): Observable; + public copyAttributesBySourceName(srcFacilityName: string, destFacility: number, observe?: 'response', reportProgress?: boolean): Observable>; + public copyAttributesBySourceName(srcFacilityName: string, destFacility: number, observe?: 'events', reportProgress?: boolean): Observable>; + public copyAttributesBySourceName(srcFacilityName: string, destFacility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (srcFacilityName === null || srcFacilityName === undefined) { + throw new Error('Required parameter srcFacilityName was null or undefined when calling copyAttributesBySourceName.'); + } + if (destFacility === null || destFacility === undefined) { + throw new Error('Required parameter destFacility was null or undefined when calling copyAttributesBySourceName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (srcFacilityName !== undefined && srcFacilityName !== null) { + queryParameters = queryParameters.set('srcFacilityName', srcFacilityName); + } + if (destFacility !== undefined && destFacility !== null) { + queryParameters = queryParameters.set('destFacility', destFacility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyAttributes/src-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Copy managers from source facility to destination facility. You must be facility manager of both. + * @param srcFacility source facility id + * @param destFacility destination facility id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyManagers(srcFacility: number, destFacility: number, observe?: 'body', reportProgress?: boolean): Observable; + public copyManagers(srcFacility: number, destFacility: number, observe?: 'response', reportProgress?: boolean): Observable>; + public copyManagers(srcFacility: number, destFacility: number, observe?: 'events', reportProgress?: boolean): Observable>; + public copyManagers(srcFacility: number, destFacility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (srcFacility === null || srcFacility === undefined) { + throw new Error('Required parameter srcFacility was null or undefined when calling copyManagers.'); + } + if (destFacility === null || destFacility === undefined) { + throw new Error('Required parameter destFacility was null or undefined when calling copyManagers.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (srcFacility !== undefined && srcFacility !== null) { + queryParameters = queryParameters.set('srcFacility', srcFacility); + } + if (destFacility !== undefined && destFacility !== null) { + queryParameters = queryParameters.set('destFacility', destFacility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyManagers`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Copy managers from source facility to destination facility. You must be facility manager of both. + * @param srcFacility source facility id + * @param destFacilityName destination facility name + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyManagersByDestinationName(srcFacility: number, destFacilityName: string, observe?: 'body', reportProgress?: boolean): Observable; + public copyManagersByDestinationName(srcFacility: number, destFacilityName: string, observe?: 'response', reportProgress?: boolean): Observable>; + public copyManagersByDestinationName(srcFacility: number, destFacilityName: string, observe?: 'events', reportProgress?: boolean): Observable>; + public copyManagersByDestinationName(srcFacility: number, destFacilityName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (srcFacility === null || srcFacility === undefined) { + throw new Error('Required parameter srcFacility was null or undefined when calling copyManagersByDestinationName.'); + } + if (destFacilityName === null || destFacilityName === undefined) { + throw new Error('Required parameter destFacilityName was null or undefined when calling copyManagersByDestinationName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (srcFacility !== undefined && srcFacility !== null) { + queryParameters = queryParameters.set('srcFacility', srcFacility); + } + if (destFacilityName !== undefined && destFacilityName !== null) { + queryParameters = queryParameters.set('destFacilityName', destFacilityName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyManagers/dest-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Copy managers from source facility to destination facility. You must be facility manager of both. + * @param srcFacilityName source facility name + * @param destFacilityName destination facility name + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyManagersBySourceDestinationNames(srcFacilityName: string, destFacilityName: string, observe?: 'body', reportProgress?: boolean): Observable; + public copyManagersBySourceDestinationNames(srcFacilityName: string, destFacilityName: string, observe?: 'response', reportProgress?: boolean): Observable>; + public copyManagersBySourceDestinationNames(srcFacilityName: string, destFacilityName: string, observe?: 'events', reportProgress?: boolean): Observable>; + public copyManagersBySourceDestinationNames(srcFacilityName: string, destFacilityName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (srcFacilityName === null || srcFacilityName === undefined) { + throw new Error('Required parameter srcFacilityName was null or undefined when calling copyManagersBySourceDestinationNames.'); + } + if (destFacilityName === null || destFacilityName === undefined) { + throw new Error('Required parameter destFacilityName was null or undefined when calling copyManagersBySourceDestinationNames.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (srcFacilityName !== undefined && srcFacilityName !== null) { + queryParameters = queryParameters.set('srcFacilityName', srcFacilityName); + } + if (destFacilityName !== undefined && destFacilityName !== null) { + queryParameters = queryParameters.set('destFacilityName', destFacilityName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyManagers/src-dest-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Copy managers from source facility to destination facility. You must be facility manager of both. + * @param srcFacilityName source facility name + * @param destFacility destination facility id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyManagersBySourceName(srcFacilityName: string, destFacility: number, observe?: 'body', reportProgress?: boolean): Observable; + public copyManagersBySourceName(srcFacilityName: string, destFacility: number, observe?: 'response', reportProgress?: boolean): Observable>; + public copyManagersBySourceName(srcFacilityName: string, destFacility: number, observe?: 'events', reportProgress?: boolean): Observable>; + public copyManagersBySourceName(srcFacilityName: string, destFacility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (srcFacilityName === null || srcFacilityName === undefined) { + throw new Error('Required parameter srcFacilityName was null or undefined when calling copyManagersBySourceName.'); + } + if (destFacility === null || destFacility === undefined) { + throw new Error('Required parameter destFacility was null or undefined when calling copyManagersBySourceName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (srcFacilityName !== undefined && srcFacilityName !== null) { + queryParameters = queryParameters.set('srcFacilityName', srcFacilityName); + } + if (destFacility !== undefined && destFacility !== null) { + queryParameters = queryParameters.set('destFacility', destFacility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyManagers/src-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Copy owners from source facility to destination facility. You must be facility manager of both. + * @param srcFacility source facility id + * @param destFacility destination facility id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyOwners(srcFacility: number, destFacility: number, observe?: 'body', reportProgress?: boolean): Observable; + public copyOwners(srcFacility: number, destFacility: number, observe?: 'response', reportProgress?: boolean): Observable>; + public copyOwners(srcFacility: number, destFacility: number, observe?: 'events', reportProgress?: boolean): Observable>; + public copyOwners(srcFacility: number, destFacility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (srcFacility === null || srcFacility === undefined) { + throw new Error('Required parameter srcFacility was null or undefined when calling copyOwners.'); + } + if (destFacility === null || destFacility === undefined) { + throw new Error('Required parameter destFacility was null or undefined when calling copyOwners.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (srcFacility !== undefined && srcFacility !== null) { + queryParameters = queryParameters.set('srcFacility', srcFacility); + } + if (destFacility !== undefined && destFacility !== null) { + queryParameters = queryParameters.set('destFacility', destFacility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyOwners`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Copy owners from source facility to destination facility. You must be facility manager of both. + * @param srcFacility source facility id + * @param destFacilityName destination facility name + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyOwnersByDestinationName(srcFacility: number, destFacilityName: string, observe?: 'body', reportProgress?: boolean): Observable; + public copyOwnersByDestinationName(srcFacility: number, destFacilityName: string, observe?: 'response', reportProgress?: boolean): Observable>; + public copyOwnersByDestinationName(srcFacility: number, destFacilityName: string, observe?: 'events', reportProgress?: boolean): Observable>; + public copyOwnersByDestinationName(srcFacility: number, destFacilityName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (srcFacility === null || srcFacility === undefined) { + throw new Error('Required parameter srcFacility was null or undefined when calling copyOwnersByDestinationName.'); + } + if (destFacilityName === null || destFacilityName === undefined) { + throw new Error('Required parameter destFacilityName was null or undefined when calling copyOwnersByDestinationName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (srcFacility !== undefined && srcFacility !== null) { + queryParameters = queryParameters.set('srcFacility', srcFacility); + } + if (destFacilityName !== undefined && destFacilityName !== null) { + queryParameters = queryParameters.set('destFacilityName', destFacilityName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyOwners/dest-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Copy owners from source facility to destination facility. You must be facility manager of both. + * @param srcFacilityName source facility name + * @param destFacilityName destination facility name + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyOwnersBySourceDestinationNames(srcFacilityName: string, destFacilityName: string, observe?: 'body', reportProgress?: boolean): Observable; + public copyOwnersBySourceDestinationNames(srcFacilityName: string, destFacilityName: string, observe?: 'response', reportProgress?: boolean): Observable>; + public copyOwnersBySourceDestinationNames(srcFacilityName: string, destFacilityName: string, observe?: 'events', reportProgress?: boolean): Observable>; + public copyOwnersBySourceDestinationNames(srcFacilityName: string, destFacilityName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (srcFacilityName === null || srcFacilityName === undefined) { + throw new Error('Required parameter srcFacilityName was null or undefined when calling copyOwnersBySourceDestinationNames.'); + } + if (destFacilityName === null || destFacilityName === undefined) { + throw new Error('Required parameter destFacilityName was null or undefined when calling copyOwnersBySourceDestinationNames.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (srcFacilityName !== undefined && srcFacilityName !== null) { + queryParameters = queryParameters.set('srcFacilityName', srcFacilityName); + } + if (destFacilityName !== undefined && destFacilityName !== null) { + queryParameters = queryParameters.set('destFacilityName', destFacilityName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyOwners/src-dest-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Copy owners from source facility to destination facility. You must be facility manager of both. + * @param srcFacilityName source facility name + * @param destFacility destination facility id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyOwnersBySourceName(srcFacilityName: string, destFacility: number, observe?: 'body', reportProgress?: boolean): Observable; + public copyOwnersBySourceName(srcFacilityName: string, destFacility: number, observe?: 'response', reportProgress?: boolean): Observable>; + public copyOwnersBySourceName(srcFacilityName: string, destFacility: number, observe?: 'events', reportProgress?: boolean): Observable>; + public copyOwnersBySourceName(srcFacilityName: string, destFacility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (srcFacilityName === null || srcFacilityName === undefined) { + throw new Error('Required parameter srcFacilityName was null or undefined when calling copyOwnersBySourceName.'); + } + if (destFacility === null || destFacility === undefined) { + throw new Error('Required parameter destFacility was null or undefined when calling copyOwnersBySourceName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (srcFacilityName !== undefined && srcFacilityName !== null) { + queryParameters = queryParameters.set('srcFacilityName', srcFacilityName); + } + if (destFacility !== undefined && destFacility !== null) { + queryParameters = queryParameters.set('destFacility', destFacility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyOwners/src-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Creates a facility. Caller is automatically set as facility manager. + * @param name name of entity + * @param description optional description of a facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createFacility(name: string, description?: string, observe?: 'body', reportProgress?: boolean): Observable; + public createFacility(name: string, description?: string, observe?: 'response', reportProgress?: boolean): Observable>; + public createFacility(name: string, description?: string, observe?: 'events', reportProgress?: boolean): Observable>; + public createFacility(name: string, description?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling createFacility.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (name !== undefined && name !== null) { + queryParameters = queryParameters.set('name', name); + } + if (description !== undefined && description !== null) { + queryParameters = queryParameters.set('description', description); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/createFacility`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Deletes a facility. + * @param facility id of Facility + * @param force If true, delete entity forcefully. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteFacility(facility: number, force?: boolean, observe?: 'body', reportProgress?: boolean): Observable; + public deleteFacility(facility: number, force?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; + public deleteFacility(facility: number, force?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; + public deleteFacility(facility: number, force?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling deleteFacility.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (force !== undefined && force !== null) { + queryParameters = queryParameters.set('force', force); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/deleteFacility`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Deletes a facility. + * @param facility name of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteFacilityByFacilityName(facility: string, observe?: 'body', reportProgress?: boolean): Observable; + public deleteFacilityByFacilityName(facility: string, observe?: 'response', reportProgress?: boolean): Observable>; + public deleteFacilityByFacilityName(facility: string, observe?: 'events', reportProgress?: boolean): Observable>; + public deleteFacilityByFacilityName(facility: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling deleteFacilityByFacilityName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/deleteFacility/f-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all facilities. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllFacilities(observe?: 'body', reportProgress?: boolean): Observable>; + public getAllFacilities(observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllFacilities(observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllFacilities(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getFacilities`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all assigned groups on Facility, optionally filtered by Vo or Service or both. + * @param facility id of Facility + * @param vo id of Vo + * @param service id of Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllowedGroups(facility: number, vo?: number, service?: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAllowedGroups(facility: number, vo?: number, service?: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllowedGroups(facility: number, vo?: number, service?: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllowedGroups(facility: number, vo?: number, service?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getAllowedGroups.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAllowedGroups`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all assigned groups on Facility, optionally filtered by Vo or Service or both. + * @param facility name of Facility + * @param vo id of Vo + * @param service id of Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllowedGroupsByFacilityName(facility: string, vo?: number, service?: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAllowedGroupsByFacilityName(facility: string, vo?: number, service?: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllowedGroupsByFacilityName(facility: string, vo?: number, service?: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllowedGroupsByFacilityName(facility: string, vo?: number, service?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getAllowedGroupsByFacilityName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAllowedGroups/f-name`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all assigned RichGroups on Facility with specified set of attributes, optionally filtered by Vo or Service or both. + * @param facility id of Facility + * @param attrNames list of attribute names List<String> + * @param vo id of Vo + * @param service id of Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllowedRichGroupsWithAttributes(facility: number, attrNames: Array, vo?: number, service?: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAllowedRichGroupsWithAttributes(facility: number, attrNames: Array, vo?: number, service?: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllowedRichGroupsWithAttributes(facility: number, attrNames: Array, vo?: number, service?: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllowedRichGroupsWithAttributes(facility: number, attrNames: Array, vo?: number, service?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getAllowedRichGroupsWithAttributes.'); + } + if (attrNames === null || attrNames === undefined) { + throw new Error('Required parameter attrNames was null or undefined when calling getAllowedRichGroupsWithAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAllowedRichGroupsWithAttributes`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all assigned RichGroups on Facility with specified set of attributes, optionally filtered by Vo or Service or both. + * @param facility name of Facility + * @param attrNames list of attribute names List<String> + * @param vo id of Vo + * @param service id of Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllowedRichGroupsWithAttributesByFacilityName(facility: string, attrNames: Array, vo?: number, service?: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAllowedRichGroupsWithAttributesByFacilityName(facility: string, attrNames: Array, vo?: number, service?: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllowedRichGroupsWithAttributesByFacilityName(facility: string, attrNames: Array, vo?: number, service?: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllowedRichGroupsWithAttributesByFacilityName(facility: string, attrNames: Array, vo?: number, service?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getAllowedRichGroupsWithAttributesByFacilityName.'); + } + if (attrNames === null || attrNames === undefined) { + throw new Error('Required parameter attrNames was null or undefined when calling getAllowedRichGroupsWithAttributesByFacilityName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAllowedRichGroupsWithAttributes/f-name`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Return all users which can use this facility + * @param facility id of Facility + * @param vo VO id, if provided, filter out users who aren\'t in specific VO + * @param service Service id, if provided, filter out users who aren\'t allowed to use the service on the facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllowedUsersOfFacility(facility: number, vo?: number, service?: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAllowedUsersOfFacility(facility: number, vo?: number, service?: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllowedUsersOfFacility(facility: number, vo?: number, service?: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllowedUsersOfFacility(facility: number, vo?: number, service?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getAllowedUsersOfFacility.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAllowedUsers/v-f-s`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Return all users which can use this facility + * @param facility name of Facility + * @param vo VO id, if provided, filter out users who aren\'t in specific VO + * @param service Service id, if provided, filter out users who aren\'t allowed to use the service on the facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllowedUsersOfFacilityByFacilityName(facility: string, vo?: number, service?: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAllowedUsersOfFacilityByFacilityName(facility: string, vo?: number, service?: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllowedUsersOfFacilityByFacilityName(facility: string, vo?: number, service?: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllowedUsersOfFacilityByFacilityName(facility: string, vo?: number, service?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getAllowedUsersOfFacilityByFacilityName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAllowedUsers/v-f-s/f-name`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Return all VO which can use a facility. (VO must have the resource which belongs to this facility.) + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllowedVos(facility: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAllowedVos(facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllowedVos(facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllowedVos(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getAllowedVos.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post>(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/getAllowedVos`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Return all VO which can use a facility. (VO must have the resource which belongs to this facility.) + * @param facility name of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllowedVosByFacilityName(facility: string, observe?: 'body', reportProgress?: boolean): Observable>; + public getAllowedVosByFacilityName(facility: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllowedVosByFacilityName(facility: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllowedVosByFacilityName(facility: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getAllowedVosByFacilityName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post>(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/getAllowedVos/f-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get facilities which are assigned to a Group (via resource). + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedFacilitiesByGroup(group: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAssignedFacilitiesByGroup(group: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAssignedFacilitiesByGroup(group: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAssignedFacilitiesByGroup(group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getAssignedFacilitiesByGroup.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAssignedFacilities/group`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get facilities which have the member access on. + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedFacilitiesByMember(member: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAssignedFacilitiesByMember(member: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAssignedFacilitiesByMember(member: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAssignedFacilitiesByMember(member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getAssignedFacilitiesByMember.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAssignedFacilities/member`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get facilities where the service is defined.. + * @param service id of Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedFacilitiesByService(service: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAssignedFacilitiesByService(service: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAssignedFacilitiesByService(service: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAssignedFacilitiesByService(service: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling getAssignedFacilitiesByService.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAssignedFacilities/service`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * et facilities which have the user access on. + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedFacilitiesByUser(user: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAssignedFacilitiesByUser(user: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAssignedFacilitiesByUser(user: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAssignedFacilitiesByUser(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getAssignedFacilitiesByUser.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAssignedFacilities/user`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns resources with specific service assigned to the facility. + * @param facility id of Facility + * @param service id of Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedResourcesByAssignedServiceForFacility(facility: number, service: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAssignedResourcesByAssignedServiceForFacility(facility: number, service: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAssignedResourcesByAssignedServiceForFacility(facility: number, service: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAssignedResourcesByAssignedServiceForFacility(facility: number, service: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getAssignedResourcesByAssignedServiceForFacility.'); + } + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling getAssignedResourcesByAssignedServiceForFacility.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAssignedResourcesByAssignedService`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns all resources assigned to a facility. + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedResourcesForFacility(facility: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAssignedResourcesForFacility(facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAssignedResourcesForFacility(facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAssignedResourcesForFacility(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getAssignedResourcesForFacility.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAssignedResources`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns all resources assigned to a facility. + * @param facility name of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedResourcesForFacilityByFacilityName(facility: string, observe?: 'body', reportProgress?: boolean): Observable>; + public getAssignedResourcesForFacilityByFacilityName(facility: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAssignedResourcesForFacilityByFacilityName(facility: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAssignedResourcesForFacilityByFacilityName(facility: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getAssignedResourcesForFacilityByFacilityName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAssignedResources/f-name`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns all rich resources assigned to a facility with VO property filled. + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedRichResourcesForFacility(facility: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAssignedRichResourcesForFacility(facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAssignedRichResourcesForFacility(facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAssignedRichResourcesForFacility(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getAssignedRichResourcesForFacility.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAssignedRichResources`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns all rich resources assigned to a facility with VO property filled. + * @param facility name of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedRichResourcesForFacilityByFacilityName(facility: string, observe?: 'body', reportProgress?: boolean): Observable>; + public getAssignedRichResourcesForFacilityByFacilityName(facility: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAssignedRichResourcesForFacilityByFacilityName(facility: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAssignedRichResourcesForFacilityByFacilityName(facility: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getAssignedRichResourcesForFacilityByFacilityName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAssignedRichResources/f-name`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Return assigned security teams for specific facility + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedSecurityTeams(facility: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAssignedSecurityTeams(facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAssignedSecurityTeams(facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAssignedSecurityTeams(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getAssignedSecurityTeams.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAssignedSecurityTeams`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Return assigned security teams for specific facility + * @param facility name of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedSecurityTeamsByFacilityName(facility: string, observe?: 'body', reportProgress?: boolean): Observable>; + public getAssignedSecurityTeamsByFacilityName(facility: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAssignedSecurityTeamsByFacilityName(facility: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAssignedSecurityTeamsByFacilityName(facility: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getAssignedSecurityTeamsByFacilityName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAssignedSecurityTeams/f-name`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Lists all users assigned to facility containing resources where service is assigned. + * @param facility id of Facility + * @param service id of Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedUsers(facility: number, service?: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAssignedUsers(facility: number, service?: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAssignedUsers(facility: number, service?: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAssignedUsers(facility: number, service?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getAssignedUsers.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAssignedUsers`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Lists all users assigned to facility containing resources where service is assigned. + * @param facility name of Facility + * @param service id of Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedUsersByFacilityName(facility: string, service?: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAssignedUsersByFacilityName(facility: string, service?: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAssignedUsersByFacilityName(facility: string, service?: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAssignedUsersByFacilityName(facility: string, service?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getAssignedUsersByFacilityName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAssignedUsers/f-name`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all bans for user on the facility. + * @param facilityId id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getBansForFacility(facilityId: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getBansForFacility(facilityId: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getBansForFacility(facilityId: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getBansForFacility(facilityId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facilityId === null || facilityId === undefined) { + throw new Error('Required parameter facilityId was null or undefined when calling getBansForFacility.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facilityId !== undefined && facilityId !== null) { + queryParameters = queryParameters.set('facilityId', facilityId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getBansForFacility`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all bans for user on any facility. + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getBansForUser(user: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getBansForUser(user: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getBansForUser(user: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getBansForUser(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getBansForUser.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getBansForUser`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Gets all enriched facilities user has access rights to. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getEnrichedFacilities(observe?: 'body', reportProgress?: boolean): Observable>; + public getEnrichedFacilities(observe?: 'response', reportProgress?: boolean): Observable>>; + public getEnrichedFacilities(observe?: 'events', reportProgress?: boolean): Observable>>; + public getEnrichedFacilities(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getEnrichedFacilities`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Return all enriched hosts of given facility. That is host with all its attributes. + * @param facility id of Facility + * @param attrNames list of attribute names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getEnrichedHosts(facility: number, attrNames: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getEnrichedHosts(facility: number, attrNames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getEnrichedHosts(facility: number, attrNames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getEnrichedHosts(facility: number, attrNames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getEnrichedHosts.'); + } + if (attrNames === null || attrNames === undefined) { + throw new Error('Required parameter attrNames was null or undefined when calling getEnrichedHosts.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getEnrichedHosts`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns all facilities that have the attribute \'attributeName\' with the string value \'attributeValue\'. + * Searching only def and opt attributes. Large attributes are not supported. + * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) + * @param attributeValue string value of Attribute + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilitiesByAttribute(attributeName: string, attributeValue: string, observe?: 'body', reportProgress?: boolean): Observable>; + public getFacilitiesByAttribute(attributeName: string, attributeValue: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public getFacilitiesByAttribute(attributeName: string, attributeValue: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public getFacilitiesByAttribute(attributeName: string, attributeValue: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (attributeName === null || attributeName === undefined) { + throw new Error('Required parameter attributeName was null or undefined when calling getFacilitiesByAttribute.'); + } + if (attributeValue === null || attributeValue === undefined) { + throw new Error('Required parameter attributeValue was null or undefined when calling getFacilitiesByAttribute.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (attributeName !== undefined && attributeName !== null) { + queryParameters = queryParameters.set('attributeName', attributeName); + } + if (attributeValue !== undefined && attributeValue !== null) { + queryParameters = queryParameters.set('attributeValue', attributeValue); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getFacilitiesByAttribute`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Searches for the Facilities by theirs destination. + * @param destination string name of destination + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilitiesByDestination(destination: string, observe?: 'body', reportProgress?: boolean): Observable>; + public getFacilitiesByDestination(destination: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public getFacilitiesByDestination(destination: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public getFacilitiesByDestination(destination: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (destination === null || destination === undefined) { + throw new Error('Required parameter destination was null or undefined when calling getFacilitiesByDestination.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (destination !== undefined && destination !== null) { + queryParameters = queryParameters.set('destination', destination); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getFacilitiesByDestination`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Return all facilities where exists host with the specific hostname + * @param hostname specific hostname + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilitiesByHostName(hostname: string, observe?: 'body', reportProgress?: boolean): Observable>; + public getFacilitiesByHostName(hostname: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public getFacilitiesByHostName(hostname: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public getFacilitiesByHostName(hostname: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (hostname === null || hostname === undefined) { + throw new Error('Required parameter hostname was null or undefined when calling getFacilitiesByHostName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (hostname !== undefined && hostname !== null) { + queryParameters = queryParameters.set('hostname', hostname); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getFacilitiesByHostName`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns list of Facilities by their ids. + * @param ids list of ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilitiesByIds(ids: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getFacilitiesByIds(ids: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getFacilitiesByIds(ids: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getFacilitiesByIds(ids: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (ids === null || ids === undefined) { + throw new Error('Required parameter ids was null or undefined when calling getFacilitiesByIds.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (ids) { + ids.forEach((element) => { + queryParameters = queryParameters.append('ids[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getFacilitiesByIds`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Gets count of all facilities. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilitiesCount(observe?: 'body', reportProgress?: boolean): Observable; + public getFacilitiesCount(observe?: 'response', reportProgress?: boolean): Observable>; + public getFacilitiesCount(observe?: 'events', reportProgress?: boolean): Observable>; + public getFacilitiesCount(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/facilitiesManager/getFacilitiesCount`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns list of Facilities, where the user is a direct Administrator or a VALID member of an administrator group. + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilitiesWhereUserIsAdmin(user: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getFacilitiesWhereUserIsAdmin(user: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getFacilitiesWhereUserIsAdmin(user: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getFacilitiesWhereUserIsAdmin(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getFacilitiesWhereUserIsAdmin.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getFacilitiesWhereUserIsAdmin`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all Facility group admins. + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityAdminGroups(facility: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getFacilityAdminGroups(facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getFacilityAdminGroups(facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getFacilityAdminGroups(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getFacilityAdminGroups.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAdminGroups`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get list of all facility administrators for supported role and given facility. If onlyDirectAdmins is true, return only direct admins of the group for supported role. Includes users who are VALID members of administrator groups. Supported roles: FacilityAdmin + * @param facility id of Facility + * @param onlyDirectAdmins if true, get only direct facility administrators (if false, get both direct and indirect) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityAdminUsers(facility: number, onlyDirectAdmins: boolean, observe?: 'body', reportProgress?: boolean): Observable>; + public getFacilityAdminUsers(facility: number, onlyDirectAdmins: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; + public getFacilityAdminUsers(facility: number, onlyDirectAdmins: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; + public getFacilityAdminUsers(facility: number, onlyDirectAdmins: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getFacilityAdminUsers.'); + } + if (onlyDirectAdmins === null || onlyDirectAdmins === undefined) { + throw new Error('Required parameter onlyDirectAdmins was null or undefined when calling getFacilityAdminUsers.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (onlyDirectAdmins !== undefined && onlyDirectAdmins !== null) { + queryParameters = queryParameters.set('onlyDirectAdmins', onlyDirectAdmins); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAdmins`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get list of all facility administrators for supported role and given facility. If onlyDirectAdmins is true, return only direct admins of the group for supported role. Includes users who are VALID members of administrator groups. Supported roles: FacilityAdmin + * @param facility name of Facility + * @param onlyDirectAdmins if true, get only direct facility administrators (if false, get both direct and indirect) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityAdminUsersByFacilityName(facility: string, onlyDirectAdmins: boolean, observe?: 'body', reportProgress?: boolean): Observable>; + public getFacilityAdminUsersByFacilityName(facility: string, onlyDirectAdmins: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; + public getFacilityAdminUsersByFacilityName(facility: string, onlyDirectAdmins: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; + public getFacilityAdminUsersByFacilityName(facility: string, onlyDirectAdmins: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getFacilityAdminUsersByFacilityName.'); + } + if (onlyDirectAdmins === null || onlyDirectAdmins === undefined) { + throw new Error('Required parameter onlyDirectAdmins was null or undefined when calling getFacilityAdminUsersByFacilityName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (onlyDirectAdmins !== undefined && onlyDirectAdmins !== null) { + queryParameters = queryParameters.set('onlyDirectAdmins', onlyDirectAdmins); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAdmins/f-name`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get ban by userId and facilityId. + * @param user id of User + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityBan(user: number, facility: number, observe?: 'body', reportProgress?: boolean): Observable; + public getFacilityBan(user: number, facility: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getFacilityBan(user: number, facility: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getFacilityBan(user: number, facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getFacilityBan.'); + } + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getFacilityBan.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/facilitiesManager/getBan`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get Ban for user on facility by it\'s id. + * @param banId BanOnFacility id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityBanById(banId: number, observe?: 'body', reportProgress?: boolean): Observable; + public getFacilityBanById(banId: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getFacilityBanById(banId: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getFacilityBanById(banId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (banId === null || banId === undefined) { + throw new Error('Required parameter banId was null or undefined when calling getFacilityBanById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (banId !== undefined && banId !== null) { + queryParameters = queryParameters.set('banId', banId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/facilitiesManager/getBanById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns Facility with specified id. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityById(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public getFacilityById(id: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getFacilityById(id: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getFacilityById(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getFacilityById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/facilitiesManager/getFacilityById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns Facility with specified name. + * @param name name of entity + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityByName(name: string, observe?: 'body', reportProgress?: boolean): Observable; + public getFacilityByName(name: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getFacilityByName(name: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getFacilityByName(name: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling getFacilityByName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (name !== undefined && name !== null) { + queryParameters = queryParameters.set('name', name); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/facilitiesManager/getFacilityByName`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Return facility which has the host. + * @param host id of Host + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityForHost(host: number, observe?: 'body', reportProgress?: boolean): Observable; + public getFacilityForHost(host: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getFacilityForHost(host: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getFacilityForHost(host: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (host === null || host === undefined) { + throw new Error('Required parameter host was null or undefined when calling getFacilityForHost.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (host !== undefined && host !== null) { + queryParameters = queryParameters.set('host', host); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/facilitiesManager/getFacilityForHost`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns owners of a facility. + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityOwners(facility: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getFacilityOwners(facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getFacilityOwners(facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getFacilityOwners(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getFacilityOwners.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getOwners`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns owners of a facility. + * @param facility name of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityOwnersByFacilityName(facility: string, observe?: 'body', reportProgress?: boolean): Observable>; + public getFacilityOwnersByFacilityName(facility: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public getFacilityOwnersByFacilityName(facility: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public getFacilityOwnersByFacilityName(facility: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getFacilityOwnersByFacilityName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getOwners/f-name`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns a host by its id. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getHostById(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public getHostById(id: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getHostById(id: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getHostById(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getHostById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/facilitiesManager/getHostById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns Hosts of a Facility. + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getHosts(facility: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getHosts(facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getHosts(facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getHosts(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getHosts.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getHosts`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns Hosts of a Facility. + * @param facility name of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getHostsByFacilityName(facility: string, observe?: 'body', reportProgress?: boolean): Observable>; + public getHostsByFacilityName(facility: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public getHostsByFacilityName(facility: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public getHostsByFacilityName(facility: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getHostsByFacilityName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getHosts/f-name`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns hosts by hostname. (from all facilities) + * @param hostname name of a host + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getHostsByHostname(hostname: string, observe?: 'body', reportProgress?: boolean): Observable; + public getHostsByHostname(hostname: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getHostsByHostname(hostname: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getHostsByHostname(hostname: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (hostname === null || hostname === undefined) { + throw new Error('Required parameter hostname was null or undefined when calling getHostsByHostname.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (hostname !== undefined && hostname !== null) { + queryParameters = queryParameters.set('hostname', hostname); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/facilitiesManager/getHostsByHostname`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Count hosts of Facility. + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getHostsCount(facility: number, observe?: 'body', reportProgress?: boolean): Observable; + public getHostsCount(facility: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getHostsCount(facility: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getHostsCount(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getHostsCount.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/facilitiesManager/getHostsCount`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Count hosts of Facility. + * @param facility name of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getHostsCountByFacilityName(facility: string, observe?: 'body', reportProgress?: boolean): Observable; + public getHostsCountByFacilityName(facility: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getHostsCountByFacilityName(facility: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getHostsCountByFacilityName(facility: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getHostsCountByFacilityName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/facilitiesManager/getHostsCount/f-name`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns list of all facilities owned by the owner. + * @param owner id of Owner + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getOwnerFacilities(owner: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getOwnerFacilities(owner: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getOwnerFacilities(owner: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getOwnerFacilities(owner: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (owner === null || owner === undefined) { + throw new Error('Required parameter owner was null or undefined when calling getOwnerFacilities.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (owner !== undefined && owner !== null) { + queryParameters = queryParameters.set('owner', owner); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getOwnerFacilities`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Gets all possible rich facilities with all their owners. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRichFacilities(observe?: 'body', reportProgress?: boolean): Observable>; + public getRichFacilities(observe?: 'response', reportProgress?: boolean): Observable>>; + public getRichFacilities(observe?: 'events', reportProgress?: boolean): Observable>>; + public getRichFacilities(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getRichFacilities`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove specific ban by userId and facilityId. + * @param user id of User + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeBanByUserIdFacilityId(user: number, facility: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeBanByUserIdFacilityId(user: number, facility: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeBanByUserIdFacilityId(user: number, facility: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeBanByUserIdFacilityId(user: number, facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling removeBanByUserIdFacilityId.'); + } + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling removeBanByUserIdFacilityId.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeBan/byUserIdFacilityId`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Removes a group as a Facility admin. + * @param facility id of Facility + * @param authorizedGroup Group id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeFacilityAdminGroup(facility: number, authorizedGroup: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeFacilityAdminGroup(facility: number, authorizedGroup: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeFacilityAdminGroup(facility: number, authorizedGroup: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeFacilityAdminGroup(facility: number, authorizedGroup: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling removeFacilityAdminGroup.'); + } + if (authorizedGroup === null || authorizedGroup === undefined) { + throw new Error('Required parameter authorizedGroup was null or undefined when calling removeFacilityAdminGroup.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (authorizedGroup !== undefined && authorizedGroup !== null) { + queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeAdmin/group`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Removes a group as a Facility admin. + * @param facility name of Facility + * @param authorizedGroup Group id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeFacilityAdminGroupByFacilityName(facility: string, authorizedGroup: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeFacilityAdminGroupByFacilityName(facility: string, authorizedGroup: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeFacilityAdminGroupByFacilityName(facility: string, authorizedGroup: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeFacilityAdminGroupByFacilityName(facility: string, authorizedGroup: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling removeFacilityAdminGroupByFacilityName.'); + } + if (authorizedGroup === null || authorizedGroup === undefined) { + throw new Error('Required parameter authorizedGroup was null or undefined when calling removeFacilityAdminGroupByFacilityName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (authorizedGroup !== undefined && authorizedGroup !== null) { + queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeAdmin/group/f-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Removes a user as a Facility admin. + * @param facility id of Facility + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeFacilityAdminUser(facility: number, user: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeFacilityAdminUser(facility: number, user: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeFacilityAdminUser(facility: number, user: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeFacilityAdminUser(facility: number, user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling removeFacilityAdminUser.'); + } + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling removeFacilityAdminUser.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeAdmin/user`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Removes a user as a Facility admin. + * @param facility name of Facility + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeFacilityAdminUserByFacilityName(facility: string, user: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeFacilityAdminUserByFacilityName(facility: string, user: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeFacilityAdminUserByFacilityName(facility: string, user: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeFacilityAdminUserByFacilityName(facility: string, user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling removeFacilityAdminUserByFacilityName.'); + } + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling removeFacilityAdminUserByFacilityName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeAdmin/user/f-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove specific ban by it\'s id. + * @param banId BanOnFacility id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeFacilityBanById(banId: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeFacilityBanById(banId: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeFacilityBanById(banId: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeFacilityBanById(banId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (banId === null || banId === undefined) { + throw new Error('Required parameter banId was null or undefined when calling removeFacilityBanById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (banId !== undefined && banId !== null) { + queryParameters = queryParameters.set('banId', banId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeBan/byId`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Removes owner from a facility. + * @param facility id of Facility + * @param owner id of Owner + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeFacilityOwner(facility: number, owner: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeFacilityOwner(facility: number, owner: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeFacilityOwner(facility: number, owner: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeFacilityOwner(facility: number, owner: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling removeFacilityOwner.'); + } + if (owner === null || owner === undefined) { + throw new Error('Required parameter owner was null or undefined when calling removeFacilityOwner.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (owner !== undefined && owner !== null) { + queryParameters = queryParameters.set('owner', owner); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeOwner`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Removes owner from a facility. + * @param facility name of Facility + * @param owner id of Owner + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeFacilityOwnerByFacilityName(facility: string, owner: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeFacilityOwnerByFacilityName(facility: string, owner: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeFacilityOwnerByFacilityName(facility: string, owner: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeFacilityOwnerByFacilityName(facility: string, owner: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling removeFacilityOwnerByFacilityName.'); + } + if (owner === null || owner === undefined) { + throw new Error('Required parameter owner was null or undefined when calling removeFacilityOwnerByFacilityName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (owner !== undefined && owner !== null) { + queryParameters = queryParameters.set('owner', owner); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeOwner/f-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Removes owner from a facility. + * @param facility name of Facility + * @param owner name of Owner + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeFacilityOwnerByFacilityNameOwnerName(facility: string, owner: string, observe?: 'body', reportProgress?: boolean): Observable; + public removeFacilityOwnerByFacilityNameOwnerName(facility: string, owner: string, observe?: 'response', reportProgress?: boolean): Observable>; + public removeFacilityOwnerByFacilityNameOwnerName(facility: string, owner: string, observe?: 'events', reportProgress?: boolean): Observable>; + public removeFacilityOwnerByFacilityNameOwnerName(facility: string, owner: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling removeFacilityOwnerByFacilityNameOwnerName.'); + } + if (owner === null || owner === undefined) { + throw new Error('Required parameter owner was null or undefined when calling removeFacilityOwnerByFacilityNameOwnerName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (owner !== undefined && owner !== null) { + queryParameters = queryParameters.set('owner', owner); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeOwner/f-o-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Removes owner from a facility. + * @param facility id of Facility + * @param owner name of Owner + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeFacilityOwnerByOwnerName(facility: number, owner: string, observe?: 'body', reportProgress?: boolean): Observable; + public removeFacilityOwnerByOwnerName(facility: number, owner: string, observe?: 'response', reportProgress?: boolean): Observable>; + public removeFacilityOwnerByOwnerName(facility: number, owner: string, observe?: 'events', reportProgress?: boolean): Observable>; + public removeFacilityOwnerByOwnerName(facility: number, owner: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling removeFacilityOwnerByOwnerName.'); + } + if (owner === null || owner === undefined) { + throw new Error('Required parameter owner was null or undefined when calling removeFacilityOwnerByOwnerName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (owner !== undefined && owner !== null) { + queryParameters = queryParameters.set('owner', owner); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeOwner/o-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Removes a host. + * @param host id of Host + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeHost(host: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeHost(host: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeHost(host: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeHost(host: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (host === null || host === undefined) { + throw new Error('Required parameter host was null or undefined when calling removeHost.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (host !== undefined && host !== null) { + queryParameters = queryParameters.set('host', host); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeHost`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove host from the Facility based on hostname. If there is ambiguity, method throws exception and no host is removed. + * @param hostname specific hostname + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeHostByHostname(hostname: string, observe?: 'body', reportProgress?: boolean): Observable; + public removeHostByHostname(hostname: string, observe?: 'response', reportProgress?: boolean): Observable>; + public removeHostByHostname(hostname: string, observe?: 'events', reportProgress?: boolean): Observable>; + public removeHostByHostname(hostname: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (hostname === null || hostname === undefined) { + throw new Error('Required parameter hostname was null or undefined when calling removeHostByHostname.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (hostname !== undefined && hostname !== null) { + queryParameters = queryParameters.set('hostname', hostname); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeHostByHostname`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove hosts from a Facility. + * @param facility id of Facility + * @param hosts list of host ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeHosts(facility: number, hosts: Array, observe?: 'body', reportProgress?: boolean): Observable; + public removeHosts(facility: number, hosts: Array, observe?: 'response', reportProgress?: boolean): Observable>; + public removeHosts(facility: number, hosts: Array, observe?: 'events', reportProgress?: boolean): Observable>; + public removeHosts(facility: number, hosts: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling removeHosts.'); + } + if (hosts === null || hosts === undefined) { + throw new Error('Required parameter hosts was null or undefined when calling removeHosts.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (hosts) { + hosts.forEach((element) => { + queryParameters = queryParameters.append('hosts[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeHosts`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove hosts from a Facility. + * @param facility name of Facility + * @param hosts list of host ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeHostsByFacilityName(facility: string, hosts: Array, observe?: 'body', reportProgress?: boolean): Observable; + public removeHostsByFacilityName(facility: string, hosts: Array, observe?: 'response', reportProgress?: boolean): Observable>; + public removeHostsByFacilityName(facility: string, hosts: Array, observe?: 'events', reportProgress?: boolean): Observable>; + public removeHostsByFacilityName(facility: string, hosts: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling removeHostsByFacilityName.'); + } + if (hosts === null || hosts === undefined) { + throw new Error('Required parameter hosts was null or undefined when calling removeHostsByFacilityName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (hosts) { + hosts.forEach((element) => { + queryParameters = queryParameters.append('hosts[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeHosts/f-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove (Unassign) given security team from given facility + * @param facility id of Facility + * @param securityTeam SecurityTeam id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeSecurityTeam(facility: number, securityTeam: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeSecurityTeam(facility: number, securityTeam: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeSecurityTeam(facility: number, securityTeam: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeSecurityTeam(facility: number, securityTeam: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling removeSecurityTeam.'); + } + if (securityTeam === null || securityTeam === undefined) { + throw new Error('Required parameter securityTeam was null or undefined when calling removeSecurityTeam.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (securityTeam !== undefined && securityTeam !== null) { + queryParameters = queryParameters.set('securityTeam', securityTeam); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeSecurityTeam`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove (Unassign) given security team from given facility + * @param facility name of Facility + * @param securityTeam SecurityTeam id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeSecurityTeamByFacilityName(facility: string, securityTeam: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeSecurityTeamByFacilityName(facility: string, securityTeam: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeSecurityTeamByFacilityName(facility: string, securityTeam: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeSecurityTeamByFacilityName(facility: string, securityTeam: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling removeSecurityTeamByFacilityName.'); + } + if (securityTeam === null || securityTeam === undefined) { + throw new Error('Required parameter securityTeam was null or undefined when calling removeSecurityTeamByFacilityName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (securityTeam !== undefined && securityTeam !== null) { + queryParameters = queryParameters.set('securityTeam', securityTeam); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeSecurityTeam/f-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Set ban for user on facility. + * @param inputSetBanForUserOnFacility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setFacilityBan(inputSetBanForUserOnFacility: InputSetBanForUserOnFacility, observe?: 'body', reportProgress?: boolean): Observable; + public setFacilityBan(inputSetBanForUserOnFacility: InputSetBanForUserOnFacility, observe?: 'response', reportProgress?: boolean): Observable>; + public setFacilityBan(inputSetBanForUserOnFacility: InputSetBanForUserOnFacility, observe?: 'events', reportProgress?: boolean): Observable>; + public setFacilityBan(inputSetBanForUserOnFacility: InputSetBanForUserOnFacility, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetBanForUserOnFacility === null || inputSetBanForUserOnFacility === undefined) { + throw new Error('Required parameter inputSetBanForUserOnFacility was null or undefined when calling setFacilityBan.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/facilitiesManager/setBan`, + inputSetBanForUserOnFacility, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Updates a facility. + * @param inputUpdateFacility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateFacility(inputUpdateFacility: InputUpdateFacility, observe?: 'body', reportProgress?: boolean): Observable; + public updateFacility(inputUpdateFacility: InputUpdateFacility, observe?: 'response', reportProgress?: boolean): Observable>; + public updateFacility(inputUpdateFacility: InputUpdateFacility, observe?: 'events', reportProgress?: boolean): Observable>; + public updateFacility(inputUpdateFacility: InputUpdateFacility, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputUpdateFacility === null || inputUpdateFacility === undefined) { + throw new Error('Required parameter inputUpdateFacility was null or undefined when calling updateFacility.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/facilitiesManager/updateFacility`, + inputUpdateFacility, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Update existing ban (description, validation timestamp) + * @param inputUpdateBanForFacility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateFacilityBan(inputUpdateBanForFacility: InputUpdateBanForFacility, observe?: 'body', reportProgress?: boolean): Observable; + public updateFacilityBan(inputUpdateBanForFacility: InputUpdateBanForFacility, observe?: 'response', reportProgress?: boolean): Observable>; + public updateFacilityBan(inputUpdateBanForFacility: InputUpdateBanForFacility, observe?: 'events', reportProgress?: boolean): Observable>; + public updateFacilityBan(inputUpdateBanForFacility: InputUpdateBanForFacility, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputUpdateBanForFacility === null || inputUpdateBanForFacility === undefined) { + throw new Error('Required parameter inputUpdateBanForFacility was null or undefined when calling updateFacilityBan.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/facilitiesManager/updateBan`, + inputUpdateBanForFacility, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } - return this.httpClient.post( - `${this.configuration.basePath}/json/facilitiesManager/updateBan`, - inputUpdateBanForFacility, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } } diff --git a/libs/perun/openapi/src/lib/api/facilitiesManagerByFacilityName.service.ts b/libs/perun/openapi/src/lib/api/facilitiesManagerByFacilityName.service.ts index c72049f3b..3987463e6 100644 --- a/libs/perun/openapi/src/lib/api/facilitiesManagerByFacilityName.service.ts +++ b/libs/perun/openapi/src/lib/api/facilitiesManagerByFacilityName.service.ts @@ -11,126 +11,101 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { Group } from '../model/group'; import { PerunException } from '../model/perunException'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class FacilitiesManagerByFacilityNameService { - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration - ) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - /** - * Get all Facility group admins. - * @param facility name of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityAdminGroupsByFacilityName( - facility: string, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getFacilityAdminGroupsByFacilityName( - facility: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getFacilityAdminGroupsByFacilityName( - facility: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getFacilityAdminGroupsByFacilityName( - facility: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getFacilityAdminGroupsByFacilityName.' - ); - } - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); } - let headers = this.defaultHeaders; - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); + /** + * Get all Facility group admins. + * @param facility name of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityAdminGroupsByFacilityName(facility: string, observe?: 'body', reportProgress?: boolean): Observable>; + public getFacilityAdminGroupsByFacilityName(facility: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public getFacilityAdminGroupsByFacilityName(facility: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public getFacilityAdminGroupsByFacilityName(facility: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getFacilityAdminGroupsByFacilityName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAdminGroups/f-name`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } - return this.httpClient.get>( - `${this.configuration.basePath}/json/facilitiesManager/getAdminGroups/f-name`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } } diff --git a/libs/perun/openapi/src/lib/api/groupsManager.service.ts b/libs/perun/openapi/src/lib/api/groupsManager.service.ts index 1458f4101..ed0aca5ee 100644 --- a/libs/perun/openapi/src/lib/api/groupsManager.service.ts +++ b/libs/perun/openapi/src/lib/api/groupsManager.service.ts @@ -11,17 +11,11 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { Group } from '../model/group'; import { InputDeleteGroups } from '../model/inputDeleteGroups'; @@ -34,3606 +28,2636 @@ import { PerunException } from '../model/perunException'; import { RichGroup } from '../model/richGroup'; import { RichMember } from '../model/richMember'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class GroupsManagerService { - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration - ) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - /** - * Add member to groups. If already a member of a group, the group will be skipped. - * @param groups list of Group ids List<Integer> - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addMember( - groups: Array, - member: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public addMember( - groups: Array, - member: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public addMember( - groups: Array, - member: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public addMember( - groups: Array, - member: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (groups === null || groups === undefined) { - throw new Error('Required parameter groups was null or undefined when calling addMember.'); - } - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling addMember.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (groups) { - groups.forEach((element) => { - queryParameters = queryParameters.append('groups[]', element); - }); - } - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/groupsManager/addMember`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Adds members to a group. If already a member of the group, the member will be skipped. Non-empty list of members expected, if empty, no member will be added. - * @param group id of Group - * @param members id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addMembers( - group: number, - members: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public addMembers( - group: number, - members: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public addMembers( - group: number, - members: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public addMembers( - group: number, - members: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling addMembers.'); - } - if (members === null || members === undefined) { - throw new Error('Required parameter members was null or undefined when calling addMembers.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (members) { - members.forEach((element) => { - queryParameters = queryParameters.append('members[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/groupsManager/addMembers`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns true if member in given group can extend membership or if no rules were set for the membershipExpiration, otherwise false. - * @param member id of Member - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public canExtendMembershipInGroup( - member: number, - group: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public canExtendMembershipInGroup( - member: number, - group: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public canExtendMembershipInGroup( - member: number, - group: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public canExtendMembershipInGroup( - member: number, - group: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling canExtendMembershipInGroup.' - ); - } - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling canExtendMembershipInGroup.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/groupsManager/canExtendMembershipInGroup`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Create union of two groups, where \"operandGroup\" is technically set as subgroup of \"resultGroup\". Members from \"operandGroup\" are added to \"resultGroup\" as INDIRECT members. Union is honored also in all group member changing operations. - * @param resultGroup id of Group to have removed \'operandGroup\' from subgroups - * @param operandGroup id of Group to have removed \'resultGroup\' from subgroups - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createGroupUnion( - resultGroup: number, - operandGroup: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public createGroupUnion( - resultGroup: number, - operandGroup: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public createGroupUnion( - resultGroup: number, - operandGroup: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public createGroupUnion( - resultGroup: number, - operandGroup: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resultGroup === null || resultGroup === undefined) { - throw new Error( - 'Required parameter resultGroup was null or undefined when calling createGroupUnion.' - ); - } - if (operandGroup === null || operandGroup === undefined) { - throw new Error( - 'Required parameter operandGroup was null or undefined when calling createGroupUnion.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resultGroup !== undefined && resultGroup !== null) { - queryParameters = queryParameters.set('resultGroup', resultGroup); - } - if (operandGroup !== undefined && operandGroup !== null) { - queryParameters = queryParameters.set('operandGroup', operandGroup); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/groupsManager/createGroupUnion`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Creates a subgroup of a group. - * @param parentGroup Parent Group id - * @param name name of Group - * @param description description of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createGroupWithParentGroupNameDescription( - parentGroup: number, - name: string, - description: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public createGroupWithParentGroupNameDescription( - parentGroup: number, - name: string, - description: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public createGroupWithParentGroupNameDescription( - parentGroup: number, - name: string, - description: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public createGroupWithParentGroupNameDescription( - parentGroup: number, - name: string, - description: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (parentGroup === null || parentGroup === undefined) { - throw new Error( - 'Required parameter parentGroup was null or undefined when calling createGroupWithParentGroupNameDescription.' - ); - } - if (name === null || name === undefined) { - throw new Error( - 'Required parameter name was null or undefined when calling createGroupWithParentGroupNameDescription.' - ); - } - if (description === null || description === undefined) { - throw new Error( - 'Required parameter description was null or undefined when calling createGroupWithParentGroupNameDescription.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (parentGroup !== undefined && parentGroup !== null) { - queryParameters = queryParameters.set('parentGroup', parentGroup); - } - if (name !== undefined && name !== null) { - queryParameters = queryParameters.set('name', name); - } - if (description !== undefined && description !== null) { - queryParameters = queryParameters.set('description', description); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/groupsManager/createGroup/pg-n-d`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Creates a new group in the specific VO. - * @param vo id of Vo - * @param name name of Group - * @param description description of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createGroupWithVoNameDescription( - vo: number, - name: string, - description: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public createGroupWithVoNameDescription( - vo: number, - name: string, - description: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public createGroupWithVoNameDescription( - vo: number, - name: string, - description: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public createGroupWithVoNameDescription( - vo: number, - name: string, - description: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling createGroupWithVoNameDescription.' - ); - } - if (name === null || name === undefined) { - throw new Error( - 'Required parameter name was null or undefined when calling createGroupWithVoNameDescription.' - ); - } - if (description === null || description === undefined) { - throw new Error( - 'Required parameter description was null or undefined when calling createGroupWithVoNameDescription.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (name !== undefined && name !== null) { - queryParameters = queryParameters.set('name', name); - } - if (description !== undefined && description !== null) { - queryParameters = queryParameters.set('description', description); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/groupsManager/createGroup/v-n-d`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Deletes group with given id if it contains no members and group is not assigned to any resources. If force param is true, removes group forcefully. - * @param group id of Group - * @param force If true, delete entity forcefully. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteGroup( - group: number, - force?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public deleteGroup( - group: number, - force?: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deleteGroup( - group: number, - force?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deleteGroup( - group: number, - force?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling deleteGroup.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (force !== undefined && force !== null) { - queryParameters = queryParameters.set('force', force); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/groupsManager/deleteGroup`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Forcefully deletes a list of groups (remove all group members, remove group from resources). - * @param inputDeleteGroups - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteGroups( - inputDeleteGroups: InputDeleteGroups, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public deleteGroups( - inputDeleteGroups: InputDeleteGroups, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deleteGroups( - inputDeleteGroups: InputDeleteGroups, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deleteGroups( - inputDeleteGroups: InputDeleteGroups, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputDeleteGroups === null || inputDeleteGroups === undefined) { - throw new Error( - 'Required parameter inputDeleteGroups was null or undefined when calling deleteGroups.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/groupsManager/deleteGroups`, - inputDeleteGroups, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Extend member membership in given group using membershipExpirationRules attribute defined in Group. - * @param member id of Member - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public extendMembershipInGroup( - member: number, - group: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public extendMembershipInGroup( - member: number, - group: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public extendMembershipInGroup( - member: number, - group: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public extendMembershipInGroup( - member: number, - group: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling extendMembershipInGroup.' - ); - } - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling extendMembershipInGroup.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/groupsManager/extendMembershipInGroup`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Force synchronization for all subgroups (recursively - whole tree) of the group (useful for group structure). - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public forceAllSubGroupsSynchronization( - group: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public forceAllSubGroupsSynchronization( - group: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public forceAllSubGroupsSynchronization( - group: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public forceAllSubGroupsSynchronization( - group: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling forceAllSubGroupsSynchronization.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/groupsManager/forceAllSubGroupsSynchronization`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Forces group structure synchronization. - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public forceGroupStructureSynchronization( - group: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public forceGroupStructureSynchronization( - group: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public forceGroupStructureSynchronization( - group: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public forceGroupStructureSynchronization( - group: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling forceGroupStructureSynchronization.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/groupsManager/forceGroupStructureSynchronization`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Forces group synchronization. - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public forceGroupSynchronization( - group: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public forceGroupSynchronization( - group: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public forceGroupSynchronization( - group: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public forceGroupSynchronization( - group: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling forceGroupSynchronization.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/groupsManager/forceGroupSynchronization`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns all groups in a VO. - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllGroups( - vo: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAllGroups( - vo: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllGroups( - vo: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAllGroups( - vo: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getAllGroups.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/groupsManager/getAllGroups`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all groups from all vos. Returned groups are filtered based on the principal rights. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllGroupsFromAllVos( - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAllGroupsFromAllVos( - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllGroupsFromAllVos( - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAllGroupsFromAllVos( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/groupsManager/getAllGroups/all`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns all groups for a member including group \'members\' - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllMemberGroups( - member: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAllMemberGroups( - member: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllMemberGroups( - member: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAllMemberGroups( - member: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getAllMemberGroups.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/groupsManager/getAllMemberGroups`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all groups with their specified attributes. If the attrNames are null or empty, all group attributes are returned. - * @param attrNames list of attribute names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllRichGroups( - attrNames: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAllRichGroups( - attrNames: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllRichGroups( - attrNames: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAllRichGroups( - attrNames: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (attrNames === null || attrNames === undefined) { - throw new Error( - 'Required parameter attrNames was null or undefined when calling getAllRichGroups.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/groupsManager/getAllRichGroups`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns full list of all RichGroups containing selected attributes. - * @param vo id of Vo - * @param attrNames list of attribute names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllRichGroupsWithAttributesByNames( - vo: number, - attrNames: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAllRichGroupsWithAttributesByNames( - vo: number, - attrNames: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllRichGroupsWithAttributesByNames( - vo: number, - attrNames: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAllRichGroupsWithAttributesByNames( - vo: number, - attrNames: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling getAllRichGroupsWithAttributesByNames.' - ); - } - if (attrNames === null || attrNames === undefined) { - throw new Error( - 'Required parameter attrNames was null or undefined when calling getAllRichGroupsWithAttributesByNames.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/groupsManager/getAllRichGroupsWithAttributesByNames`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns all AllRichSubGroups from parent group containing selected attributes (all level subgroups). - * @param group id of Group - * @param attrNames list of attribute names List<String> or null - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllRichSubGroupsWithGroupAttributesByNames( - group: number, - attrNames?: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAllRichSubGroupsWithGroupAttributesByNames( - group: number, - attrNames?: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllRichSubGroupsWithGroupAttributesByNames( - group: number, - attrNames?: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAllRichSubGroupsWithGroupAttributesByNames( - group: number, - attrNames?: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getAllRichSubGroupsWithGroupAttributesByNames.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/groupsManager/getAllRichSubGroupsWithAttributesByNames`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns a group by id. - * Throws GroupNotExistsException when the group doesn\'t exist. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupById(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public getGroupById( - id: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getGroupById( - id: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getGroupById( - id: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getGroupById.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/groupsManager/getGroupById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns a group by VO and Group name. IMPORTANT: need to use full name of group (ex. \'toplevel:a:b\', not the shortname which is in this example \'b\') Throws GroupNotExistsException when the group doesn\'t exist. - * @param vo id of Vo - * @param name name of entity - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupByName( - vo: number, - name: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getGroupByName( - vo: number, - name: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getGroupByName( - vo: number, - name: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getGroupByName( - vo: number, - name: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getGroupByName.'); - } - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling getGroupByName.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (name !== undefined && name !== null) { - queryParameters = queryParameters.set('name', name); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/groupsManager/getGroupByName`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get member in context of group. - * @param group id of Group - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupMemberById( - group: number, - member: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getGroupMemberById( - group: number, - member: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getGroupMemberById( - group: number, - member: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getGroupMemberById( - group: number, - member: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getGroupMemberById.' - ); - } - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getGroupMemberById.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/groupsManager/getGroupMemberById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns list of members of a group. - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupMembers( - group: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getGroupMembers( - group: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getGroupMembers( - group: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getGroupMembers( - group: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getGroupMembers.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/groupsManager/getGroupMembers`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns count of group members. - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupMembersCount( - group: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getGroupMembersCount( - group: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getGroupMembersCount( - group: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getGroupMembersCount( - group: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getGroupMembersCount.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/groupsManager/getGroupMembersCount`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns counts of group members by their group status. - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupMembersCountsByGroupStatus( - group: number, - observe?: 'body', - reportProgress?: boolean - ): Observable<{ [key: string]: number }>; - public getGroupMembersCountsByGroupStatus( - group: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getGroupMembersCountsByGroupStatus( - group: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getGroupMembersCountsByGroupStatus( - group: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getGroupMembersCountsByGroupStatus.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get<{ [key: string]: number }>( - `${this.configuration.basePath}/json/groupsManager/getGroupMembersCountsByGroupStatus`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns counts of group members by their status in VO. - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupMembersCountsByVoStatus( - group: number, - observe?: 'body', - reportProgress?: boolean - ): Observable<{ [key: string]: number }>; - public getGroupMembersCountsByVoStatus( - group: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getGroupMembersCountsByVoStatus( - group: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getGroupMembersCountsByVoStatus( - group: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getGroupMembersCountsByVoStatus.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get<{ [key: string]: number }>( - `${this.configuration.basePath}/json/groupsManager/getGroupMembersCountsByVoStatus`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns list of RichMembers with requested attributes by their member IDs from given group. Skips invalid member IDs (unknown or not members of group). Supports member, member-group (stored in memberAttributes) and user attributes (stored in userAttributes). - * @param group id of Group - * @param members id of Member - * @param attrNames list of attribute names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupRichMembersByIds( - group: number, - members: Array, - attrNames: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getGroupRichMembersByIds( - group: number, - members: Array, - attrNames: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getGroupRichMembersByIds( - group: number, - members: Array, - attrNames: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getGroupRichMembersByIds( - group: number, - members: Array, - attrNames: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getGroupRichMembersByIds.' - ); - } - if (members === null || members === undefined) { - throw new Error( - 'Required parameter members was null or undefined when calling getGroupRichMembersByIds.' - ); - } - if (attrNames === null || attrNames === undefined) { - throw new Error( - 'Required parameter attrNames was null or undefined when calling getGroupRichMembersByIds.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (members) { - members.forEach((element) => { - queryParameters = queryParameters.append('members[]', element); - }); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/groupsManager/getGroupRichMembersByIds`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Return all operand groups for specified result groups (all INCLUDED groups). If \"reverseDirection\" is TRUE than return all result groups for specified operand group (where group is INCLUDED). - * @param group id of Group - * @param reverseDirection FALSE (default) return INCLUDED groups / TRUE = return groups where INCLUDED - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupUnions( - group: number, - reverseDirection: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getGroupUnions( - group: number, - reverseDirection: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getGroupUnions( - group: number, - reverseDirection: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getGroupUnions( - group: number, - reverseDirection: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getGroupUnions.' - ); - } - if (reverseDirection === null || reverseDirection === undefined) { - throw new Error( - 'Required parameter reverseDirection was null or undefined when calling getGroupUnions.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (reverseDirection !== undefined && reverseDirection !== null) { - queryParameters = queryParameters.set('reverseDirection', reverseDirection); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/groupsManager/getGroupUnions`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns list of groups by their ids. - * @param ids list of ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupsByIds( - ids: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getGroupsByIds( - ids: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getGroupsByIds( - ids: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getGroupsByIds( - ids: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (ids === null || ids === undefined) { - throw new Error('Required parameter ids was null or undefined when calling getGroupsByIds.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (ids) { - ids.forEach((element) => { - queryParameters = queryParameters.append('ids[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/groupsManager/getGroupsByIds`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get page of groups from the given vo. - * @param inputGetPaginatedGroups - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupsPage( - inputGetPaginatedGroups: InputGetPaginatedGroups, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getGroupsPage( - inputGetPaginatedGroups: InputGetPaginatedGroups, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getGroupsPage( - inputGetPaginatedGroups: InputGetPaginatedGroups, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getGroupsPage( - inputGetPaginatedGroups: InputGetPaginatedGroups, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputGetPaginatedGroups === null || inputGetPaginatedGroups === undefined) { - throw new Error( - 'Required parameter inputGetPaginatedGroups was null or undefined when calling getGroupsPage.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/groupsManager/getGroupsPage`, - inputGetPaginatedGroups, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns unique paths of groups as list of lists of groups [CURRENT GROUP -> SUBGROUP -> ... -> MEMBER\'S SOURCE GROUP] via which member is indirectly included to the group. Cuts off after first included group. - * @param member id of Member - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getIndirectMembershipPaths( - member: number, - group: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>>; - public getIndirectMembershipPaths( - member: number, - group: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>>; - public getIndirectMembershipPaths( - member: number, - group: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>>; - public getIndirectMembershipPaths( - member: number, - group: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getIndirectMembershipPaths.' - ); - } - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getIndirectMembershipPaths.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>>( - `${this.configuration.basePath}/json/groupsManager/getIndirectMembershipPaths`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns groups for a member. - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberGroups( - member: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getMemberGroups( - member: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getMemberGroups( - member: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getMemberGroups( - member: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getMemberGroups.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/groupsManager/getMemberGroups`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns full list of member\'s RichGroups containing selected attributes. \'members\' group is not included! Supported are attributes from these namespaces: - group - member-group - * @param member id of Member - * @param attrNames list of attribute names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberRichGroupsWithAttributesByNames( - member: number, - attrNames: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getMemberRichGroupsWithAttributesByNames( - member: number, - attrNames: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getMemberRichGroupsWithAttributesByNames( - member: number, - attrNames: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getMemberRichGroupsWithAttributesByNames( - member: number, - attrNames: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getMemberRichGroupsWithAttributesByNames.' - ); - } - if (attrNames === null || attrNames === undefined) { - throw new Error( - 'Required parameter attrNames was null or undefined when calling getMemberRichGroupsWithAttributesByNames.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/groupsManager/getMemberRichGroupsWithAttributesByNames`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns RichGroup selected by id containing selected attributes - * Throws GroupNotExistsException when the group doesn\'t exist. - * @param groupId id of Group - * @param attrNames list of attribute names List<String> or null - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRichGroupByIdWithAttributesByNames( - groupId: number, - attrNames?: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getRichGroupByIdWithAttributesByNames( - groupId: number, - attrNames?: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getRichGroupByIdWithAttributesByNames( - groupId: number, - attrNames?: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getRichGroupByIdWithAttributesByNames( - groupId: number, - attrNames?: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (groupId === null || groupId === undefined) { - throw new Error( - 'Required parameter groupId was null or undefined when calling getRichGroupByIdWithAttributesByNames.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (groupId !== undefined && groupId !== null) { - queryParameters = queryParameters.set('groupId', groupId); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/groupsManager/getRichGroupByIdWithAttributesByNames`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get page of subgroups from the given parent group. - * @param inputGetPaginatedSubgroups - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getSubgroupsPage( - inputGetPaginatedSubgroups: InputGetPaginatedSubgroups, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getSubgroupsPage( - inputGetPaginatedSubgroups: InputGetPaginatedSubgroups, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getSubgroupsPage( - inputGetPaginatedSubgroups: InputGetPaginatedSubgroups, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getSubgroupsPage( - inputGetPaginatedSubgroups: InputGetPaginatedSubgroups, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputGetPaginatedSubgroups === null || inputGetPaginatedSubgroups === undefined) { - throw new Error( - 'Required parameter inputGetPaginatedSubgroups was null or undefined when calling getSubgroupsPage.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/groupsManager/getSubgroupsPage`, - inputGetPaginatedSubgroups, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Return true if Member is member of the Group. - * @param member id of Member - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public isGroupMember( - member: number, - group: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public isGroupMember( - member: number, - group: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public isGroupMember( - member: number, - group: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public isGroupMember( - member: number, - group: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling isGroupMember.' - ); - } - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling isGroupMember.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/groupsManager/isGroupMember`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Moves \"movingGroup\" (including subGroups) under \"destinationGroup\" as subGroup within same Vo. Indirect group members are also processed during move operation. - * @param movingGroup id of Group to be moved under \'destinationGroup\' - * @param destinationGroup id of Group to have \'movingGroup\' as subGroup - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public moveGroupWithDestinationGroupMovingGroup( - movingGroup: number, - destinationGroup?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public moveGroupWithDestinationGroupMovingGroup( - movingGroup: number, - destinationGroup?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public moveGroupWithDestinationGroupMovingGroup( - movingGroup: number, - destinationGroup?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public moveGroupWithDestinationGroupMovingGroup( - movingGroup: number, - destinationGroup?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (movingGroup === null || movingGroup === undefined) { - throw new Error( - 'Required parameter movingGroup was null or undefined when calling moveGroupWithDestinationGroupMovingGroup.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (destinationGroup !== undefined && destinationGroup !== null) { - queryParameters = queryParameters.set('destinationGroup', destinationGroup); - } - if (movingGroup !== undefined && movingGroup !== null) { - queryParameters = queryParameters.set('movingGroup', movingGroup); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/groupsManager/moveGroup/dg-mg`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Removes union of two groups, when \"operandGroup\" is technically removed from subgroups of \"resultGroup\". Members from \"operandGroup\" are removed from \"resultGroup\" if they were INDIRECT members sourcing from this group only. - * @param resultGroup id of Group to have removed \'operandGroup\' from subgroups - * @param operandGroup id of Group to have removed \'resultGroup\' from subgroups - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeGroupUnion( - resultGroup: number, - operandGroup: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeGroupUnion( - resultGroup: number, - operandGroup: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeGroupUnion( - resultGroup: number, - operandGroup: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeGroupUnion( - resultGroup: number, - operandGroup: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resultGroup === null || resultGroup === undefined) { - throw new Error( - 'Required parameter resultGroup was null or undefined when calling removeGroupUnion.' - ); - } - if (operandGroup === null || operandGroup === undefined) { - throw new Error( - 'Required parameter operandGroup was null or undefined when calling removeGroupUnion.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resultGroup !== undefined && resultGroup !== null) { - queryParameters = queryParameters.set('resultGroup', resultGroup); - } - if (operandGroup !== undefined && operandGroup !== null) { - queryParameters = queryParameters.set('operandGroup', operandGroup); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/groupsManager/removeGroupUnion`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Removes member from a groups. If a member is not in the group or is indirect, it is skipped without a warning, but the rest of groups are processed. - * @param groups list of Group ids List<Integer> - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeMember( - groups: Array, - member: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeMember( - groups: Array, - member: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeMember( - groups: Array, - member: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeMember( - groups: Array, - member: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (groups === null || groups === undefined) { - throw new Error('Required parameter groups was null or undefined when calling removeMember.'); - } - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling removeMember.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (groups) { - groups.forEach((element) => { - queryParameters = queryParameters.append('groups[]', element); - }); - } - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/groupsManager/removeMember`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Removes members from a group. Non-empty list of members expected. In case of empty list, no member is removed from the group. If member is not in the group or the membership is indirect, it is skipped without a warning but the rest of the members are processed. - * @param group id of Group - * @param members id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeMembers( - group: number, - members: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeMembers( - group: number, - members: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeMembers( - group: number, - members: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeMembers( - group: number, - members: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling removeMembers.'); - } - if (members === null || members === undefined) { - throw new Error( - 'Required parameter members was null or undefined when calling removeMembers.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (members) { - members.forEach((element) => { - queryParameters = queryParameters.append('members[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/groupsManager/removeMembers`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Set membership status of a member in a group. Please note, that resulting Status after change is calculated from all members sub-groups and groups in relation sourcing this member. If in any of them is VALID, resulting status is still VALID. - * @param member id of Member - * @param group id of Group - * @param status status (VALID | EXPIRED) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setGroupsMemberStatus( - member: number, - group: number, - status: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setGroupsMemberStatus( - member: number, - group: number, - status: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setGroupsMemberStatus( - member: number, - group: number, - status: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setGroupsMemberStatus( - member: number, - group: number, - status: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling setGroupsMemberStatus.' - ); - } - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling setGroupsMemberStatus.' - ); - } - if (status === null || status === undefined) { - throw new Error( - 'Required parameter status was null or undefined when calling setGroupsMemberStatus.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (status !== undefined && status !== null) { - queryParameters = queryParameters.set('status', status); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/groupsManager/setGroupsMemberStatus`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Updates a group. - * @param inputUpdateGroup - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateGroup( - inputUpdateGroup: InputUpdateGroup, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public updateGroup( - inputUpdateGroup: InputUpdateGroup, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public updateGroup( - inputUpdateGroup: InputUpdateGroup, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public updateGroup( - inputUpdateGroup: InputUpdateGroup, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputUpdateGroup === null || inputUpdateGroup === undefined) { - throw new Error( - 'Required parameter inputUpdateGroup was null or undefined when calling updateGroup.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + + + /** + * Add member to groups. If already a member of a group, the group will be skipped. + * @param groups list of Group ids List<Integer> + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addMember(groups: Array, member: number, observe?: 'body', reportProgress?: boolean): Observable; + public addMember(groups: Array, member: number, observe?: 'response', reportProgress?: boolean): Observable>; + public addMember(groups: Array, member: number, observe?: 'events', reportProgress?: boolean): Observable>; + public addMember(groups: Array, member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (groups === null || groups === undefined) { + throw new Error('Required parameter groups was null or undefined when calling addMember.'); + } + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling addMember.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (groups) { + groups.forEach((element) => { + queryParameters = queryParameters.append('groups[]', element); + }) + } + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/groupsManager/addMember`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Adds members to a group. If already a member of the group, the member will be skipped. Non-empty list of members expected, if empty, no member will be added. + * @param group id of Group + * @param members id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addMembers(group: number, members: Array, observe?: 'body', reportProgress?: boolean): Observable; + public addMembers(group: number, members: Array, observe?: 'response', reportProgress?: boolean): Observable>; + public addMembers(group: number, members: Array, observe?: 'events', reportProgress?: boolean): Observable>; + public addMembers(group: number, members: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling addMembers.'); + } + if (members === null || members === undefined) { + throw new Error('Required parameter members was null or undefined when calling addMembers.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (members) { + members.forEach((element) => { + queryParameters = queryParameters.append('members[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/groupsManager/addMembers`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns true if member in given group can extend membership or if no rules were set for the membershipExpiration, otherwise false. + * @param member id of Member + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public canExtendMembershipInGroup(member: number, group: number, observe?: 'body', reportProgress?: boolean): Observable; + public canExtendMembershipInGroup(member: number, group: number, observe?: 'response', reportProgress?: boolean): Observable>; + public canExtendMembershipInGroup(member: number, group: number, observe?: 'events', reportProgress?: boolean): Observable>; + public canExtendMembershipInGroup(member: number, group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling canExtendMembershipInGroup.'); + } + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling canExtendMembershipInGroup.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/groupsManager/canExtendMembershipInGroup`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Create union of two groups, where \"operandGroup\" is technically set as subgroup of \"resultGroup\". Members from \"operandGroup\" are added to \"resultGroup\" as INDIRECT members. Union is honored also in all group member changing operations. + * @param resultGroup id of Group to have removed \'operandGroup\' from subgroups + * @param operandGroup id of Group to have removed \'resultGroup\' from subgroups + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createGroupUnion(resultGroup: number, operandGroup: number, observe?: 'body', reportProgress?: boolean): Observable; + public createGroupUnion(resultGroup: number, operandGroup: number, observe?: 'response', reportProgress?: boolean): Observable>; + public createGroupUnion(resultGroup: number, operandGroup: number, observe?: 'events', reportProgress?: boolean): Observable>; + public createGroupUnion(resultGroup: number, operandGroup: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resultGroup === null || resultGroup === undefined) { + throw new Error('Required parameter resultGroup was null or undefined when calling createGroupUnion.'); + } + if (operandGroup === null || operandGroup === undefined) { + throw new Error('Required parameter operandGroup was null or undefined when calling createGroupUnion.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resultGroup !== undefined && resultGroup !== null) { + queryParameters = queryParameters.set('resultGroup', resultGroup); + } + if (operandGroup !== undefined && operandGroup !== null) { + queryParameters = queryParameters.set('operandGroup', operandGroup); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/groupsManager/createGroupUnion`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Creates a subgroup of a group. + * @param parentGroup Parent Group id + * @param name name of Group + * @param description description of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createGroupWithParentGroupNameDescription(parentGroup: number, name: string, description: string, observe?: 'body', reportProgress?: boolean): Observable; + public createGroupWithParentGroupNameDescription(parentGroup: number, name: string, description: string, observe?: 'response', reportProgress?: boolean): Observable>; + public createGroupWithParentGroupNameDescription(parentGroup: number, name: string, description: string, observe?: 'events', reportProgress?: boolean): Observable>; + public createGroupWithParentGroupNameDescription(parentGroup: number, name: string, description: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (parentGroup === null || parentGroup === undefined) { + throw new Error('Required parameter parentGroup was null or undefined when calling createGroupWithParentGroupNameDescription.'); + } + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling createGroupWithParentGroupNameDescription.'); + } + if (description === null || description === undefined) { + throw new Error('Required parameter description was null or undefined when calling createGroupWithParentGroupNameDescription.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (parentGroup !== undefined && parentGroup !== null) { + queryParameters = queryParameters.set('parentGroup', parentGroup); + } + if (name !== undefined && name !== null) { + queryParameters = queryParameters.set('name', name); + } + if (description !== undefined && description !== null) { + queryParameters = queryParameters.set('description', description); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/groupsManager/createGroup/pg-n-d`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Creates a new group in the specific VO. + * @param vo id of Vo + * @param name name of Group + * @param description description of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createGroupWithVoNameDescription(vo: number, name: string, description: string, observe?: 'body', reportProgress?: boolean): Observable; + public createGroupWithVoNameDescription(vo: number, name: string, description: string, observe?: 'response', reportProgress?: boolean): Observable>; + public createGroupWithVoNameDescription(vo: number, name: string, description: string, observe?: 'events', reportProgress?: boolean): Observable>; + public createGroupWithVoNameDescription(vo: number, name: string, description: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling createGroupWithVoNameDescription.'); + } + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling createGroupWithVoNameDescription.'); + } + if (description === null || description === undefined) { + throw new Error('Required parameter description was null or undefined when calling createGroupWithVoNameDescription.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (name !== undefined && name !== null) { + queryParameters = queryParameters.set('name', name); + } + if (description !== undefined && description !== null) { + queryParameters = queryParameters.set('description', description); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/groupsManager/createGroup/v-n-d`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Deletes group with given id if it contains no members and group is not assigned to any resources. If force param is true, removes group forcefully. + * @param group id of Group + * @param force If true, delete entity forcefully. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteGroup(group: number, force?: boolean, observe?: 'body', reportProgress?: boolean): Observable; + public deleteGroup(group: number, force?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; + public deleteGroup(group: number, force?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; + public deleteGroup(group: number, force?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling deleteGroup.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (force !== undefined && force !== null) { + queryParameters = queryParameters.set('force', force); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/groupsManager/deleteGroup`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Forcefully deletes a list of groups (remove all group members, remove group from resources). + * @param inputDeleteGroups + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteGroups(inputDeleteGroups: InputDeleteGroups, observe?: 'body', reportProgress?: boolean): Observable; + public deleteGroups(inputDeleteGroups: InputDeleteGroups, observe?: 'response', reportProgress?: boolean): Observable>; + public deleteGroups(inputDeleteGroups: InputDeleteGroups, observe?: 'events', reportProgress?: boolean): Observable>; + public deleteGroups(inputDeleteGroups: InputDeleteGroups, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputDeleteGroups === null || inputDeleteGroups === undefined) { + throw new Error('Required parameter inputDeleteGroups was null or undefined when calling deleteGroups.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/groupsManager/deleteGroups`, + inputDeleteGroups, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Extend member membership in given group using membershipExpirationRules attribute defined in Group. + * @param member id of Member + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public extendMembershipInGroup(member: number, group: number, observe?: 'body', reportProgress?: boolean): Observable; + public extendMembershipInGroup(member: number, group: number, observe?: 'response', reportProgress?: boolean): Observable>; + public extendMembershipInGroup(member: number, group: number, observe?: 'events', reportProgress?: boolean): Observable>; + public extendMembershipInGroup(member: number, group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling extendMembershipInGroup.'); + } + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling extendMembershipInGroup.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/groupsManager/extendMembershipInGroup`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Force synchronization for all subgroups (recursively - whole tree) of the group (useful for group structure). + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public forceAllSubGroupsSynchronization(group: number, observe?: 'body', reportProgress?: boolean): Observable; + public forceAllSubGroupsSynchronization(group: number, observe?: 'response', reportProgress?: boolean): Observable>; + public forceAllSubGroupsSynchronization(group: number, observe?: 'events', reportProgress?: boolean): Observable>; + public forceAllSubGroupsSynchronization(group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling forceAllSubGroupsSynchronization.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/groupsManager/forceAllSubGroupsSynchronization`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Forces group structure synchronization. + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public forceGroupStructureSynchronization(group: number, observe?: 'body', reportProgress?: boolean): Observable; + public forceGroupStructureSynchronization(group: number, observe?: 'response', reportProgress?: boolean): Observable>; + public forceGroupStructureSynchronization(group: number, observe?: 'events', reportProgress?: boolean): Observable>; + public forceGroupStructureSynchronization(group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling forceGroupStructureSynchronization.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/groupsManager/forceGroupStructureSynchronization`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Forces group synchronization. + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public forceGroupSynchronization(group: number, observe?: 'body', reportProgress?: boolean): Observable; + public forceGroupSynchronization(group: number, observe?: 'response', reportProgress?: boolean): Observable>; + public forceGroupSynchronization(group: number, observe?: 'events', reportProgress?: boolean): Observable>; + public forceGroupSynchronization(group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling forceGroupSynchronization.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/groupsManager/forceGroupSynchronization`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns all groups in a VO. + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllGroups(vo: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAllGroups(vo: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllGroups(vo: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllGroups(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getAllGroups.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/groupsManager/getAllGroups`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all groups from all vos. Returned groups are filtered based on the principal rights. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllGroupsFromAllVos(observe?: 'body', reportProgress?: boolean): Observable>; + public getAllGroupsFromAllVos(observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllGroupsFromAllVos(observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllGroupsFromAllVos(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/groupsManager/getAllGroups/all`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns all groups for a member including group \'members\' + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllMemberGroups(member: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAllMemberGroups(member: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllMemberGroups(member: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllMemberGroups(member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getAllMemberGroups.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/groupsManager/getAllMemberGroups`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all groups with their specified attributes. If the attrNames are null or empty, all group attributes are returned. + * @param attrNames list of attribute names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllRichGroups(attrNames: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getAllRichGroups(attrNames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllRichGroups(attrNames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllRichGroups(attrNames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (attrNames === null || attrNames === undefined) { + throw new Error('Required parameter attrNames was null or undefined when calling getAllRichGroups.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/groupsManager/getAllRichGroups`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns full list of all RichGroups containing selected attributes. + * @param vo id of Vo + * @param attrNames list of attribute names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllRichGroupsWithAttributesByNames(vo: number, attrNames: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getAllRichGroupsWithAttributesByNames(vo: number, attrNames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllRichGroupsWithAttributesByNames(vo: number, attrNames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllRichGroupsWithAttributesByNames(vo: number, attrNames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getAllRichGroupsWithAttributesByNames.'); + } + if (attrNames === null || attrNames === undefined) { + throw new Error('Required parameter attrNames was null or undefined when calling getAllRichGroupsWithAttributesByNames.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/groupsManager/getAllRichGroupsWithAttributesByNames`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns all AllRichSubGroups from parent group containing selected attributes (all level subgroups). + * @param group id of Group + * @param attrNames list of attribute names List<String> or null + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllRichSubGroupsWithGroupAttributesByNames(group: number, attrNames?: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getAllRichSubGroupsWithGroupAttributesByNames(group: number, attrNames?: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllRichSubGroupsWithGroupAttributesByNames(group: number, attrNames?: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllRichSubGroupsWithGroupAttributesByNames(group: number, attrNames?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getAllRichSubGroupsWithGroupAttributesByNames.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/groupsManager/getAllRichSubGroupsWithAttributesByNames`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns a group by id. + * Throws GroupNotExistsException when the group doesn\'t exist. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupById(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public getGroupById(id: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getGroupById(id: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getGroupById(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getGroupById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/groupsManager/getGroupById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns a group by VO and Group name. IMPORTANT: need to use full name of group (ex. \'toplevel:a:b\', not the shortname which is in this example \'b\') Throws GroupNotExistsException when the group doesn\'t exist. + * @param vo id of Vo + * @param name name of entity + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupByName(vo: number, name: string, observe?: 'body', reportProgress?: boolean): Observable; + public getGroupByName(vo: number, name: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getGroupByName(vo: number, name: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getGroupByName(vo: number, name: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getGroupByName.'); + } + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling getGroupByName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (name !== undefined && name !== null) { + queryParameters = queryParameters.set('name', name); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/groupsManager/getGroupByName`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get member in context of group. + * @param group id of Group + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupMemberById(group: number, member: number, observe?: 'body', reportProgress?: boolean): Observable; + public getGroupMemberById(group: number, member: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getGroupMemberById(group: number, member: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getGroupMemberById(group: number, member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getGroupMemberById.'); + } + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getGroupMemberById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/groupsManager/getGroupMemberById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns list of members of a group. + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupMembers(group: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getGroupMembers(group: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getGroupMembers(group: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getGroupMembers(group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getGroupMembers.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/groupsManager/getGroupMembers`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns count of group members. + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupMembersCount(group: number, observe?: 'body', reportProgress?: boolean): Observable; + public getGroupMembersCount(group: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getGroupMembersCount(group: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getGroupMembersCount(group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getGroupMembersCount.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/groupsManager/getGroupMembersCount`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns counts of group members by their group status. + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupMembersCountsByGroupStatus(group: number, observe?: 'body', reportProgress?: boolean): Observable<{ [key: string]: number; }>; + public getGroupMembersCountsByGroupStatus(group: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getGroupMembersCountsByGroupStatus(group: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getGroupMembersCountsByGroupStatus(group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getGroupMembersCountsByGroupStatus.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}/json/groupsManager/getGroupMembersCountsByGroupStatus`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns counts of group members by their status in VO. + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupMembersCountsByVoStatus(group: number, observe?: 'body', reportProgress?: boolean): Observable<{ [key: string]: number; }>; + public getGroupMembersCountsByVoStatus(group: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getGroupMembersCountsByVoStatus(group: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getGroupMembersCountsByVoStatus(group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getGroupMembersCountsByVoStatus.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}/json/groupsManager/getGroupMembersCountsByVoStatus`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns list of RichMembers with requested attributes by their member IDs from given group. Skips invalid member IDs (unknown or not members of group). Supports member, member-group (stored in memberAttributes) and user attributes (stored in userAttributes). + * @param group id of Group + * @param members id of Member + * @param attrNames list of attribute names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupRichMembersByIds(group: number, members: Array, attrNames: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getGroupRichMembersByIds(group: number, members: Array, attrNames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getGroupRichMembersByIds(group: number, members: Array, attrNames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getGroupRichMembersByIds(group: number, members: Array, attrNames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getGroupRichMembersByIds.'); + } + if (members === null || members === undefined) { + throw new Error('Required parameter members was null or undefined when calling getGroupRichMembersByIds.'); + } + if (attrNames === null || attrNames === undefined) { + throw new Error('Required parameter attrNames was null or undefined when calling getGroupRichMembersByIds.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (members) { + members.forEach((element) => { + queryParameters = queryParameters.append('members[]', element); + }) + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/groupsManager/getGroupRichMembersByIds`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Return all operand groups for specified result groups (all INCLUDED groups). If \"reverseDirection\" is TRUE than return all result groups for specified operand group (where group is INCLUDED). + * @param group id of Group + * @param reverseDirection FALSE (default) return INCLUDED groups / TRUE = return groups where INCLUDED + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupUnions(group: number, reverseDirection: boolean, observe?: 'body', reportProgress?: boolean): Observable>; + public getGroupUnions(group: number, reverseDirection: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; + public getGroupUnions(group: number, reverseDirection: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; + public getGroupUnions(group: number, reverseDirection: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getGroupUnions.'); + } + if (reverseDirection === null || reverseDirection === undefined) { + throw new Error('Required parameter reverseDirection was null or undefined when calling getGroupUnions.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (reverseDirection !== undefined && reverseDirection !== null) { + queryParameters = queryParameters.set('reverseDirection', reverseDirection); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/groupsManager/getGroupUnions`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns list of groups by their ids. + * @param ids list of ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupsByIds(ids: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getGroupsByIds(ids: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getGroupsByIds(ids: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getGroupsByIds(ids: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (ids === null || ids === undefined) { + throw new Error('Required parameter ids was null or undefined when calling getGroupsByIds.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (ids) { + ids.forEach((element) => { + queryParameters = queryParameters.append('ids[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/groupsManager/getGroupsByIds`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get page of groups from the given vo. + * @param inputGetPaginatedGroups + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupsPage(inputGetPaginatedGroups: InputGetPaginatedGroups, observe?: 'body', reportProgress?: boolean): Observable; + public getGroupsPage(inputGetPaginatedGroups: InputGetPaginatedGroups, observe?: 'response', reportProgress?: boolean): Observable>; + public getGroupsPage(inputGetPaginatedGroups: InputGetPaginatedGroups, observe?: 'events', reportProgress?: boolean): Observable>; + public getGroupsPage(inputGetPaginatedGroups: InputGetPaginatedGroups, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputGetPaginatedGroups === null || inputGetPaginatedGroups === undefined) { + throw new Error('Required parameter inputGetPaginatedGroups was null or undefined when calling getGroupsPage.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/groupsManager/getGroupsPage`, + inputGetPaginatedGroups, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns unique paths of groups as list of lists of groups [CURRENT GROUP -> SUBGROUP -> ... -> MEMBER\'S SOURCE GROUP] via which member is indirectly included to the group. Cuts off after first included group. + * @param member id of Member + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getIndirectMembershipPaths(member: number, group: number, observe?: 'body', reportProgress?: boolean): Observable>>; + public getIndirectMembershipPaths(member: number, group: number, observe?: 'response', reportProgress?: boolean): Observable>>>; + public getIndirectMembershipPaths(member: number, group: number, observe?: 'events', reportProgress?: boolean): Observable>>>; + public getIndirectMembershipPaths(member: number, group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getIndirectMembershipPaths.'); + } + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getIndirectMembershipPaths.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>>(`${this.configuration.basePath}/json/groupsManager/getIndirectMembershipPaths`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns groups for a member. + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberGroups(member: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getMemberGroups(member: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getMemberGroups(member: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getMemberGroups(member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getMemberGroups.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/groupsManager/getMemberGroups`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns full list of member\'s RichGroups containing selected attributes. \'members\' group is not included! Supported are attributes from these namespaces: - group - member-group + * @param member id of Member + * @param attrNames list of attribute names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberRichGroupsWithAttributesByNames(member: number, attrNames: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getMemberRichGroupsWithAttributesByNames(member: number, attrNames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getMemberRichGroupsWithAttributesByNames(member: number, attrNames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getMemberRichGroupsWithAttributesByNames(member: number, attrNames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getMemberRichGroupsWithAttributesByNames.'); + } + if (attrNames === null || attrNames === undefined) { + throw new Error('Required parameter attrNames was null or undefined when calling getMemberRichGroupsWithAttributesByNames.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/groupsManager/getMemberRichGroupsWithAttributesByNames`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns RichGroup selected by id containing selected attributes + * Throws GroupNotExistsException when the group doesn\'t exist. + * @param groupId id of Group + * @param attrNames list of attribute names List<String> or null + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRichGroupByIdWithAttributesByNames(groupId: number, attrNames?: Array, observe?: 'body', reportProgress?: boolean): Observable; + public getRichGroupByIdWithAttributesByNames(groupId: number, attrNames?: Array, observe?: 'response', reportProgress?: boolean): Observable>; + public getRichGroupByIdWithAttributesByNames(groupId: number, attrNames?: Array, observe?: 'events', reportProgress?: boolean): Observable>; + public getRichGroupByIdWithAttributesByNames(groupId: number, attrNames?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (groupId === null || groupId === undefined) { + throw new Error('Required parameter groupId was null or undefined when calling getRichGroupByIdWithAttributesByNames.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (groupId !== undefined && groupId !== null) { + queryParameters = queryParameters.set('groupId', groupId); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/groupsManager/getRichGroupByIdWithAttributesByNames`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get page of subgroups from the given parent group. + * @param inputGetPaginatedSubgroups + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getSubgroupsPage(inputGetPaginatedSubgroups: InputGetPaginatedSubgroups, observe?: 'body', reportProgress?: boolean): Observable; + public getSubgroupsPage(inputGetPaginatedSubgroups: InputGetPaginatedSubgroups, observe?: 'response', reportProgress?: boolean): Observable>; + public getSubgroupsPage(inputGetPaginatedSubgroups: InputGetPaginatedSubgroups, observe?: 'events', reportProgress?: boolean): Observable>; + public getSubgroupsPage(inputGetPaginatedSubgroups: InputGetPaginatedSubgroups, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputGetPaginatedSubgroups === null || inputGetPaginatedSubgroups === undefined) { + throw new Error('Required parameter inputGetPaginatedSubgroups was null or undefined when calling getSubgroupsPage.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/groupsManager/getSubgroupsPage`, + inputGetPaginatedSubgroups, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Return true if Member is member of the Group. + * @param member id of Member + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public isGroupMember(member: number, group: number, observe?: 'body', reportProgress?: boolean): Observable; + public isGroupMember(member: number, group: number, observe?: 'response', reportProgress?: boolean): Observable>; + public isGroupMember(member: number, group: number, observe?: 'events', reportProgress?: boolean): Observable>; + public isGroupMember(member: number, group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling isGroupMember.'); + } + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling isGroupMember.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/groupsManager/isGroupMember`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Moves \"movingGroup\" (including subGroups) under \"destinationGroup\" as subGroup within same Vo. Indirect group members are also processed during move operation. + * @param movingGroup id of Group to be moved under \'destinationGroup\' + * @param destinationGroup id of Group to have \'movingGroup\' as subGroup + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public moveGroupWithDestinationGroupMovingGroup(movingGroup: number, destinationGroup?: number, observe?: 'body', reportProgress?: boolean): Observable; + public moveGroupWithDestinationGroupMovingGroup(movingGroup: number, destinationGroup?: number, observe?: 'response', reportProgress?: boolean): Observable>; + public moveGroupWithDestinationGroupMovingGroup(movingGroup: number, destinationGroup?: number, observe?: 'events', reportProgress?: boolean): Observable>; + public moveGroupWithDestinationGroupMovingGroup(movingGroup: number, destinationGroup?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (movingGroup === null || movingGroup === undefined) { + throw new Error('Required parameter movingGroup was null or undefined when calling moveGroupWithDestinationGroupMovingGroup.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (destinationGroup !== undefined && destinationGroup !== null) { + queryParameters = queryParameters.set('destinationGroup', destinationGroup); + } + if (movingGroup !== undefined && movingGroup !== null) { + queryParameters = queryParameters.set('movingGroup', movingGroup); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/groupsManager/moveGroup/dg-mg`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Removes union of two groups, when \"operandGroup\" is technically removed from subgroups of \"resultGroup\". Members from \"operandGroup\" are removed from \"resultGroup\" if they were INDIRECT members sourcing from this group only. + * @param resultGroup id of Group to have removed \'operandGroup\' from subgroups + * @param operandGroup id of Group to have removed \'resultGroup\' from subgroups + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeGroupUnion(resultGroup: number, operandGroup: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeGroupUnion(resultGroup: number, operandGroup: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeGroupUnion(resultGroup: number, operandGroup: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeGroupUnion(resultGroup: number, operandGroup: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resultGroup === null || resultGroup === undefined) { + throw new Error('Required parameter resultGroup was null or undefined when calling removeGroupUnion.'); + } + if (operandGroup === null || operandGroup === undefined) { + throw new Error('Required parameter operandGroup was null or undefined when calling removeGroupUnion.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resultGroup !== undefined && resultGroup !== null) { + queryParameters = queryParameters.set('resultGroup', resultGroup); + } + if (operandGroup !== undefined && operandGroup !== null) { + queryParameters = queryParameters.set('operandGroup', operandGroup); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/groupsManager/removeGroupUnion`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Removes member from a groups. If a member is not in the group or is indirect, it is skipped without a warning, but the rest of groups are processed. + * @param groups list of Group ids List<Integer> + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeMember(groups: Array, member: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeMember(groups: Array, member: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeMember(groups: Array, member: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeMember(groups: Array, member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (groups === null || groups === undefined) { + throw new Error('Required parameter groups was null or undefined when calling removeMember.'); + } + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling removeMember.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (groups) { + groups.forEach((element) => { + queryParameters = queryParameters.append('groups[]', element); + }) + } + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/groupsManager/removeMember`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Removes members from a group. Non-empty list of members expected. In case of empty list, no member is removed from the group. If member is not in the group or the membership is indirect, it is skipped without a warning but the rest of the members are processed. + * @param group id of Group + * @param members id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeMembers(group: number, members: Array, observe?: 'body', reportProgress?: boolean): Observable; + public removeMembers(group: number, members: Array, observe?: 'response', reportProgress?: boolean): Observable>; + public removeMembers(group: number, members: Array, observe?: 'events', reportProgress?: boolean): Observable>; + public removeMembers(group: number, members: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling removeMembers.'); + } + if (members === null || members === undefined) { + throw new Error('Required parameter members was null or undefined when calling removeMembers.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (members) { + members.forEach((element) => { + queryParameters = queryParameters.append('members[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/groupsManager/removeMembers`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Set membership status of a member in a group. Please note, that resulting Status after change is calculated from all members sub-groups and groups in relation sourcing this member. If in any of them is VALID, resulting status is still VALID. + * @param member id of Member + * @param group id of Group + * @param status status (VALID | EXPIRED) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setGroupsMemberStatus(member: number, group: number, status: string, observe?: 'body', reportProgress?: boolean): Observable; + public setGroupsMemberStatus(member: number, group: number, status: string, observe?: 'response', reportProgress?: boolean): Observable>; + public setGroupsMemberStatus(member: number, group: number, status: string, observe?: 'events', reportProgress?: boolean): Observable>; + public setGroupsMemberStatus(member: number, group: number, status: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling setGroupsMemberStatus.'); + } + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling setGroupsMemberStatus.'); + } + if (status === null || status === undefined) { + throw new Error('Required parameter status was null or undefined when calling setGroupsMemberStatus.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (status !== undefined && status !== null) { + queryParameters = queryParameters.set('status', status); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/groupsManager/setGroupsMemberStatus`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Updates a group. + * @param inputUpdateGroup + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateGroup(inputUpdateGroup: InputUpdateGroup, observe?: 'body', reportProgress?: boolean): Observable; + public updateGroup(inputUpdateGroup: InputUpdateGroup, observe?: 'response', reportProgress?: boolean): Observable>; + public updateGroup(inputUpdateGroup: InputUpdateGroup, observe?: 'events', reportProgress?: boolean): Observable>; + public updateGroup(inputUpdateGroup: InputUpdateGroup, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputUpdateGroup === null || inputUpdateGroup === undefined) { + throw new Error('Required parameter inputUpdateGroup was null or undefined when calling updateGroup.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/groupsManager/updateGroup`, + inputUpdateGroup, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } - return this.httpClient.post( - `${this.configuration.basePath}/json/groupsManager/updateGroup`, - inputUpdateGroup, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } } diff --git a/libs/perun/openapi/src/lib/api/integrationManager.service.ts b/libs/perun/openapi/src/lib/api/integrationManager.service.ts index ab20eaca8..b9d924a08 100644 --- a/libs/perun/openapi/src/lib/api/integrationManager.service.ts +++ b/libs/perun/openapi/src/lib/api/integrationManager.service.ts @@ -11,109 +11,91 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { GroupMemberData } from '../model/groupMemberData'; import { PerunException } from '../model/perunException'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class IntegrationManagerService { - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration - ) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - /** - * Get all member-group relations for all groups with all member-group attributes. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupMemberData( - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getGroupMemberData( - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getGroupMemberData( - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getGroupMemberData( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); + + + + /** + * Get all member-group relations for all groups with all member-group attributes. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupMemberData(observe?: 'body', reportProgress?: boolean): Observable; + public getGroupMemberData(observe?: 'response', reportProgress?: boolean): Observable>; + public getGroupMemberData(observe?: 'events', reportProgress?: boolean): Observable>; + public getGroupMemberData(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/integrationManager/getGroupMemberData`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } - return this.httpClient.get( - `${this.configuration.basePath}/json/integrationManager/getGroupMemberData`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } } diff --git a/libs/perun/openapi/src/lib/api/membersManager.service.ts b/libs/perun/openapi/src/lib/api/membersManager.service.ts index f20ba5c37..ae225ee50 100644 --- a/libs/perun/openapi/src/lib/api/membersManager.service.ts +++ b/libs/perun/openapi/src/lib/api/membersManager.service.ts @@ -11,17 +11,11 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { InputCreateMemberForCandidate } from '../model/inputCreateMemberForCandidate'; import { InputCreateMemberForUser } from '../model/inputCreateMemberForUser'; @@ -41,4513 +35,3266 @@ import { RichMember } from '../model/richMember'; import { RichUser } from '../model/richUser'; import { VoMemberStatuses } from '../model/voMemberStatuses'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class MembersManagerService { - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration - ) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - /** - * Return true if the membership can be extended or if no rules were set for the membershipExpiration, otherwise false. - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public canExtendMembership( - member: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public canExtendMembership( - member: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public canExtendMembership( - member: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public canExtendMembership( - member: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling canExtendMembership.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/membersManager/canExtendMembership`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Creates a new member from candidate returned by the method VosManager.findCandidates which fills Candidate.userExtSource. This method also add user to all groups in list. Empty list of groups is ok, the behavior is then same like in the method without list of groups. This method runs asynchronously - * @param inputCreateMemberForCandidate - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createMemberForCandidate( - inputCreateMemberForCandidate: InputCreateMemberForCandidate, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public createMemberForCandidate( - inputCreateMemberForCandidate: InputCreateMemberForCandidate, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public createMemberForCandidate( - inputCreateMemberForCandidate: InputCreateMemberForCandidate, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public createMemberForCandidate( - inputCreateMemberForCandidate: InputCreateMemberForCandidate, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputCreateMemberForCandidate === null || inputCreateMemberForCandidate === undefined) { - throw new Error( - 'Required parameter inputCreateMemberForCandidate was null or undefined when calling createMemberForCandidate.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/membersManager/createMember/c`, - inputCreateMemberForCandidate, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Creates a new member from user. This method also add user to all groups in list. Empty list of groups is ok, the behavior is then same like in the method without list of groups. - * @param inputCreateMemberForUser - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createMemberForUser( - inputCreateMemberForUser: InputCreateMemberForUser, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public createMemberForUser( - inputCreateMemberForUser: InputCreateMemberForUser, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public createMemberForUser( - inputCreateMemberForUser: InputCreateMemberForUser, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public createMemberForUser( - inputCreateMemberForUser: InputCreateMemberForUser, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputCreateMemberForUser === null || inputCreateMemberForUser === undefined) { - throw new Error( - 'Required parameter inputCreateMemberForUser was null or undefined when calling createMemberForUser.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/membersManager/createMember/u`, - inputCreateMemberForUser, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Creates a new member and sets all member\'s attributes from the candidate. Also stores the associated user if doesn\'t exist. This method is used by the registrar. This method also add user to all groups in list. Empty list of groups is ok, the behavior is then same like in the method without list of groups. - * @param inputCreateMemberFromExtSource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createMemberFromExtSource( - inputCreateMemberFromExtSource: InputCreateMemberFromExtSource, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public createMemberFromExtSource( - inputCreateMemberFromExtSource: InputCreateMemberFromExtSource, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public createMemberFromExtSource( - inputCreateMemberFromExtSource: InputCreateMemberFromExtSource, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public createMemberFromExtSource( - inputCreateMemberFromExtSource: InputCreateMemberFromExtSource, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputCreateMemberFromExtSource === null || inputCreateMemberFromExtSource === undefined) { - throw new Error( - 'Required parameter inputCreateMemberFromExtSource was null or undefined when calling createMemberFromExtSource.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/membersManager/createMember/extSource`, - inputCreateMemberFromExtSource, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Creates a new member from candidate which is prepared for creating specificUser. - * @param inputSpecificMember - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createSpecificMember( - inputSpecificMember: InputSpecificMember, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public createSpecificMember( - inputSpecificMember: InputSpecificMember, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public createSpecificMember( - inputSpecificMember: InputSpecificMember, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public createSpecificMember( - inputSpecificMember: InputSpecificMember, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputSpecificMember === null || inputSpecificMember === undefined) { - throw new Error( - 'Required parameter inputSpecificMember was null or undefined when calling createSpecificMember.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/membersManager/createSpecificMember`, - inputSpecificMember, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Creates a new sponsored member in a given VO and namespace. - * @param inputCreateSponsoredMember - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createSponsoredMember( - inputCreateSponsoredMember: InputCreateSponsoredMember, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public createSponsoredMember( - inputCreateSponsoredMember: InputCreateSponsoredMember, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public createSponsoredMember( - inputCreateSponsoredMember: InputCreateSponsoredMember, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public createSponsoredMember( - inputCreateSponsoredMember: InputCreateSponsoredMember, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputCreateSponsoredMember === null || inputCreateSponsoredMember === undefined) { - throw new Error( - 'Required parameter inputCreateSponsoredMember was null or undefined when calling createSponsoredMember.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/membersManager/createSponsoredMember/withFullName`, - inputCreateSponsoredMember, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Creates new sponsored members in a given VO and namespace. - * @param inputCreateSponsoredMember1 - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createSponsoredMembers( - inputCreateSponsoredMember1: InputCreateSponsoredMember1, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public createSponsoredMembers( - inputCreateSponsoredMember1: InputCreateSponsoredMember1, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public createSponsoredMembers( - inputCreateSponsoredMember1: InputCreateSponsoredMember1, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public createSponsoredMembers( - inputCreateSponsoredMember1: InputCreateSponsoredMember1, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputCreateSponsoredMember1 === null || inputCreateSponsoredMember1 === undefined) { - throw new Error( - 'Required parameter inputCreateSponsoredMember1 was null or undefined when calling createSponsoredMembers.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post>( - `${this.configuration.basePath}/json/membersManager/createSponsoredMembers`, - inputCreateSponsoredMember1, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Creates new sponsored members in a given VO and namespace. - * @param inputCreateSponsoredMemberFromCSV - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createSponsoredMembersFromCSV( - inputCreateSponsoredMemberFromCSV: InputCreateSponsoredMemberFromCSV, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public createSponsoredMembersFromCSV( - inputCreateSponsoredMemberFromCSV: InputCreateSponsoredMemberFromCSV, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public createSponsoredMembersFromCSV( - inputCreateSponsoredMemberFromCSV: InputCreateSponsoredMemberFromCSV, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public createSponsoredMembersFromCSV( - inputCreateSponsoredMemberFromCSV: InputCreateSponsoredMemberFromCSV, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if ( - inputCreateSponsoredMemberFromCSV === null || - inputCreateSponsoredMemberFromCSV === undefined - ) { - throw new Error( - 'Required parameter inputCreateSponsoredMemberFromCSV was null or undefined when calling createSponsoredMembersFromCSV.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post>( - `${this.configuration.basePath}/json/membersManager/createSponsoredMembersFromCSV`, - inputCreateSponsoredMemberFromCSV, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Deletes only member data appropriated by member id. - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteMember(member: number, observe?: 'body', reportProgress?: boolean): Observable; - public deleteMember( - member: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deleteMember( - member: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deleteMember( - member: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling deleteMember.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/membersManager/deleteMember`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Delete members with given ids. It is possible to delete members from multiple vos. - * @param members id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteMembers( - members: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public deleteMembers( - members: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deleteMembers( - members: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deleteMembers( - members: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (members === null || members === undefined) { - throw new Error( - 'Required parameter members was null or undefined when calling deleteMembers.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (members) { - members.forEach((element) => { - queryParameters = queryParameters.append('members[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/membersManager/deleteMembers`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Extend member membership using membershipExpirationRules attribute defined at VO. - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public extendMembership( - member: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public extendMembership( - member: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public extendMembership( - member: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public extendMembership( - member: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling extendMembership.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/membersManager/extendMembership`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Return list of richMembers from perun by the searchString with attributes specific for list of attrsNames and who have only status which is contain in list of statuses. If attrsNames is empty or null return all attributes for specific richMembers. If listOfStatuses is empty or null, return all possible statuses. - * @param attrsNames list of attribute names List<String> - * @param searchString Text to search by - * @param allowedStatuses list of allowed statuses List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findCompleteRichMembersByAttributes( - attrsNames: Array, - searchString: string, - allowedStatuses?: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public findCompleteRichMembersByAttributes( - attrsNames: Array, - searchString: string, - allowedStatuses?: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public findCompleteRichMembersByAttributes( - attrsNames: Array, - searchString: string, - allowedStatuses?: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public findCompleteRichMembersByAttributes( - attrsNames: Array, - searchString: string, - allowedStatuses?: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (attrsNames === null || attrsNames === undefined) { - throw new Error( - 'Required parameter attrsNames was null or undefined when calling findCompleteRichMembersByAttributes.' - ); - } - if (searchString === null || searchString === undefined) { - throw new Error( - 'Required parameter searchString was null or undefined when calling findCompleteRichMembersByAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (attrsNames) { - attrsNames.forEach((element) => { - queryParameters = queryParameters.append('attrsNames[]', element); - }); - } - if (searchString !== undefined && searchString !== null) { - queryParameters = queryParameters.set('searchString', searchString); - } - if (allowedStatuses) { - allowedStatuses.forEach((element) => { - queryParameters = queryParameters.append('allowedStatuses[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/membersManager/findCompleteRichMembers/attrs`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Return list of richMembers for specific group by the searchString with attributes specific for list of attrsNames and who have only status which is contain in lists of statuses. If attrsNames is empty or null return all attributes for specific richMembers. If listOfStatuses or listOfGroupStatuses is empty or null, return all possible statuses. If lookingInParentGroup is true, find all these richMembers only for parentGroup of this group. If this group is top level group, so find richMembers from members group. - * @param group id of Group - * @param attrsNames list of attribute names List<String> - * @param searchString Text to search by - * @param lookingInParentGroup If true, look up in a parent group - * @param allowedStatuses list of allowed statuses List<String> - * @param allowedGroupStatuses list of allowed group statuses List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findCompleteRichMembersForGroup( - group: number, - attrsNames: Array, - searchString: string, - lookingInParentGroup: boolean, - allowedStatuses?: Array, - allowedGroupStatuses?: Array<'VALID' | 'EXPIRED'>, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public findCompleteRichMembersForGroup( - group: number, - attrsNames: Array, - searchString: string, - lookingInParentGroup: boolean, - allowedStatuses?: Array, - allowedGroupStatuses?: Array<'VALID' | 'EXPIRED'>, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public findCompleteRichMembersForGroup( - group: number, - attrsNames: Array, - searchString: string, - lookingInParentGroup: boolean, - allowedStatuses?: Array, - allowedGroupStatuses?: Array<'VALID' | 'EXPIRED'>, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public findCompleteRichMembersForGroup( - group: number, - attrsNames: Array, - searchString: string, - lookingInParentGroup: boolean, - allowedStatuses?: Array, - allowedGroupStatuses?: Array<'VALID' | 'EXPIRED'>, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling findCompleteRichMembersForGroup.' - ); - } - if (attrsNames === null || attrsNames === undefined) { - throw new Error( - 'Required parameter attrsNames was null or undefined when calling findCompleteRichMembersForGroup.' - ); - } - if (searchString === null || searchString === undefined) { - throw new Error( - 'Required parameter searchString was null or undefined when calling findCompleteRichMembersForGroup.' - ); - } - if (lookingInParentGroup === null || lookingInParentGroup === undefined) { - throw new Error( - 'Required parameter lookingInParentGroup was null or undefined when calling findCompleteRichMembersForGroup.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (attrsNames) { - attrsNames.forEach((element) => { - queryParameters = queryParameters.append('attrsNames[]', element); - }); - } - if (allowedStatuses) { - allowedStatuses.forEach((element) => { - queryParameters = queryParameters.append('allowedStatuses[]', element); - }); - } - if (allowedGroupStatuses) { - allowedGroupStatuses.forEach((element) => { - queryParameters = queryParameters.append('allowedGroupStatuses[]', element); - }); - } - if (searchString !== undefined && searchString !== null) { - queryParameters = queryParameters.set('searchString', searchString); - } - if (lookingInParentGroup !== undefined && lookingInParentGroup !== null) { - queryParameters = queryParameters.set('lookingInParentGroup', lookingInParentGroup); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/membersManager/findCompleteRichMembers/g`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Return list of richMembers for specific vo by the searchString with attributes specific for list of attrsNames and who have only status which is contain in list of statuses. If attrsNames is empty or null return all attributes for specific richMembers. If listOfStatuses is empty or null, return all possible statuses. - * @param vo id of Vo - * @param attrsNames list of attribute names List<String> - * @param searchString Text to search by - * @param allowedStatuses list of allowed statuses List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findCompleteRichMembersForVo( - vo: number, - attrsNames: Array, - searchString: string, - allowedStatuses?: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public findCompleteRichMembersForVo( - vo: number, - attrsNames: Array, - searchString: string, - allowedStatuses?: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public findCompleteRichMembersForVo( - vo: number, - attrsNames: Array, - searchString: string, - allowedStatuses?: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public findCompleteRichMembersForVo( - vo: number, - attrsNames: Array, - searchString: string, - allowedStatuses?: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling findCompleteRichMembersForVo.' - ); - } - if (attrsNames === null || attrsNames === undefined) { - throw new Error( - 'Required parameter attrsNames was null or undefined when calling findCompleteRichMembersForVo.' - ); - } - if (searchString === null || searchString === undefined) { - throw new Error( - 'Required parameter searchString was null or undefined when calling findCompleteRichMembersForVo.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (attrsNames) { - attrsNames.forEach((element) => { - queryParameters = queryParameters.append('attrsNames[]', element); - }); - } - if (allowedStatuses) { - allowedStatuses.forEach((element) => { - queryParameters = queryParameters.append('allowedStatuses[]', element); - }); - } - if (searchString !== undefined && searchString !== null) { - queryParameters = queryParameters.set('searchString', searchString); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/membersManager/findCompleteRichMembers/v`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Searches for members in a VO. - * @param vo id of Vo - * @param searchString Text to search by - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findMembersInVo( - vo: number, - searchString: string, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public findMembersInVo( - vo: number, - searchString: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public findMembersInVo( - vo: number, - searchString: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public findMembersInVo( - vo: number, - searchString: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling findMembersInVo.'); - } - if (searchString === null || searchString === undefined) { - throw new Error( - 'Required parameter searchString was null or undefined when calling findMembersInVo.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (searchString !== undefined && searchString !== null) { - queryParameters = queryParameters.set('searchString', searchString); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/membersManager/findMembersInVo`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns list of RichMembers for vo, with reqested attributes, filterd by search string and option to return only sponosred members. - * @param vo id of Vo - * @param attrsNames list of attribute names List<String> - * @param searchString Text to search by - * @param onlySponsored Boolean specifying if only sponsored members should be returned - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findSponsoredCompleteRichMembersForVo( - vo: number, - attrsNames: Array, - searchString: string, - onlySponsored: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public findSponsoredCompleteRichMembersForVo( - vo: number, - attrsNames: Array, - searchString: string, - onlySponsored: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public findSponsoredCompleteRichMembersForVo( - vo: number, - attrsNames: Array, - searchString: string, - onlySponsored: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public findSponsoredCompleteRichMembersForVo( - vo: number, - attrsNames: Array, - searchString: string, - onlySponsored: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling findSponsoredCompleteRichMembersForVo.' - ); - } - if (attrsNames === null || attrsNames === undefined) { - throw new Error( - 'Required parameter attrsNames was null or undefined when calling findSponsoredCompleteRichMembersForVo.' - ); - } - if (searchString === null || searchString === undefined) { - throw new Error( - 'Required parameter searchString was null or undefined when calling findSponsoredCompleteRichMembersForVo.' - ); - } - if (onlySponsored === null || onlySponsored === undefined) { - throw new Error( - 'Required parameter onlySponsored was null or undefined when calling findSponsoredCompleteRichMembersForVo.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (attrsNames) { - attrsNames.forEach((element) => { - queryParameters = queryParameters.append('attrsNames[]', element); - }); - } - if (searchString !== undefined && searchString !== null) { - queryParameters = queryParameters.set('searchString', searchString); - } - if (onlySponsored !== undefined && onlySponsored !== null) { - queryParameters = queryParameters.set('onlySponsored', onlySponsored); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/membersManager/findCompleteRichMembers/v-sponsored`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all members from all vos. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllMembers(observe?: 'body', reportProgress?: boolean): Observable>; - public getAllMembers( - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllMembers( - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAllMembers(observe: any = 'body', reportProgress: boolean = false): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/membersManager/getAllMembers`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Return all loaded namespaces rules. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllNamespacesRules( - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAllNamespacesRules( - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllNamespacesRules( - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAllNamespacesRules( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/membersManager/getAllNamespacesRules`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets all sponsored members from VO. - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllSponsoredMembers( - vo: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAllSponsoredMembers( - vo: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllSponsoredMembers( - vo: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAllSponsoredMembers( - vo: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling getAllSponsoredMembers.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/membersManager/getAllSponsoredMembers`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets list of VO\'s all sponsored members with sponsors. - * @param vo id of Vo - * @param attrNames list of attribute names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllSponsoredMembersAndTheirSponsors( - vo: number, - attrNames: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAllSponsoredMembersAndTheirSponsors( - vo: number, - attrNames: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllSponsoredMembersAndTheirSponsors( - vo: number, - attrNames: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAllSponsoredMembersAndTheirSponsors( - vo: number, - attrNames: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling getAllSponsoredMembersAndTheirSponsors.' - ); - } - if (attrNames === null || attrNames === undefined) { - throw new Error( - 'Required parameter attrNames was null or undefined when calling getAllSponsoredMembersAndTheirSponsors.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/membersManager/getAllSponsoredMembersAndTheirSponsors`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all RichMembers with attributes specific for list of attrsNames from the group and have only status which is contain in lists of statuses. If attrsNames is empty or null return all attributes for specific richMembers. If listOfStatuses or listOfGroupStatuses is empty or null, return all possible statuses. If lookingInParentGroup is true, get all these richMembers only for parentGroup of this group. If this group is top level group, so get richMembers from members group. - * @param group id of Group - * @param lookingInParentGroup If true, look up in a parent group - * @param allowedStatuses list of allowed statuses List<String> - * @param allowedGroupStatuses list of allowed group statuses List<String> - * @param attrsNames list of attributes names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getCompleteRichMembersForGroup( - group: number, - lookingInParentGroup: boolean, - allowedStatuses?: Array, - allowedGroupStatuses?: Array<'VALID' | 'EXPIRED'>, - attrsNames?: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getCompleteRichMembersForGroup( - group: number, - lookingInParentGroup: boolean, - allowedStatuses?: Array, - allowedGroupStatuses?: Array<'VALID' | 'EXPIRED'>, - attrsNames?: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getCompleteRichMembersForGroup( - group: number, - lookingInParentGroup: boolean, - allowedStatuses?: Array, - allowedGroupStatuses?: Array<'VALID' | 'EXPIRED'>, - attrsNames?: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getCompleteRichMembersForGroup( - group: number, - lookingInParentGroup: boolean, - allowedStatuses?: Array, - allowedGroupStatuses?: Array<'VALID' | 'EXPIRED'>, - attrsNames?: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getCompleteRichMembersForGroup.' - ); - } - if (lookingInParentGroup === null || lookingInParentGroup === undefined) { - throw new Error( - 'Required parameter lookingInParentGroup was null or undefined when calling getCompleteRichMembersForGroup.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (allowedStatuses) { - allowedStatuses.forEach((element) => { - queryParameters = queryParameters.append('allowedStatuses[]', element); - }); - } - if (allowedGroupStatuses) { - allowedGroupStatuses.forEach((element) => { - queryParameters = queryParameters.append('allowedGroupStatuses[]', element); - }); - } - if (lookingInParentGroup !== undefined && lookingInParentGroup !== null) { - queryParameters = queryParameters.set('lookingInParentGroup', lookingInParentGroup); - } - if (attrsNames) { - attrsNames.forEach((element) => { - queryParameters = queryParameters.append('attrsNames[]', element); - }); - } - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/membersManager/getCompleteRichMembers/g`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all RichMembers with attributes specific for list of attrsNames. Attributes are defined by member (user) and resource (facility) objects. It returns also user-facility (in userAttributes of RichMember) and member-resource (in memberAttributes of RichMember) attributes. Members are defined by group and are filtered by list of allowed statuses. - * @param group id of Group - * @param resource id of Resource - * @param attrsNames list of attribute names List<String> - * @param allowedStatuses list of allowed statuses List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getCompleteRichMembersForGroupResource( - group: number, - resource: number, - attrsNames: Array, - allowedStatuses: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getCompleteRichMembersForGroupResource( - group: number, - resource: number, - attrsNames: Array, - allowedStatuses: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getCompleteRichMembersForGroupResource( - group: number, - resource: number, - attrsNames: Array, - allowedStatuses: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getCompleteRichMembersForGroupResource( - group: number, - resource: number, - attrsNames: Array, - allowedStatuses: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getCompleteRichMembersForGroupResource.' - ); - } - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getCompleteRichMembersForGroupResource.' - ); - } - if (attrsNames === null || attrsNames === undefined) { - throw new Error( - 'Required parameter attrsNames was null or undefined when calling getCompleteRichMembersForGroupResource.' - ); - } - if (allowedStatuses === null || allowedStatuses === undefined) { - throw new Error( - 'Required parameter allowedStatuses was null or undefined when calling getCompleteRichMembersForGroupResource.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (attrsNames) { - attrsNames.forEach((element) => { - queryParameters = queryParameters.append('attrsNames[]', element); - }); - } - if (allowedStatuses) { - allowedStatuses.forEach((element) => { - queryParameters = queryParameters.append('allowedStatuses[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/membersManager/getCompleteRichMembers/g-r`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all RichMembers with attributes specific for list of attrsNames from the vo and have only status which is contain in list of statuses. If attrsNames is empty or null return all attributes for specific richMembers. If listOfStatuses is empty or null, return all possible statuses. - * @param vo id of Vo - * @param allowedStatuses list of allowed statuses List<String> - * @param attrsNames list of attributes names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getCompleteRichMembersForVo( - vo: number, - allowedStatuses?: Array, - attrsNames?: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getCompleteRichMembersForVo( - vo: number, - allowedStatuses?: Array, - attrsNames?: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getCompleteRichMembersForVo( - vo: number, - allowedStatuses?: Array, - attrsNames?: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getCompleteRichMembersForVo( - vo: number, - allowedStatuses?: Array, - attrsNames?: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling getCompleteRichMembersForVo.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (allowedStatuses) { - allowedStatuses.forEach((element) => { - queryParameters = queryParameters.append('allowedStatuses[]', element); - }); - } - if (attrsNames) { - attrsNames.forEach((element) => { - queryParameters = queryParameters.append('attrsNames[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/membersManager/getCompleteRichMembers/v`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Searches for members in a VO. - * @param vo id of Vo - * @param extLogin external login of user, e.g. john - * @param extSourceName external source name, e.g. IdP entityId - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberByExtSourceNameAndExtLogin( - vo: number, - extLogin: string, - extSourceName: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getMemberByExtSourceNameAndExtLogin( - vo: number, - extLogin: string, - extSourceName: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getMemberByExtSourceNameAndExtLogin( - vo: number, - extLogin: string, - extSourceName: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getMemberByExtSourceNameAndExtLogin( - vo: number, - extLogin: string, - extSourceName: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling getMemberByExtSourceNameAndExtLogin.' - ); - } - if (extLogin === null || extLogin === undefined) { - throw new Error( - 'Required parameter extLogin was null or undefined when calling getMemberByExtSourceNameAndExtLogin.' - ); - } - if (extSourceName === null || extSourceName === undefined) { - throw new Error( - 'Required parameter extSourceName was null or undefined when calling getMemberByExtSourceNameAndExtLogin.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (extLogin !== undefined && extLogin !== null) { - queryParameters = queryParameters.set('extLogin', extLogin); - } - if (extSourceName !== undefined && extSourceName !== null) { - queryParameters = queryParameters.set('extSourceName', extSourceName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/membersManager/getMemberByExtSourceNameAndExtLogin`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns Member by its id. - * Gets Member - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberById(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public getMemberById( - id: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getMemberById( - id: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getMemberById( - id: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getMemberById.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/membersManager/getMemberById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns a Member specified by VO id and User id. - * @param vo id of Vo - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberByUser( - vo: number, - user: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getMemberByUser( - vo: number, - user: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getMemberByUser( - vo: number, - user: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getMemberByUser( - vo: number, - user: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getMemberByUser.'); - } - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling getMemberByUser.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/membersManager/getMemberByUser`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns members of a VO. - * @param vo id of Vo - * @param status optional status - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMembers( - vo: number, - status?: VoMemberStatuses, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getMembers( - vo: number, - status?: VoMemberStatuses, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getMembers( - vo: number, - status?: VoMemberStatuses, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getMembers( - vo: number, - status?: VoMemberStatuses, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getMembers.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (status !== undefined && status !== null) { - queryParameters = queryParameters.set('status', status); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/membersManager/getMembers`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns list of Members by their ids. - * @param ids list of ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMembersByIds( - ids: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getMembersByIds( - ids: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getMembersByIds( - ids: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getMembersByIds( - ids: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (ids === null || ids === undefined) { - throw new Error('Required parameter ids was null or undefined when calling getMembersByIds.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (ids) { - ids.forEach((element) => { - queryParameters = queryParameters.append('ids[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/membersManager/getMembersByIds`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns members for a user. - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMembersByUser( - user: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getMembersByUser( - user: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getMembersByUser( - user: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getMembersByUser( - user: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling getMembersByUser.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/membersManager/getMembersByUser`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns count of all VO members. - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMembersCount( - vo: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getMembersCount( - vo: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getMembersCount( - vo: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getMembersCount( - vo: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getMembersCount.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/membersManager/getMembersCount`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get page of members from the given vo, with the given attributes. - * @param inputGetPaginatedMembers - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMembersPage( - inputGetPaginatedMembers: InputGetPaginatedMembers, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getMembersPage( - inputGetPaginatedMembers: InputGetPaginatedMembers, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getMembersPage( - inputGetPaginatedMembers: InputGetPaginatedMembers, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getMembersPage( - inputGetPaginatedMembers: InputGetPaginatedMembers, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputGetPaginatedMembers === null || inputGetPaginatedMembers === undefined) { - throw new Error( - 'Required parameter inputGetPaginatedMembers was null or undefined when calling getMembersPage.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/membersManager/getMembersPage`, - inputGetPaginatedMembers, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns count of VO members with specified status. - * @param vo id of Vo - * @param status status (VALID | INVALID | EXPIRED | DISABLED) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMembersWithStatusCount( - vo: number, - status: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getMembersWithStatusCount( - vo: number, - status: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getMembersWithStatusCount( - vo: number, - status: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getMembersWithStatusCount( - vo: number, - status: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling getMembersWithStatusCount.' - ); - } - if (status === null || status === undefined) { - throw new Error( - 'Required parameter status was null or undefined when calling getMembersWithStatusCount.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (status !== undefined && status !== null) { - queryParameters = queryParameters.set('status', status); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/membersManager/getMembersCount/status`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns RichMember by member id. - * Get RichMember without attributes - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRichMember( - id: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getRichMember( - id: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getRichMember( - id: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getRichMember( - id: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getRichMember.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/membersManager/getRichMember`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns Member by its id. - * Get richMember with member/user attributes - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRichMemberWithAttributes( - id: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getRichMemberWithAttributes( - id: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getRichMemberWithAttributes( - id: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getRichMemberWithAttributes( - id: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling getRichMemberWithAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/membersManager/getRichMemberWithAttributes`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns rich members by their IDs with specific attributes. When the list of attribute names is null or empty then rich members will be returned without attributes. - * @param ids list of ids List<Integer> - * @param attrNames list of attribute names List<String> or null - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRichMembersByIds( - ids: Array, - attrNames?: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getRichMembersByIds( - ids: Array, - attrNames?: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getRichMembersByIds( - ids: Array, - attrNames?: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getRichMembersByIds( - ids: Array, - attrNames?: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (ids === null || ids === undefined) { - throw new Error( - 'Required parameter ids was null or undefined when calling getRichMembersByIds.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (ids) { - ids.forEach((element) => { - queryParameters = queryParameters.append('ids[]', element); - }); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/membersManager/getRichMembersByIds`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets members from VO who are sponsored. - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getSponsoredMembers( - vo: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getSponsoredMembers( - vo: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getSponsoredMembers( - vo: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getSponsoredMembers( - vo: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling getSponsoredMembers.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/membersManager/getSponsoredMembers/v`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets list of members with sponsors. - * @param vo id of Vo - * @param attrNames list of attribute names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getSponsoredMembersAndTheirSponsors( - vo: number, - attrNames: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getSponsoredMembersAndTheirSponsors( - vo: number, - attrNames: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getSponsoredMembersAndTheirSponsors( - vo: number, - attrNames: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getSponsoredMembersAndTheirSponsors( - vo: number, - attrNames: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling getSponsoredMembersAndTheirSponsors.' - ); - } - if (attrNames === null || attrNames === undefined) { - throw new Error( - 'Required parameter attrNames was null or undefined when calling getSponsoredMembersAndTheirSponsors.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/membersManager/getSponsoredMembersAndTheirSponsors`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets sponsors for given member with optional attribute names. - * @param member id of Member - * @param attrNames list of attribute names List<String> or null - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getSponsorsByMember( - member: number, - attrNames?: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getSponsorsByMember( - member: number, - attrNames?: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getSponsorsByMember( - member: number, - attrNames?: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getSponsorsByMember( - member: number, - attrNames?: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getSponsorsByMember.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/membersManager/getSponsors/member`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets sponsors for given VO, extSourceName and extLogin with optional attribute names. - * @param vo id of Vo - * @param extSourceName external source name, e.g. IdP entityId - * @param extLogin external login of user, e.g. john - * @param attrNames list of attribute names List<String> or null - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getSponsorsByVo( - vo: number, - extSourceName: string, - extLogin: string, - attrNames?: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getSponsorsByVo( - vo: number, - extSourceName: string, - extLogin: string, - attrNames?: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getSponsorsByVo( - vo: number, - extSourceName: string, - extLogin: string, - attrNames?: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getSponsorsByVo( - vo: number, - extSourceName: string, - extLogin: string, - attrNames?: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getSponsorsByVo.'); - } - if (extSourceName === null || extSourceName === undefined) { - throw new Error( - 'Required parameter extSourceName was null or undefined when calling getSponsorsByVo.' - ); - } - if (extLogin === null || extLogin === undefined) { - throw new Error( - 'Required parameter extLogin was null or undefined when calling getSponsorsByVo.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (extSourceName !== undefined && extSourceName !== null) { - queryParameters = queryParameters.set('extSourceName', extSourceName); - } - if (extLogin !== undefined && extLogin !== null) { - queryParameters = queryParameters.set('extLogin', extLogin); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/membersManager/getSponsors/vo`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Moves membership in VO from source user to target user - moves the source user\'s memberships in non-synchronized groups, member related attributes, bans and sponsorships in the VO. Removes the source user\'s member object. - * @param vo id of Vo - * @param sourceUser id of source user - * @param targetUser id of target user - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public moveMembership( - vo: number, - sourceUser: number, - targetUser: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public moveMembership( - vo: number, - sourceUser: number, - targetUser: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public moveMembership( - vo: number, - sourceUser: number, - targetUser: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public moveMembership( - vo: number, - sourceUser: number, - targetUser: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling moveMembership.'); - } - if (sourceUser === null || sourceUser === undefined) { - throw new Error( - 'Required parameter sourceUser was null or undefined when calling moveMembership.' - ); - } - if (targetUser === null || targetUser === undefined) { - throw new Error( - 'Required parameter targetUser was null or undefined when calling moveMembership.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (sourceUser !== undefined && sourceUser !== null) { - queryParameters = queryParameters.set('sourceUser', sourceUser); - } - if (targetUser !== undefined && targetUser !== null) { - queryParameters = queryParameters.set('targetUser', targetUser); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/membersManager/moveMembership`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Removes sponsor of existing member. - * @param member id of Member - * @param sponsor id of sponsor - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeSponsor( - member: number, - sponsor: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeSponsor( - member: number, - sponsor: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeSponsor( - member: number, - sponsor: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeSponsor( - member: number, - sponsor: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling removeSponsor.' - ); - } - if (sponsor === null || sponsor === undefined) { - throw new Error( - 'Required parameter sponsor was null or undefined when calling removeSponsor.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (sponsor !== undefined && sponsor !== null) { - queryParameters = queryParameters.set('sponsor', sponsor); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/membersManager/removeSponsor`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Send mail to user\'s preferred email address with link for non-authz account activation. Correct authz information is stored in link\'s URL. - * @param member id of Member - * @param namespace namespace - * @param emailAttributeURN urn of the attribute with stored mail - * @param language language of the message - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public sendAccountActivationLinkEmail( - member: number, - namespace: string, - emailAttributeURN: string, - language: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public sendAccountActivationLinkEmail( - member: number, - namespace: string, - emailAttributeURN: string, - language: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public sendAccountActivationLinkEmail( - member: number, - namespace: string, - emailAttributeURN: string, - language: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public sendAccountActivationLinkEmail( - member: number, - namespace: string, - emailAttributeURN: string, - language: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling sendAccountActivationLinkEmail.' - ); - } - if (namespace === null || namespace === undefined) { - throw new Error( - 'Required parameter namespace was null or undefined when calling sendAccountActivationLinkEmail.' - ); - } - if (emailAttributeURN === null || emailAttributeURN === undefined) { - throw new Error( - 'Required parameter emailAttributeURN was null or undefined when calling sendAccountActivationLinkEmail.' - ); - } - if (language === null || language === undefined) { - throw new Error( - 'Required parameter language was null or undefined when calling sendAccountActivationLinkEmail.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (namespace !== undefined && namespace !== null) { - queryParameters = queryParameters.set('namespace', namespace); - } - if (emailAttributeURN !== undefined && emailAttributeURN !== null) { - queryParameters = queryParameters.set('emailAttributeURN', emailAttributeURN); - } - if (language !== undefined && language !== null) { - queryParameters = queryParameters.set('language', language); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/membersManager/sendAccountActivationLinkEmail`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Send mail to user\'s preferred email address with link for non-authz password reset. Correct authz information is stored in link\'s URL. - * @param member id of Member - * @param namespace namespace - * @param emailAttributeURN urn of the attribute with stored mail - * @param language language of the message - * @param baseUrl base url of Perun instance (optional) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public sendPasswordResetLinkEmail( - member: number, - namespace: string, - emailAttributeURN: string, - language: string, - baseUrl?: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public sendPasswordResetLinkEmail( - member: number, - namespace: string, - emailAttributeURN: string, - language: string, - baseUrl?: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public sendPasswordResetLinkEmail( - member: number, - namespace: string, - emailAttributeURN: string, - language: string, - baseUrl?: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public sendPasswordResetLinkEmail( - member: number, - namespace: string, - emailAttributeURN: string, - language: string, - baseUrl?: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling sendPasswordResetLinkEmail.' - ); - } - if (namespace === null || namespace === undefined) { - throw new Error( - 'Required parameter namespace was null or undefined when calling sendPasswordResetLinkEmail.' - ); - } - if (emailAttributeURN === null || emailAttributeURN === undefined) { - throw new Error( - 'Required parameter emailAttributeURN was null or undefined when calling sendPasswordResetLinkEmail.' - ); - } - if (language === null || language === undefined) { - throw new Error( - 'Required parameter language was null or undefined when calling sendPasswordResetLinkEmail.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (namespace !== undefined && namespace !== null) { - queryParameters = queryParameters.set('namespace', namespace); - } - if (emailAttributeURN !== undefined && emailAttributeURN !== null) { - queryParameters = queryParameters.set('emailAttributeURN', emailAttributeURN); - } - if (language !== undefined && language !== null) { - queryParameters = queryParameters.set('language', language); - } - if (baseUrl !== undefined && baseUrl !== null) { - queryParameters = queryParameters.set('baseUrl', baseUrl); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/membersManager/sendPasswordResetLinkEmail`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Creates a sponsored membership for the given user. - * @param inputSetSponsoredMember - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setSponsoredMember( - inputSetSponsoredMember: InputSetSponsoredMember, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setSponsoredMember( - inputSetSponsoredMember: InputSetSponsoredMember, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setSponsoredMember( - inputSetSponsoredMember: InputSetSponsoredMember, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setSponsoredMember( - inputSetSponsoredMember: InputSetSponsoredMember, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputSetSponsoredMember === null || inputSetSponsoredMember === undefined) { - throw new Error( - 'Required parameter inputSetSponsoredMember was null or undefined when calling setSponsoredMember.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/membersManager/setSponsoredMember`, - inputSetSponsoredMember, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Transform non-sponsored member to sponsored one, with defined sponsor and optional sponsorship validity expiration - * @param sponsoredMember id of member to be sponsored - * @param sponsor id of sponsor - * @param validityTo date in format yyyy-mm-dd - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setSponsorshipForMember( - sponsoredMember: number, - sponsor: number, - validityTo?: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setSponsorshipForMember( - sponsoredMember: number, - sponsor: number, - validityTo?: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setSponsorshipForMember( - sponsoredMember: number, - sponsor: number, - validityTo?: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setSponsorshipForMember( - sponsoredMember: number, - sponsor: number, - validityTo?: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (sponsoredMember === null || sponsoredMember === undefined) { - throw new Error( - 'Required parameter sponsoredMember was null or undefined when calling setSponsorshipForMember.' - ); - } - if (sponsor === null || sponsor === undefined) { - throw new Error( - 'Required parameter sponsor was null or undefined when calling setSponsorshipForMember.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (sponsoredMember !== undefined && sponsoredMember !== null) { - queryParameters = queryParameters.set('sponsoredMember', sponsoredMember); - } - if (sponsor !== undefined && sponsor !== null) { - queryParameters = queryParameters.set('sponsor', sponsor); - } - if (validityTo !== undefined && validityTo !== null) { - queryParameters = queryParameters.set('validityTo', validityTo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/membersManager/setSponsorshipForMember`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Set membership status of a member. - * @param member id of Member - * @param status status (VALID | INVALID | EXPIRED | DISABLED) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setStatus( - member: number, - status: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setStatus( - member: number, - status: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setStatus( - member: number, - status: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setStatus( - member: number, - status: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling setStatus.'); - } - if (status === null || status === undefined) { - throw new Error('Required parameter status was null or undefined when calling setStatus.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (status !== undefined && status !== null) { - queryParameters = queryParameters.set('status', status); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/membersManager/setStatus`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * For an existing member, assigns a new sponsor - * @param member id of Member - * @param sponsor id of sponsor - * @param validityTo date in format yyyy-mm-dd - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public sponsorMember( - member: number, - sponsor: number, - validityTo?: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public sponsorMember( - member: number, - sponsor: number, - validityTo?: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public sponsorMember( - member: number, - sponsor: number, - validityTo?: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public sponsorMember( - member: number, - sponsor: number, - validityTo?: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling sponsorMember.' - ); - } - if (sponsor === null || sponsor === undefined) { - throw new Error( - 'Required parameter sponsor was null or undefined when calling sponsorMember.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (sponsor !== undefined && sponsor !== null) { - queryParameters = queryParameters.set('sponsor', sponsor); - } - if (validityTo !== undefined && validityTo !== null) { - queryParameters = queryParameters.set('validityTo', validityTo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/membersManager/sponsorMember`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Updates sponsorship validity. To change it to FOREVER, don\'t pass the validityTo param, or pass it as null. - * @param member id of Member - * @param sponsor id of sponsor - * @param validityTo date in format yyyy-mm-dd - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateSponsorshipValidity( - member: number, - sponsor: number, - validityTo?: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public updateSponsorshipValidity( - member: number, - sponsor: number, - validityTo?: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public updateSponsorshipValidity( - member: number, - sponsor: number, - validityTo?: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public updateSponsorshipValidity( - member: number, - sponsor: number, - validityTo?: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling updateSponsorshipValidity.' - ); - } - if (sponsor === null || sponsor === undefined) { - throw new Error( - 'Required parameter sponsor was null or undefined when calling updateSponsorshipValidity.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (sponsor !== undefined && sponsor !== null) { - queryParameters = queryParameters.set('sponsor', sponsor); - } - if (validityTo !== undefined && validityTo !== null) { - queryParameters = queryParameters.set('validityTo', validityTo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/membersManager/updateSponsorshipValidity`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Validate all attributes for member and set member\'s status to VALID. This method runs asynchronously. It immediately return member with original status and after asynchronous validation successfully finishes it switch member\'s status to VALID. If validation ends with error, member keeps his status. - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public validateMemberAsync( - member: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public validateMemberAsync( - member: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public validateMemberAsync( - member: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public validateMemberAsync( - member: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling validateMemberAsync.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + + + /** + * Return true if the membership can be extended or if no rules were set for the membershipExpiration, otherwise false. + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public canExtendMembership(member: number, observe?: 'body', reportProgress?: boolean): Observable; + public canExtendMembership(member: number, observe?: 'response', reportProgress?: boolean): Observable>; + public canExtendMembership(member: number, observe?: 'events', reportProgress?: boolean): Observable>; + public canExtendMembership(member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling canExtendMembership.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/membersManager/canExtendMembership`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Creates a new member from candidate returned by the method VosManager.findCandidates which fills Candidate.userExtSource. This method also add user to all groups in list. Empty list of groups is ok, the behavior is then same like in the method without list of groups. This method runs asynchronously + * @param inputCreateMemberForCandidate + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createMemberForCandidate(inputCreateMemberForCandidate: InputCreateMemberForCandidate, observe?: 'body', reportProgress?: boolean): Observable; + public createMemberForCandidate(inputCreateMemberForCandidate: InputCreateMemberForCandidate, observe?: 'response', reportProgress?: boolean): Observable>; + public createMemberForCandidate(inputCreateMemberForCandidate: InputCreateMemberForCandidate, observe?: 'events', reportProgress?: boolean): Observable>; + public createMemberForCandidate(inputCreateMemberForCandidate: InputCreateMemberForCandidate, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputCreateMemberForCandidate === null || inputCreateMemberForCandidate === undefined) { + throw new Error('Required parameter inputCreateMemberForCandidate was null or undefined when calling createMemberForCandidate.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/membersManager/createMember/c`, + inputCreateMemberForCandidate, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Creates a new member from user. This method also add user to all groups in list. Empty list of groups is ok, the behavior is then same like in the method without list of groups. + * @param inputCreateMemberForUser + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createMemberForUser(inputCreateMemberForUser: InputCreateMemberForUser, observe?: 'body', reportProgress?: boolean): Observable; + public createMemberForUser(inputCreateMemberForUser: InputCreateMemberForUser, observe?: 'response', reportProgress?: boolean): Observable>; + public createMemberForUser(inputCreateMemberForUser: InputCreateMemberForUser, observe?: 'events', reportProgress?: boolean): Observable>; + public createMemberForUser(inputCreateMemberForUser: InputCreateMemberForUser, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputCreateMemberForUser === null || inputCreateMemberForUser === undefined) { + throw new Error('Required parameter inputCreateMemberForUser was null or undefined when calling createMemberForUser.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/membersManager/createMember/u`, + inputCreateMemberForUser, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Creates a new member and sets all member\'s attributes from the candidate. Also stores the associated user if doesn\'t exist. This method is used by the registrar. This method also add user to all groups in list. Empty list of groups is ok, the behavior is then same like in the method without list of groups. + * @param inputCreateMemberFromExtSource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createMemberFromExtSource(inputCreateMemberFromExtSource: InputCreateMemberFromExtSource, observe?: 'body', reportProgress?: boolean): Observable; + public createMemberFromExtSource(inputCreateMemberFromExtSource: InputCreateMemberFromExtSource, observe?: 'response', reportProgress?: boolean): Observable>; + public createMemberFromExtSource(inputCreateMemberFromExtSource: InputCreateMemberFromExtSource, observe?: 'events', reportProgress?: boolean): Observable>; + public createMemberFromExtSource(inputCreateMemberFromExtSource: InputCreateMemberFromExtSource, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputCreateMemberFromExtSource === null || inputCreateMemberFromExtSource === undefined) { + throw new Error('Required parameter inputCreateMemberFromExtSource was null or undefined when calling createMemberFromExtSource.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/membersManager/createMember/extSource`, + inputCreateMemberFromExtSource, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Creates a new member from candidate which is prepared for creating specificUser. + * @param inputSpecificMember + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createSpecificMember(inputSpecificMember: InputSpecificMember, observe?: 'body', reportProgress?: boolean): Observable; + public createSpecificMember(inputSpecificMember: InputSpecificMember, observe?: 'response', reportProgress?: boolean): Observable>; + public createSpecificMember(inputSpecificMember: InputSpecificMember, observe?: 'events', reportProgress?: boolean): Observable>; + public createSpecificMember(inputSpecificMember: InputSpecificMember, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSpecificMember === null || inputSpecificMember === undefined) { + throw new Error('Required parameter inputSpecificMember was null or undefined when calling createSpecificMember.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/membersManager/createSpecificMember`, + inputSpecificMember, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Creates a new sponsored member in a given VO and namespace. + * @param inputCreateSponsoredMember + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createSponsoredMember(inputCreateSponsoredMember: InputCreateSponsoredMember, observe?: 'body', reportProgress?: boolean): Observable; + public createSponsoredMember(inputCreateSponsoredMember: InputCreateSponsoredMember, observe?: 'response', reportProgress?: boolean): Observable>; + public createSponsoredMember(inputCreateSponsoredMember: InputCreateSponsoredMember, observe?: 'events', reportProgress?: boolean): Observable>; + public createSponsoredMember(inputCreateSponsoredMember: InputCreateSponsoredMember, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputCreateSponsoredMember === null || inputCreateSponsoredMember === undefined) { + throw new Error('Required parameter inputCreateSponsoredMember was null or undefined when calling createSponsoredMember.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/membersManager/createSponsoredMember/withFullName`, + inputCreateSponsoredMember, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Creates new sponsored members in a given VO and namespace. + * @param inputCreateSponsoredMember1 + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createSponsoredMembers(inputCreateSponsoredMember1: InputCreateSponsoredMember1, observe?: 'body', reportProgress?: boolean): Observable>; + public createSponsoredMembers(inputCreateSponsoredMember1: InputCreateSponsoredMember1, observe?: 'response', reportProgress?: boolean): Observable>>; + public createSponsoredMembers(inputCreateSponsoredMember1: InputCreateSponsoredMember1, observe?: 'events', reportProgress?: boolean): Observable>>; + public createSponsoredMembers(inputCreateSponsoredMember1: InputCreateSponsoredMember1, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputCreateSponsoredMember1 === null || inputCreateSponsoredMember1 === undefined) { + throw new Error('Required parameter inputCreateSponsoredMember1 was null or undefined when calling createSponsoredMembers.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post>(`${this.configuration.basePath}/json/membersManager/createSponsoredMembers`, + inputCreateSponsoredMember1, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Creates new sponsored members in a given VO and namespace. + * @param inputCreateSponsoredMemberFromCSV + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createSponsoredMembersFromCSV(inputCreateSponsoredMemberFromCSV: InputCreateSponsoredMemberFromCSV, observe?: 'body', reportProgress?: boolean): Observable>; + public createSponsoredMembersFromCSV(inputCreateSponsoredMemberFromCSV: InputCreateSponsoredMemberFromCSV, observe?: 'response', reportProgress?: boolean): Observable>>; + public createSponsoredMembersFromCSV(inputCreateSponsoredMemberFromCSV: InputCreateSponsoredMemberFromCSV, observe?: 'events', reportProgress?: boolean): Observable>>; + public createSponsoredMembersFromCSV(inputCreateSponsoredMemberFromCSV: InputCreateSponsoredMemberFromCSV, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputCreateSponsoredMemberFromCSV === null || inputCreateSponsoredMemberFromCSV === undefined) { + throw new Error('Required parameter inputCreateSponsoredMemberFromCSV was null or undefined when calling createSponsoredMembersFromCSV.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post>(`${this.configuration.basePath}/json/membersManager/createSponsoredMembersFromCSV`, + inputCreateSponsoredMemberFromCSV, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Deletes only member data appropriated by member id. + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteMember(member: number, observe?: 'body', reportProgress?: boolean): Observable; + public deleteMember(member: number, observe?: 'response', reportProgress?: boolean): Observable>; + public deleteMember(member: number, observe?: 'events', reportProgress?: boolean): Observable>; + public deleteMember(member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling deleteMember.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/membersManager/deleteMember`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Delete members with given ids. It is possible to delete members from multiple vos. + * @param members id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteMembers(members: Array, observe?: 'body', reportProgress?: boolean): Observable; + public deleteMembers(members: Array, observe?: 'response', reportProgress?: boolean): Observable>; + public deleteMembers(members: Array, observe?: 'events', reportProgress?: boolean): Observable>; + public deleteMembers(members: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (members === null || members === undefined) { + throw new Error('Required parameter members was null or undefined when calling deleteMembers.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (members) { + members.forEach((element) => { + queryParameters = queryParameters.append('members[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/membersManager/deleteMembers`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Extend member membership using membershipExpirationRules attribute defined at VO. + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public extendMembership(member: number, observe?: 'body', reportProgress?: boolean): Observable; + public extendMembership(member: number, observe?: 'response', reportProgress?: boolean): Observable>; + public extendMembership(member: number, observe?: 'events', reportProgress?: boolean): Observable>; + public extendMembership(member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling extendMembership.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/membersManager/extendMembership`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Return list of richMembers from perun by the searchString with attributes specific for list of attrsNames and who have only status which is contain in list of statuses. If attrsNames is empty or null return all attributes for specific richMembers. If listOfStatuses is empty or null, return all possible statuses. + * @param attrsNames list of attribute names List<String> + * @param searchString Text to search by + * @param allowedStatuses list of allowed statuses List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findCompleteRichMembersByAttributes(attrsNames: Array, searchString: string, allowedStatuses?: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public findCompleteRichMembersByAttributes(attrsNames: Array, searchString: string, allowedStatuses?: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public findCompleteRichMembersByAttributes(attrsNames: Array, searchString: string, allowedStatuses?: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public findCompleteRichMembersByAttributes(attrsNames: Array, searchString: string, allowedStatuses?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (attrsNames === null || attrsNames === undefined) { + throw new Error('Required parameter attrsNames was null or undefined when calling findCompleteRichMembersByAttributes.'); + } + if (searchString === null || searchString === undefined) { + throw new Error('Required parameter searchString was null or undefined when calling findCompleteRichMembersByAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (attrsNames) { + attrsNames.forEach((element) => { + queryParameters = queryParameters.append('attrsNames[]', element); + }) + } + if (searchString !== undefined && searchString !== null) { + queryParameters = queryParameters.set('searchString', searchString); + } + if (allowedStatuses) { + allowedStatuses.forEach((element) => { + queryParameters = queryParameters.append('allowedStatuses[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/findCompleteRichMembers/attrs`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Return list of richMembers for specific group by the searchString with attributes specific for list of attrsNames and who have only status which is contain in lists of statuses. If attrsNames is empty or null return all attributes for specific richMembers. If listOfStatuses or listOfGroupStatuses is empty or null, return all possible statuses. If lookingInParentGroup is true, find all these richMembers only for parentGroup of this group. If this group is top level group, so find richMembers from members group. + * @param group id of Group + * @param attrsNames list of attribute names List<String> + * @param searchString Text to search by + * @param lookingInParentGroup If true, look up in a parent group + * @param allowedStatuses list of allowed statuses List<String> + * @param allowedGroupStatuses list of allowed group statuses List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findCompleteRichMembersForGroup(group: number, attrsNames: Array, searchString: string, lookingInParentGroup: boolean, allowedStatuses?: Array, allowedGroupStatuses?: Array<'VALID' | 'EXPIRED'>, observe?: 'body', reportProgress?: boolean): Observable>; + public findCompleteRichMembersForGroup(group: number, attrsNames: Array, searchString: string, lookingInParentGroup: boolean, allowedStatuses?: Array, allowedGroupStatuses?: Array<'VALID' | 'EXPIRED'>, observe?: 'response', reportProgress?: boolean): Observable>>; + public findCompleteRichMembersForGroup(group: number, attrsNames: Array, searchString: string, lookingInParentGroup: boolean, allowedStatuses?: Array, allowedGroupStatuses?: Array<'VALID' | 'EXPIRED'>, observe?: 'events', reportProgress?: boolean): Observable>>; + public findCompleteRichMembersForGroup(group: number, attrsNames: Array, searchString: string, lookingInParentGroup: boolean, allowedStatuses?: Array, allowedGroupStatuses?: Array<'VALID' | 'EXPIRED'>, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling findCompleteRichMembersForGroup.'); + } + if (attrsNames === null || attrsNames === undefined) { + throw new Error('Required parameter attrsNames was null or undefined when calling findCompleteRichMembersForGroup.'); + } + if (searchString === null || searchString === undefined) { + throw new Error('Required parameter searchString was null or undefined when calling findCompleteRichMembersForGroup.'); + } + if (lookingInParentGroup === null || lookingInParentGroup === undefined) { + throw new Error('Required parameter lookingInParentGroup was null or undefined when calling findCompleteRichMembersForGroup.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (attrsNames) { + attrsNames.forEach((element) => { + queryParameters = queryParameters.append('attrsNames[]', element); + }) + } + if (allowedStatuses) { + allowedStatuses.forEach((element) => { + queryParameters = queryParameters.append('allowedStatuses[]', element); + }) + } + if (allowedGroupStatuses) { + allowedGroupStatuses.forEach((element) => { + queryParameters = queryParameters.append('allowedGroupStatuses[]', element); + }) + } + if (searchString !== undefined && searchString !== null) { + queryParameters = queryParameters.set('searchString', searchString); + } + if (lookingInParentGroup !== undefined && lookingInParentGroup !== null) { + queryParameters = queryParameters.set('lookingInParentGroup', lookingInParentGroup); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/findCompleteRichMembers/g`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Return list of richMembers for specific vo by the searchString with attributes specific for list of attrsNames and who have only status which is contain in list of statuses. If attrsNames is empty or null return all attributes for specific richMembers. If listOfStatuses is empty or null, return all possible statuses. + * @param vo id of Vo + * @param attrsNames list of attribute names List<String> + * @param searchString Text to search by + * @param allowedStatuses list of allowed statuses List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findCompleteRichMembersForVo(vo: number, attrsNames: Array, searchString: string, allowedStatuses?: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public findCompleteRichMembersForVo(vo: number, attrsNames: Array, searchString: string, allowedStatuses?: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public findCompleteRichMembersForVo(vo: number, attrsNames: Array, searchString: string, allowedStatuses?: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public findCompleteRichMembersForVo(vo: number, attrsNames: Array, searchString: string, allowedStatuses?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling findCompleteRichMembersForVo.'); + } + if (attrsNames === null || attrsNames === undefined) { + throw new Error('Required parameter attrsNames was null or undefined when calling findCompleteRichMembersForVo.'); + } + if (searchString === null || searchString === undefined) { + throw new Error('Required parameter searchString was null or undefined when calling findCompleteRichMembersForVo.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (attrsNames) { + attrsNames.forEach((element) => { + queryParameters = queryParameters.append('attrsNames[]', element); + }) + } + if (allowedStatuses) { + allowedStatuses.forEach((element) => { + queryParameters = queryParameters.append('allowedStatuses[]', element); + }) + } + if (searchString !== undefined && searchString !== null) { + queryParameters = queryParameters.set('searchString', searchString); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/findCompleteRichMembers/v`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Searches for members in a VO. + * @param vo id of Vo + * @param searchString Text to search by + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findMembersInVo(vo: number, searchString: string, observe?: 'body', reportProgress?: boolean): Observable>; + public findMembersInVo(vo: number, searchString: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public findMembersInVo(vo: number, searchString: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public findMembersInVo(vo: number, searchString: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling findMembersInVo.'); + } + if (searchString === null || searchString === undefined) { + throw new Error('Required parameter searchString was null or undefined when calling findMembersInVo.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (searchString !== undefined && searchString !== null) { + queryParameters = queryParameters.set('searchString', searchString); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/findMembersInVo`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns list of RichMembers for vo, with reqested attributes, filterd by search string and option to return only sponosred members. + * @param vo id of Vo + * @param attrsNames list of attribute names List<String> + * @param searchString Text to search by + * @param onlySponsored Boolean specifying if only sponsored members should be returned + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findSponsoredCompleteRichMembersForVo(vo: number, attrsNames: Array, searchString: string, onlySponsored: boolean, observe?: 'body', reportProgress?: boolean): Observable>; + public findSponsoredCompleteRichMembersForVo(vo: number, attrsNames: Array, searchString: string, onlySponsored: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; + public findSponsoredCompleteRichMembersForVo(vo: number, attrsNames: Array, searchString: string, onlySponsored: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; + public findSponsoredCompleteRichMembersForVo(vo: number, attrsNames: Array, searchString: string, onlySponsored: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling findSponsoredCompleteRichMembersForVo.'); + } + if (attrsNames === null || attrsNames === undefined) { + throw new Error('Required parameter attrsNames was null or undefined when calling findSponsoredCompleteRichMembersForVo.'); + } + if (searchString === null || searchString === undefined) { + throw new Error('Required parameter searchString was null or undefined when calling findSponsoredCompleteRichMembersForVo.'); + } + if (onlySponsored === null || onlySponsored === undefined) { + throw new Error('Required parameter onlySponsored was null or undefined when calling findSponsoredCompleteRichMembersForVo.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (attrsNames) { + attrsNames.forEach((element) => { + queryParameters = queryParameters.append('attrsNames[]', element); + }) + } + if (searchString !== undefined && searchString !== null) { + queryParameters = queryParameters.set('searchString', searchString); + } + if (onlySponsored !== undefined && onlySponsored !== null) { + queryParameters = queryParameters.set('onlySponsored', onlySponsored); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/findCompleteRichMembers/v-sponsored`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all members from all vos. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllMembers(observe?: 'body', reportProgress?: boolean): Observable>; + public getAllMembers(observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllMembers(observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllMembers(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/getAllMembers`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Return all loaded namespaces rules. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllNamespacesRules(observe?: 'body', reportProgress?: boolean): Observable>; + public getAllNamespacesRules(observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllNamespacesRules(observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllNamespacesRules(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/getAllNamespacesRules`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Gets all sponsored members from VO. + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllSponsoredMembers(vo: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAllSponsoredMembers(vo: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllSponsoredMembers(vo: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllSponsoredMembers(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getAllSponsoredMembers.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/getAllSponsoredMembers`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Gets list of VO\'s all sponsored members with sponsors. + * @param vo id of Vo + * @param attrNames list of attribute names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllSponsoredMembersAndTheirSponsors(vo: number, attrNames: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getAllSponsoredMembersAndTheirSponsors(vo: number, attrNames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllSponsoredMembersAndTheirSponsors(vo: number, attrNames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllSponsoredMembersAndTheirSponsors(vo: number, attrNames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getAllSponsoredMembersAndTheirSponsors.'); + } + if (attrNames === null || attrNames === undefined) { + throw new Error('Required parameter attrNames was null or undefined when calling getAllSponsoredMembersAndTheirSponsors.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/getAllSponsoredMembersAndTheirSponsors`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all RichMembers with attributes specific for list of attrsNames from the group and have only status which is contain in lists of statuses. If attrsNames is empty or null return all attributes for specific richMembers. If listOfStatuses or listOfGroupStatuses is empty or null, return all possible statuses. If lookingInParentGroup is true, get all these richMembers only for parentGroup of this group. If this group is top level group, so get richMembers from members group. + * @param group id of Group + * @param lookingInParentGroup If true, look up in a parent group + * @param allowedStatuses list of allowed statuses List<String> + * @param allowedGroupStatuses list of allowed group statuses List<String> + * @param attrsNames list of attributes names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getCompleteRichMembersForGroup(group: number, lookingInParentGroup: boolean, allowedStatuses?: Array, allowedGroupStatuses?: Array<'VALID' | 'EXPIRED'>, attrsNames?: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getCompleteRichMembersForGroup(group: number, lookingInParentGroup: boolean, allowedStatuses?: Array, allowedGroupStatuses?: Array<'VALID' | 'EXPIRED'>, attrsNames?: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getCompleteRichMembersForGroup(group: number, lookingInParentGroup: boolean, allowedStatuses?: Array, allowedGroupStatuses?: Array<'VALID' | 'EXPIRED'>, attrsNames?: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getCompleteRichMembersForGroup(group: number, lookingInParentGroup: boolean, allowedStatuses?: Array, allowedGroupStatuses?: Array<'VALID' | 'EXPIRED'>, attrsNames?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getCompleteRichMembersForGroup.'); + } + if (lookingInParentGroup === null || lookingInParentGroup === undefined) { + throw new Error('Required parameter lookingInParentGroup was null or undefined when calling getCompleteRichMembersForGroup.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (allowedStatuses) { + allowedStatuses.forEach((element) => { + queryParameters = queryParameters.append('allowedStatuses[]', element); + }) + } + if (allowedGroupStatuses) { + allowedGroupStatuses.forEach((element) => { + queryParameters = queryParameters.append('allowedGroupStatuses[]', element); + }) + } + if (lookingInParentGroup !== undefined && lookingInParentGroup !== null) { + queryParameters = queryParameters.set('lookingInParentGroup', lookingInParentGroup); + } + if (attrsNames) { + attrsNames.forEach((element) => { + queryParameters = queryParameters.append('attrsNames[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/getCompleteRichMembers/g`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all RichMembers with attributes specific for list of attrsNames. Attributes are defined by member (user) and resource (facility) objects. It returns also user-facility (in userAttributes of RichMember) and member-resource (in memberAttributes of RichMember) attributes. Members are defined by group and are filtered by list of allowed statuses. + * @param group id of Group + * @param resource id of Resource + * @param attrsNames list of attribute names List<String> + * @param allowedStatuses list of allowed statuses List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getCompleteRichMembersForGroupResource(group: number, resource: number, attrsNames: Array, allowedStatuses: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getCompleteRichMembersForGroupResource(group: number, resource: number, attrsNames: Array, allowedStatuses: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getCompleteRichMembersForGroupResource(group: number, resource: number, attrsNames: Array, allowedStatuses: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getCompleteRichMembersForGroupResource(group: number, resource: number, attrsNames: Array, allowedStatuses: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getCompleteRichMembersForGroupResource.'); + } + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getCompleteRichMembersForGroupResource.'); + } + if (attrsNames === null || attrsNames === undefined) { + throw new Error('Required parameter attrsNames was null or undefined when calling getCompleteRichMembersForGroupResource.'); + } + if (allowedStatuses === null || allowedStatuses === undefined) { + throw new Error('Required parameter allowedStatuses was null or undefined when calling getCompleteRichMembersForGroupResource.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (attrsNames) { + attrsNames.forEach((element) => { + queryParameters = queryParameters.append('attrsNames[]', element); + }) + } + if (allowedStatuses) { + allowedStatuses.forEach((element) => { + queryParameters = queryParameters.append('allowedStatuses[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/getCompleteRichMembers/g-r`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all RichMembers with attributes specific for list of attrsNames from the vo and have only status which is contain in list of statuses. If attrsNames is empty or null return all attributes for specific richMembers. If listOfStatuses is empty or null, return all possible statuses. + * @param vo id of Vo + * @param allowedStatuses list of allowed statuses List<String> + * @param attrsNames list of attributes names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getCompleteRichMembersForVo(vo: number, allowedStatuses?: Array, attrsNames?: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getCompleteRichMembersForVo(vo: number, allowedStatuses?: Array, attrsNames?: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getCompleteRichMembersForVo(vo: number, allowedStatuses?: Array, attrsNames?: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getCompleteRichMembersForVo(vo: number, allowedStatuses?: Array, attrsNames?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getCompleteRichMembersForVo.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (allowedStatuses) { + allowedStatuses.forEach((element) => { + queryParameters = queryParameters.append('allowedStatuses[]', element); + }) + } + if (attrsNames) { + attrsNames.forEach((element) => { + queryParameters = queryParameters.append('attrsNames[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/getCompleteRichMembers/v`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Searches for members in a VO. + * @param vo id of Vo + * @param extLogin external login of user, e.g. john + * @param extSourceName external source name, e.g. IdP entityId + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberByExtSourceNameAndExtLogin(vo: number, extLogin: string, extSourceName: string, observe?: 'body', reportProgress?: boolean): Observable; + public getMemberByExtSourceNameAndExtLogin(vo: number, extLogin: string, extSourceName: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getMemberByExtSourceNameAndExtLogin(vo: number, extLogin: string, extSourceName: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getMemberByExtSourceNameAndExtLogin(vo: number, extLogin: string, extSourceName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getMemberByExtSourceNameAndExtLogin.'); + } + if (extLogin === null || extLogin === undefined) { + throw new Error('Required parameter extLogin was null or undefined when calling getMemberByExtSourceNameAndExtLogin.'); + } + if (extSourceName === null || extSourceName === undefined) { + throw new Error('Required parameter extSourceName was null or undefined when calling getMemberByExtSourceNameAndExtLogin.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (extLogin !== undefined && extLogin !== null) { + queryParameters = queryParameters.set('extLogin', extLogin); + } + if (extSourceName !== undefined && extSourceName !== null) { + queryParameters = queryParameters.set('extSourceName', extSourceName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/membersManager/getMemberByExtSourceNameAndExtLogin`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns Member by its id. + * Gets Member + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberById(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public getMemberById(id: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getMemberById(id: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getMemberById(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getMemberById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/membersManager/getMemberById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns a Member specified by VO id and User id. + * @param vo id of Vo + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberByUser(vo: number, user: number, observe?: 'body', reportProgress?: boolean): Observable; + public getMemberByUser(vo: number, user: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getMemberByUser(vo: number, user: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getMemberByUser(vo: number, user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getMemberByUser.'); + } + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getMemberByUser.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/membersManager/getMemberByUser`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns members of a VO. + * @param vo id of Vo + * @param status optional status + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMembers(vo: number, status?: VoMemberStatuses, observe?: 'body', reportProgress?: boolean): Observable>; + public getMembers(vo: number, status?: VoMemberStatuses, observe?: 'response', reportProgress?: boolean): Observable>>; + public getMembers(vo: number, status?: VoMemberStatuses, observe?: 'events', reportProgress?: boolean): Observable>>; + public getMembers(vo: number, status?: VoMemberStatuses, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getMembers.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (status !== undefined && status !== null) { + queryParameters = queryParameters.set('status', status); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/getMembers`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns list of Members by their ids. + * @param ids list of ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMembersByIds(ids: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getMembersByIds(ids: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getMembersByIds(ids: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getMembersByIds(ids: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (ids === null || ids === undefined) { + throw new Error('Required parameter ids was null or undefined when calling getMembersByIds.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (ids) { + ids.forEach((element) => { + queryParameters = queryParameters.append('ids[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/getMembersByIds`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns members for a user. + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMembersByUser(user: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getMembersByUser(user: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getMembersByUser(user: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getMembersByUser(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getMembersByUser.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/getMembersByUser`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns count of all VO members. + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMembersCount(vo: number, observe?: 'body', reportProgress?: boolean): Observable; + public getMembersCount(vo: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getMembersCount(vo: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getMembersCount(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getMembersCount.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/membersManager/getMembersCount`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get page of members from the given vo, with the given attributes. + * @param inputGetPaginatedMembers + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMembersPage(inputGetPaginatedMembers: InputGetPaginatedMembers, observe?: 'body', reportProgress?: boolean): Observable; + public getMembersPage(inputGetPaginatedMembers: InputGetPaginatedMembers, observe?: 'response', reportProgress?: boolean): Observable>; + public getMembersPage(inputGetPaginatedMembers: InputGetPaginatedMembers, observe?: 'events', reportProgress?: boolean): Observable>; + public getMembersPage(inputGetPaginatedMembers: InputGetPaginatedMembers, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputGetPaginatedMembers === null || inputGetPaginatedMembers === undefined) { + throw new Error('Required parameter inputGetPaginatedMembers was null or undefined when calling getMembersPage.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/membersManager/getMembersPage`, + inputGetPaginatedMembers, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns count of VO members with specified status. + * @param vo id of Vo + * @param status status (VALID | INVALID | EXPIRED | DISABLED) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMembersWithStatusCount(vo: number, status: string, observe?: 'body', reportProgress?: boolean): Observable; + public getMembersWithStatusCount(vo: number, status: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getMembersWithStatusCount(vo: number, status: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getMembersWithStatusCount(vo: number, status: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getMembersWithStatusCount.'); + } + if (status === null || status === undefined) { + throw new Error('Required parameter status was null or undefined when calling getMembersWithStatusCount.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (status !== undefined && status !== null) { + queryParameters = queryParameters.set('status', status); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/membersManager/getMembersCount/status`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns RichMember by member id. + * Get RichMember without attributes + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRichMember(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public getRichMember(id: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getRichMember(id: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getRichMember(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getRichMember.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/membersManager/getRichMember`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns Member by its id. + * Get richMember with member/user attributes + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRichMemberWithAttributes(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public getRichMemberWithAttributes(id: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getRichMemberWithAttributes(id: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getRichMemberWithAttributes(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getRichMemberWithAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/membersManager/getRichMemberWithAttributes`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns rich members by their IDs with specific attributes. When the list of attribute names is null or empty then rich members will be returned without attributes. + * @param ids list of ids List<Integer> + * @param attrNames list of attribute names List<String> or null + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRichMembersByIds(ids: Array, attrNames?: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getRichMembersByIds(ids: Array, attrNames?: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getRichMembersByIds(ids: Array, attrNames?: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getRichMembersByIds(ids: Array, attrNames?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (ids === null || ids === undefined) { + throw new Error('Required parameter ids was null or undefined when calling getRichMembersByIds.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (ids) { + ids.forEach((element) => { + queryParameters = queryParameters.append('ids[]', element); + }) + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/getRichMembersByIds`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Gets members from VO who are sponsored. + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getSponsoredMembers(vo: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getSponsoredMembers(vo: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getSponsoredMembers(vo: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getSponsoredMembers(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getSponsoredMembers.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/getSponsoredMembers/v`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Gets list of members with sponsors. + * @param vo id of Vo + * @param attrNames list of attribute names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getSponsoredMembersAndTheirSponsors(vo: number, attrNames: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getSponsoredMembersAndTheirSponsors(vo: number, attrNames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getSponsoredMembersAndTheirSponsors(vo: number, attrNames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getSponsoredMembersAndTheirSponsors(vo: number, attrNames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getSponsoredMembersAndTheirSponsors.'); + } + if (attrNames === null || attrNames === undefined) { + throw new Error('Required parameter attrNames was null or undefined when calling getSponsoredMembersAndTheirSponsors.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/getSponsoredMembersAndTheirSponsors`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Gets sponsors for given member with optional attribute names. + * @param member id of Member + * @param attrNames list of attribute names List<String> or null + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getSponsorsByMember(member: number, attrNames?: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getSponsorsByMember(member: number, attrNames?: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getSponsorsByMember(member: number, attrNames?: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getSponsorsByMember(member: number, attrNames?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getSponsorsByMember.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/getSponsors/member`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Gets sponsors for given VO, extSourceName and extLogin with optional attribute names. + * @param vo id of Vo + * @param extSourceName external source name, e.g. IdP entityId + * @param extLogin external login of user, e.g. john + * @param attrNames list of attribute names List<String> or null + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getSponsorsByVo(vo: number, extSourceName: string, extLogin: string, attrNames?: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getSponsorsByVo(vo: number, extSourceName: string, extLogin: string, attrNames?: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getSponsorsByVo(vo: number, extSourceName: string, extLogin: string, attrNames?: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getSponsorsByVo(vo: number, extSourceName: string, extLogin: string, attrNames?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getSponsorsByVo.'); + } + if (extSourceName === null || extSourceName === undefined) { + throw new Error('Required parameter extSourceName was null or undefined when calling getSponsorsByVo.'); + } + if (extLogin === null || extLogin === undefined) { + throw new Error('Required parameter extLogin was null or undefined when calling getSponsorsByVo.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (extSourceName !== undefined && extSourceName !== null) { + queryParameters = queryParameters.set('extSourceName', extSourceName); + } + if (extLogin !== undefined && extLogin !== null) { + queryParameters = queryParameters.set('extLogin', extLogin); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/getSponsors/vo`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Moves membership in VO from source user to target user - moves the source user\'s memberships in non-synchronized groups, member related attributes, bans and sponsorships in the VO. Removes the source user\'s member object. + * @param vo id of Vo + * @param sourceUser id of source user + * @param targetUser id of target user + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public moveMembership(vo: number, sourceUser: number, targetUser: number, observe?: 'body', reportProgress?: boolean): Observable; + public moveMembership(vo: number, sourceUser: number, targetUser: number, observe?: 'response', reportProgress?: boolean): Observable>; + public moveMembership(vo: number, sourceUser: number, targetUser: number, observe?: 'events', reportProgress?: boolean): Observable>; + public moveMembership(vo: number, sourceUser: number, targetUser: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling moveMembership.'); + } + if (sourceUser === null || sourceUser === undefined) { + throw new Error('Required parameter sourceUser was null or undefined when calling moveMembership.'); + } + if (targetUser === null || targetUser === undefined) { + throw new Error('Required parameter targetUser was null or undefined when calling moveMembership.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (sourceUser !== undefined && sourceUser !== null) { + queryParameters = queryParameters.set('sourceUser', sourceUser); + } + if (targetUser !== undefined && targetUser !== null) { + queryParameters = queryParameters.set('targetUser', targetUser); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/membersManager/moveMembership`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Removes sponsor of existing member. + * @param member id of Member + * @param sponsor id of sponsor + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeSponsor(member: number, sponsor: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeSponsor(member: number, sponsor: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeSponsor(member: number, sponsor: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeSponsor(member: number, sponsor: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling removeSponsor.'); + } + if (sponsor === null || sponsor === undefined) { + throw new Error('Required parameter sponsor was null or undefined when calling removeSponsor.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (sponsor !== undefined && sponsor !== null) { + queryParameters = queryParameters.set('sponsor', sponsor); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/membersManager/removeSponsor`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Send mail to user\'s preferred email address with link for non-authz account activation. Correct authz information is stored in link\'s URL. + * @param member id of Member + * @param namespace namespace + * @param emailAttributeURN urn of the attribute with stored mail + * @param language language of the message + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public sendAccountActivationLinkEmail(member: number, namespace: string, emailAttributeURN: string, language: string, observe?: 'body', reportProgress?: boolean): Observable; + public sendAccountActivationLinkEmail(member: number, namespace: string, emailAttributeURN: string, language: string, observe?: 'response', reportProgress?: boolean): Observable>; + public sendAccountActivationLinkEmail(member: number, namespace: string, emailAttributeURN: string, language: string, observe?: 'events', reportProgress?: boolean): Observable>; + public sendAccountActivationLinkEmail(member: number, namespace: string, emailAttributeURN: string, language: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling sendAccountActivationLinkEmail.'); + } + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling sendAccountActivationLinkEmail.'); + } + if (emailAttributeURN === null || emailAttributeURN === undefined) { + throw new Error('Required parameter emailAttributeURN was null or undefined when calling sendAccountActivationLinkEmail.'); + } + if (language === null || language === undefined) { + throw new Error('Required parameter language was null or undefined when calling sendAccountActivationLinkEmail.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (namespace !== undefined && namespace !== null) { + queryParameters = queryParameters.set('namespace', namespace); + } + if (emailAttributeURN !== undefined && emailAttributeURN !== null) { + queryParameters = queryParameters.set('emailAttributeURN', emailAttributeURN); + } + if (language !== undefined && language !== null) { + queryParameters = queryParameters.set('language', language); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/membersManager/sendAccountActivationLinkEmail`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Send mail to user\'s preferred email address with link for non-authz password reset. Correct authz information is stored in link\'s URL. + * @param member id of Member + * @param namespace namespace + * @param emailAttributeURN urn of the attribute with stored mail + * @param language language of the message + * @param baseUrl base url of Perun instance (optional) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public sendPasswordResetLinkEmail(member: number, namespace: string, emailAttributeURN: string, language: string, baseUrl?: string, observe?: 'body', reportProgress?: boolean): Observable; + public sendPasswordResetLinkEmail(member: number, namespace: string, emailAttributeURN: string, language: string, baseUrl?: string, observe?: 'response', reportProgress?: boolean): Observable>; + public sendPasswordResetLinkEmail(member: number, namespace: string, emailAttributeURN: string, language: string, baseUrl?: string, observe?: 'events', reportProgress?: boolean): Observable>; + public sendPasswordResetLinkEmail(member: number, namespace: string, emailAttributeURN: string, language: string, baseUrl?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling sendPasswordResetLinkEmail.'); + } + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling sendPasswordResetLinkEmail.'); + } + if (emailAttributeURN === null || emailAttributeURN === undefined) { + throw new Error('Required parameter emailAttributeURN was null or undefined when calling sendPasswordResetLinkEmail.'); + } + if (language === null || language === undefined) { + throw new Error('Required parameter language was null or undefined when calling sendPasswordResetLinkEmail.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (namespace !== undefined && namespace !== null) { + queryParameters = queryParameters.set('namespace', namespace); + } + if (emailAttributeURN !== undefined && emailAttributeURN !== null) { + queryParameters = queryParameters.set('emailAttributeURN', emailAttributeURN); + } + if (language !== undefined && language !== null) { + queryParameters = queryParameters.set('language', language); + } + if (baseUrl !== undefined && baseUrl !== null) { + queryParameters = queryParameters.set('baseUrl', baseUrl); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/membersManager/sendPasswordResetLinkEmail`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Creates a sponsored membership for the given user. + * @param inputSetSponsoredMember + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setSponsoredMember(inputSetSponsoredMember: InputSetSponsoredMember, observe?: 'body', reportProgress?: boolean): Observable; + public setSponsoredMember(inputSetSponsoredMember: InputSetSponsoredMember, observe?: 'response', reportProgress?: boolean): Observable>; + public setSponsoredMember(inputSetSponsoredMember: InputSetSponsoredMember, observe?: 'events', reportProgress?: boolean): Observable>; + public setSponsoredMember(inputSetSponsoredMember: InputSetSponsoredMember, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetSponsoredMember === null || inputSetSponsoredMember === undefined) { + throw new Error('Required parameter inputSetSponsoredMember was null or undefined when calling setSponsoredMember.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/membersManager/setSponsoredMember`, + inputSetSponsoredMember, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Transform non-sponsored member to sponsored one, with defined sponsor and optional sponsorship validity expiration + * @param sponsoredMember id of member to be sponsored + * @param sponsor id of sponsor + * @param validityTo date in format yyyy-mm-dd + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setSponsorshipForMember(sponsoredMember: number, sponsor: number, validityTo?: string, observe?: 'body', reportProgress?: boolean): Observable; + public setSponsorshipForMember(sponsoredMember: number, sponsor: number, validityTo?: string, observe?: 'response', reportProgress?: boolean): Observable>; + public setSponsorshipForMember(sponsoredMember: number, sponsor: number, validityTo?: string, observe?: 'events', reportProgress?: boolean): Observable>; + public setSponsorshipForMember(sponsoredMember: number, sponsor: number, validityTo?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (sponsoredMember === null || sponsoredMember === undefined) { + throw new Error('Required parameter sponsoredMember was null or undefined when calling setSponsorshipForMember.'); + } + if (sponsor === null || sponsor === undefined) { + throw new Error('Required parameter sponsor was null or undefined when calling setSponsorshipForMember.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (sponsoredMember !== undefined && sponsoredMember !== null) { + queryParameters = queryParameters.set('sponsoredMember', sponsoredMember); + } + if (sponsor !== undefined && sponsor !== null) { + queryParameters = queryParameters.set('sponsor', sponsor); + } + if (validityTo !== undefined && validityTo !== null) { + queryParameters = queryParameters.set('validityTo', validityTo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/membersManager/setSponsorshipForMember`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Set membership status of a member. + * @param member id of Member + * @param status status (VALID | INVALID | EXPIRED | DISABLED) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setStatus(member: number, status: string, observe?: 'body', reportProgress?: boolean): Observable; + public setStatus(member: number, status: string, observe?: 'response', reportProgress?: boolean): Observable>; + public setStatus(member: number, status: string, observe?: 'events', reportProgress?: boolean): Observable>; + public setStatus(member: number, status: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling setStatus.'); + } + if (status === null || status === undefined) { + throw new Error('Required parameter status was null or undefined when calling setStatus.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (status !== undefined && status !== null) { + queryParameters = queryParameters.set('status', status); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/membersManager/setStatus`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * For an existing member, assigns a new sponsor + * @param member id of Member + * @param sponsor id of sponsor + * @param validityTo date in format yyyy-mm-dd + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public sponsorMember(member: number, sponsor: number, validityTo?: string, observe?: 'body', reportProgress?: boolean): Observable; + public sponsorMember(member: number, sponsor: number, validityTo?: string, observe?: 'response', reportProgress?: boolean): Observable>; + public sponsorMember(member: number, sponsor: number, validityTo?: string, observe?: 'events', reportProgress?: boolean): Observable>; + public sponsorMember(member: number, sponsor: number, validityTo?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling sponsorMember.'); + } + if (sponsor === null || sponsor === undefined) { + throw new Error('Required parameter sponsor was null or undefined when calling sponsorMember.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (sponsor !== undefined && sponsor !== null) { + queryParameters = queryParameters.set('sponsor', sponsor); + } + if (validityTo !== undefined && validityTo !== null) { + queryParameters = queryParameters.set('validityTo', validityTo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/membersManager/sponsorMember`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Updates sponsorship validity. To change it to FOREVER, don\'t pass the validityTo param, or pass it as null. + * @param member id of Member + * @param sponsor id of sponsor + * @param validityTo date in format yyyy-mm-dd + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateSponsorshipValidity(member: number, sponsor: number, validityTo?: string, observe?: 'body', reportProgress?: boolean): Observable; + public updateSponsorshipValidity(member: number, sponsor: number, validityTo?: string, observe?: 'response', reportProgress?: boolean): Observable>; + public updateSponsorshipValidity(member: number, sponsor: number, validityTo?: string, observe?: 'events', reportProgress?: boolean): Observable>; + public updateSponsorshipValidity(member: number, sponsor: number, validityTo?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling updateSponsorshipValidity.'); + } + if (sponsor === null || sponsor === undefined) { + throw new Error('Required parameter sponsor was null or undefined when calling updateSponsorshipValidity.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (sponsor !== undefined && sponsor !== null) { + queryParameters = queryParameters.set('sponsor', sponsor); + } + if (validityTo !== undefined && validityTo !== null) { + queryParameters = queryParameters.set('validityTo', validityTo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/membersManager/updateSponsorshipValidity`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Validate all attributes for member and set member\'s status to VALID. This method runs asynchronously. It immediately return member with original status and after asynchronous validation successfully finishes it switch member\'s status to VALID. If validation ends with error, member keeps his status. + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public validateMemberAsync(member: number, observe?: 'body', reportProgress?: boolean): Observable; + public validateMemberAsync(member: number, observe?: 'response', reportProgress?: boolean): Observable>; + public validateMemberAsync(member: number, observe?: 'events', reportProgress?: boolean): Observable>; + public validateMemberAsync(member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling validateMemberAsync.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/membersManager/validateMemberAsync`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/membersManager/validateMemberAsync`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } } diff --git a/libs/perun/openapi/src/lib/api/ownersManager.service.ts b/libs/perun/openapi/src/lib/api/ownersManager.service.ts index 192d5f16f..0fdfdf138 100644 --- a/libs/perun/openapi/src/lib/api/ownersManager.service.ts +++ b/libs/perun/openapi/src/lib/api/ownersManager.service.ts @@ -11,424 +11,333 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { InputCreateOwner } from '../model/inputCreateOwner'; import { Owner } from '../model/owner'; import { PerunException } from '../model/perunException'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class OwnersManagerService { - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration - ) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - /** - * Creates a new owner. - * @param inputCreateOwner - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createOwner( - inputCreateOwner: InputCreateOwner, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public createOwner( - inputCreateOwner: InputCreateOwner, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public createOwner( - inputCreateOwner: InputCreateOwner, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public createOwner( - inputCreateOwner: InputCreateOwner, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputCreateOwner === null || inputCreateOwner === undefined) { - throw new Error( - 'Required parameter inputCreateOwner was null or undefined when calling createOwner.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/ownersManager/createOwner`, - inputCreateOwner, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Deletes Owner specified by id. Returns null. - * @param owner id of Owner - * @param force If true, delete entity forcefully. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteOwner( - owner: number, - force?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public deleteOwner( - owner: number, - force?: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deleteOwner( - owner: number, - force?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deleteOwner( - owner: number, - force?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (owner === null || owner === undefined) { - throw new Error('Required parameter owner was null or undefined when calling deleteOwner.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (owner !== undefined && owner !== null) { - queryParameters = queryParameters.set('owner', owner); - } - if (force !== undefined && force !== null) { - queryParameters = queryParameters.set('force', force); - } - - let headers = this.defaultHeaders; - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); } - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/ownersManager/deleteOwner`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns all owners. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllOwners(observe?: 'body', reportProgress?: boolean): Observable>; - public getAllOwners( - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllOwners( - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAllOwners(observe: any = 'body', reportProgress: boolean = false): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/ownersManager/getOwners`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns Owner by its id. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getOwnerById(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public getOwnerById( - id: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getOwnerById( - id: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getOwnerById( - id: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getOwnerById.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); + /** + * Creates a new owner. + * @param inputCreateOwner + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createOwner(inputCreateOwner: InputCreateOwner, observe?: 'body', reportProgress?: boolean): Observable; + public createOwner(inputCreateOwner: InputCreateOwner, observe?: 'response', reportProgress?: boolean): Observable>; + public createOwner(inputCreateOwner: InputCreateOwner, observe?: 'events', reportProgress?: boolean): Observable>; + public createOwner(inputCreateOwner: InputCreateOwner, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputCreateOwner === null || inputCreateOwner === undefined) { + throw new Error('Required parameter inputCreateOwner was null or undefined when calling createOwner.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/ownersManager/createOwner`, + inputCreateOwner, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } - return this.httpClient.get( - `${this.configuration.basePath}/json/ownersManager/getOwnerById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns Owner by its name. - * @param owner name of Owner - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getOwnerByName( - owner: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getOwnerByName( - owner: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getOwnerByName( - owner: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getOwnerByName( - owner: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (owner === null || owner === undefined) { - throw new Error( - 'Required parameter owner was null or undefined when calling getOwnerByName.' - ); + /** + * Deletes Owner specified by id. Returns null. + * @param owner id of Owner + * @param force If true, delete entity forcefully. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteOwner(owner: number, force?: boolean, observe?: 'body', reportProgress?: boolean): Observable; + public deleteOwner(owner: number, force?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; + public deleteOwner(owner: number, force?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; + public deleteOwner(owner: number, force?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (owner === null || owner === undefined) { + throw new Error('Required parameter owner was null or undefined when calling deleteOwner.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (owner !== undefined && owner !== null) { + queryParameters = queryParameters.set('owner', owner); + } + if (force !== undefined && force !== null) { + queryParameters = queryParameters.set('force', force); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/ownersManager/deleteOwner`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (owner !== undefined && owner !== null) { - queryParameters = queryParameters.set('owner', owner); + /** + * Returns all owners. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllOwners(observe?: 'body', reportProgress?: boolean): Observable>; + public getAllOwners(observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllOwners(observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllOwners(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/ownersManager/getOwners`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + /** + * Returns Owner by its id. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getOwnerById(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public getOwnerById(id: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getOwnerById(id: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getOwnerById(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getOwnerById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/ownersManager/getOwnerById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); + /** + * Returns Owner by its name. + * @param owner name of Owner + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getOwnerByName(owner: string, observe?: 'body', reportProgress?: boolean): Observable; + public getOwnerByName(owner: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getOwnerByName(owner: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getOwnerByName(owner: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (owner === null || owner === undefined) { + throw new Error('Required parameter owner was null or undefined when calling getOwnerByName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (owner !== undefined && owner !== null) { + queryParameters = queryParameters.set('owner', owner); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/ownersManager/getOwnerByName`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } - return this.httpClient.get( - `${this.configuration.basePath}/json/ownersManager/getOwnerByName`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } } diff --git a/libs/perun/openapi/src/lib/api/rTMessagesManager.service.ts b/libs/perun/openapi/src/lib/api/rTMessagesManager.service.ts index 404c66904..251774a51 100644 --- a/libs/perun/openapi/src/lib/api/rTMessagesManager.service.ts +++ b/libs/perun/openapi/src/lib/api/rTMessagesManager.service.ts @@ -11,497 +11,349 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { PerunException } from '../model/perunException'; import { RTMessage } from '../model/rTMessage'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class RTMessagesManagerService { - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration - ) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - /** - * Sends a message to RT. Member id is sent. - * @param memberId Member whose e-mail address will be user - * @param queue RT queue - * @param subject Message subject - * @param text Message text - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public sentMessageToRTWithMemberQueue( - memberId: number, - queue: string, - subject: string, - text: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public sentMessageToRTWithMemberQueue( - memberId: number, - queue: string, - subject: string, - text: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public sentMessageToRTWithMemberQueue( - memberId: number, - queue: string, - subject: string, - text: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public sentMessageToRTWithMemberQueue( - memberId: number, - queue: string, - subject: string, - text: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (memberId === null || memberId === undefined) { - throw new Error( - 'Required parameter memberId was null or undefined when calling sentMessageToRTWithMemberQueue.' - ); - } - if (queue === null || queue === undefined) { - throw new Error( - 'Required parameter queue was null or undefined when calling sentMessageToRTWithMemberQueue.' - ); - } - if (subject === null || subject === undefined) { - throw new Error( - 'Required parameter subject was null or undefined when calling sentMessageToRTWithMemberQueue.' - ); - } - if (text === null || text === undefined) { - throw new Error( - 'Required parameter text was null or undefined when calling sentMessageToRTWithMemberQueue.' - ); - } - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (memberId !== undefined && memberId !== null) { - queryParameters = queryParameters.set('memberId', memberId); - } - if (queue !== undefined && queue !== null) { - queryParameters = queryParameters.set('queue', queue); - } - if (subject !== undefined && subject !== null) { - queryParameters = queryParameters.set('subject', subject); - } - if (text !== undefined && text !== null) { - queryParameters = queryParameters.set('text', text); + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); } - let headers = this.defaultHeaders; - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } + /** + * Sends a message to RT. Member id is sent. + * @param memberId Member whose e-mail address will be user + * @param queue RT queue + * @param subject Message subject + * @param text Message text + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public sentMessageToRTWithMemberQueue(memberId: number, queue: string, subject: string, text: string, observe?: 'body', reportProgress?: boolean): Observable; + public sentMessageToRTWithMemberQueue(memberId: number, queue: string, subject: string, text: string, observe?: 'response', reportProgress?: boolean): Observable>; + public sentMessageToRTWithMemberQueue(memberId: number, queue: string, subject: string, text: string, observe?: 'events', reportProgress?: boolean): Observable>; + public sentMessageToRTWithMemberQueue(memberId: number, queue: string, subject: string, text: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (memberId === null || memberId === undefined) { + throw new Error('Required parameter memberId was null or undefined when calling sentMessageToRTWithMemberQueue.'); + } + if (queue === null || queue === undefined) { + throw new Error('Required parameter queue was null or undefined when calling sentMessageToRTWithMemberQueue.'); + } + if (subject === null || subject === undefined) { + throw new Error('Required parameter subject was null or undefined when calling sentMessageToRTWithMemberQueue.'); + } + if (text === null || text === undefined) { + throw new Error('Required parameter text was null or undefined when calling sentMessageToRTWithMemberQueue.'); + } - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/rtMessagesManager/sentMessageToRT/m-q`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Sends a message to RT. Only text information is sent. - * @param queue RT queue - * @param subject Message subject - * @param text Message text - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public sentMessageToRTWithQueue( - queue: string, - subject: string, - text: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public sentMessageToRTWithQueue( - queue: string, - subject: string, - text: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public sentMessageToRTWithQueue( - queue: string, - subject: string, - text: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public sentMessageToRTWithQueue( - queue: string, - subject: string, - text: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (queue === null || queue === undefined) { - throw new Error( - 'Required parameter queue was null or undefined when calling sentMessageToRTWithQueue.' - ); - } - if (subject === null || subject === undefined) { - throw new Error( - 'Required parameter subject was null or undefined when calling sentMessageToRTWithQueue.' - ); - } - if (text === null || text === undefined) { - throw new Error( - 'Required parameter text was null or undefined when calling sentMessageToRTWithQueue.' - ); - } + let queryParameters = new HttpParams({encoder: this.encoder}); + if (memberId !== undefined && memberId !== null) { + queryParameters = queryParameters.set('memberId', memberId); + } + if (queue !== undefined && queue !== null) { + queryParameters = queryParameters.set('queue', queue); + } + if (subject !== undefined && subject !== null) { + queryParameters = queryParameters.set('subject', subject); + } + if (text !== undefined && text !== null) { + queryParameters = queryParameters.set('text', text); + } - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (queue !== undefined && queue !== null) { - queryParameters = queryParameters.set('queue', queue); - } - if (subject !== undefined && subject !== null) { - queryParameters = queryParameters.set('subject', subject); - } - if (text !== undefined && text !== null) { - queryParameters = queryParameters.set('text', text); - } + let headers = this.defaultHeaders; - let headers = this.defaultHeaders; + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/rtMessagesManager/sentMessageToRT/q`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Sends a message to RT. VO id is sent. Queue is not sent. - * @param voId VO id - * @param subject Message subject - * @param text Message text - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public sentMessageToRTWithVo( - voId: number, - subject: string, - text: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public sentMessageToRTWithVo( - voId: number, - subject: string, - text: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public sentMessageToRTWithVo( - voId: number, - subject: string, - text: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public sentMessageToRTWithVo( - voId: number, - subject: string, - text: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (voId === null || voId === undefined) { - throw new Error( - 'Required parameter voId was null or undefined when calling sentMessageToRTWithVo.' - ); - } - if (subject === null || subject === undefined) { - throw new Error( - 'Required parameter subject was null or undefined when calling sentMessageToRTWithVo.' - ); - } - if (text === null || text === undefined) { - throw new Error( - 'Required parameter text was null or undefined when calling sentMessageToRTWithVo.' - ); + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/rtMessagesManager/sentMessageToRT/m-q`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (voId !== undefined && voId !== null) { - queryParameters = queryParameters.set('voId', voId); - } - if (subject !== undefined && subject !== null) { - queryParameters = queryParameters.set('subject', subject); - } - if (text !== undefined && text !== null) { - queryParameters = queryParameters.set('text', text); - } + /** + * Sends a message to RT. Only text information is sent. + * @param queue RT queue + * @param subject Message subject + * @param text Message text + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public sentMessageToRTWithQueue(queue: string, subject: string, text: string, observe?: 'body', reportProgress?: boolean): Observable; + public sentMessageToRTWithQueue(queue: string, subject: string, text: string, observe?: 'response', reportProgress?: boolean): Observable>; + public sentMessageToRTWithQueue(queue: string, subject: string, text: string, observe?: 'events', reportProgress?: boolean): Observable>; + public sentMessageToRTWithQueue(queue: string, subject: string, text: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (queue === null || queue === undefined) { + throw new Error('Required parameter queue was null or undefined when calling sentMessageToRTWithQueue.'); + } + if (subject === null || subject === undefined) { + throw new Error('Required parameter subject was null or undefined when calling sentMessageToRTWithQueue.'); + } + if (text === null || text === undefined) { + throw new Error('Required parameter text was null or undefined when calling sentMessageToRTWithQueue.'); + } - let headers = this.defaultHeaders; + let queryParameters = new HttpParams({encoder: this.encoder}); + if (queue !== undefined && queue !== null) { + queryParameters = queryParameters.set('queue', queue); + } + if (subject !== undefined && subject !== null) { + queryParameters = queryParameters.set('subject', subject); + } + if (text !== undefined && text !== null) { + queryParameters = queryParameters.set('text', text); + } - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } + let headers = this.defaultHeaders; - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/rtMessagesManager/sentMessageToRT/v`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Sends a message to RT. VO id is sent. - * @param voId VO id - * @param queue RT queue - * @param subject Message subject - * @param text Message text - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public sentMessageToRTWithVoQueue( - voId: number, - queue: string, - subject: string, - text: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public sentMessageToRTWithVoQueue( - voId: number, - queue: string, - subject: string, - text: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public sentMessageToRTWithVoQueue( - voId: number, - queue: string, - subject: string, - text: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public sentMessageToRTWithVoQueue( - voId: number, - queue: string, - subject: string, - text: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (voId === null || voId === undefined) { - throw new Error( - 'Required parameter voId was null or undefined when calling sentMessageToRTWithVoQueue.' - ); - } - if (queue === null || queue === undefined) { - throw new Error( - 'Required parameter queue was null or undefined when calling sentMessageToRTWithVoQueue.' - ); - } - if (subject === null || subject === undefined) { - throw new Error( - 'Required parameter subject was null or undefined when calling sentMessageToRTWithVoQueue.' - ); - } - if (text === null || text === undefined) { - throw new Error( - 'Required parameter text was null or undefined when calling sentMessageToRTWithVoQueue.' - ); - } + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (voId !== undefined && voId !== null) { - queryParameters = queryParameters.set('voId', voId); - } - if (queue !== undefined && queue !== null) { - queryParameters = queryParameters.set('queue', queue); - } - if (subject !== undefined && subject !== null) { - queryParameters = queryParameters.set('subject', subject); - } - if (text !== undefined && text !== null) { - queryParameters = queryParameters.set('text', text); + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/rtMessagesManager/sentMessageToRT/q`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } - let headers = this.defaultHeaders; + /** + * Sends a message to RT. VO id is sent. Queue is not sent. + * @param voId VO id + * @param subject Message subject + * @param text Message text + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public sentMessageToRTWithVo(voId: number, subject: string, text: string, observe?: 'body', reportProgress?: boolean): Observable; + public sentMessageToRTWithVo(voId: number, subject: string, text: string, observe?: 'response', reportProgress?: boolean): Observable>; + public sentMessageToRTWithVo(voId: number, subject: string, text: string, observe?: 'events', reportProgress?: boolean): Observable>; + public sentMessageToRTWithVo(voId: number, subject: string, text: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (voId === null || voId === undefined) { + throw new Error('Required parameter voId was null or undefined when calling sentMessageToRTWithVo.'); + } + if (subject === null || subject === undefined) { + throw new Error('Required parameter subject was null or undefined when calling sentMessageToRTWithVo.'); + } + if (text === null || text === undefined) { + throw new Error('Required parameter text was null or undefined when calling sentMessageToRTWithVo.'); + } - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } + let queryParameters = new HttpParams({encoder: this.encoder}); + if (voId !== undefined && voId !== null) { + queryParameters = queryParameters.set('voId', voId); + } + if (subject !== undefined && subject !== null) { + queryParameters = queryParameters.set('subject', subject); + } + if (text !== undefined && text !== null) { + queryParameters = queryParameters.set('text', text); + } - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/rtMessagesManager/sentMessageToRT/v`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); + + /** + * Sends a message to RT. VO id is sent. + * @param voId VO id + * @param queue RT queue + * @param subject Message subject + * @param text Message text + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public sentMessageToRTWithVoQueue(voId: number, queue: string, subject: string, text: string, observe?: 'body', reportProgress?: boolean): Observable; + public sentMessageToRTWithVoQueue(voId: number, queue: string, subject: string, text: string, observe?: 'response', reportProgress?: boolean): Observable>; + public sentMessageToRTWithVoQueue(voId: number, queue: string, subject: string, text: string, observe?: 'events', reportProgress?: boolean): Observable>; + public sentMessageToRTWithVoQueue(voId: number, queue: string, subject: string, text: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (voId === null || voId === undefined) { + throw new Error('Required parameter voId was null or undefined when calling sentMessageToRTWithVoQueue.'); + } + if (queue === null || queue === undefined) { + throw new Error('Required parameter queue was null or undefined when calling sentMessageToRTWithVoQueue.'); + } + if (subject === null || subject === undefined) { + throw new Error('Required parameter subject was null or undefined when calling sentMessageToRTWithVoQueue.'); + } + if (text === null || text === undefined) { + throw new Error('Required parameter text was null or undefined when calling sentMessageToRTWithVoQueue.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (voId !== undefined && voId !== null) { + queryParameters = queryParameters.set('voId', voId); + } + if (queue !== undefined && queue !== null) { + queryParameters = queryParameters.set('queue', queue); + } + if (subject !== undefined && subject !== null) { + queryParameters = queryParameters.set('subject', subject); + } + if (text !== undefined && text !== null) { + queryParameters = queryParameters.set('text', text); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/rtMessagesManager/sentMessageToRT/v-q`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/rtMessagesManager/sentMessageToRT/v-q`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } } diff --git a/libs/perun/openapi/src/lib/api/registrarManager.service.ts b/libs/perun/openapi/src/lib/api/registrarManager.service.ts index ec34b3ea7..fc9e780b0 100644 --- a/libs/perun/openapi/src/lib/api/registrarManager.service.ts +++ b/libs/perun/openapi/src/lib/api/registrarManager.service.ts @@ -11,17 +11,11 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { Application } from '../model/application'; import { ApplicationForm } from '../model/applicationForm'; @@ -42,4298 +36,3164 @@ import { InputUpdateApplicationMail } from '../model/inputUpdateApplicationMail' import { InputUpdateForm } from '../model/inputUpdateForm'; import { InputUpdateFormItemsForGroup } from '../model/inputUpdateFormItemsForGroup'; import { InputUpdateFormItemsForVo } from '../model/inputUpdateFormItemsForVo'; -import { PaginatedApplications } from '../model/paginatedApplications'; +import { PaginatedRichApplications } from '../model/paginatedRichApplications'; import { PerunException } from '../model/perunException'; import { UserExtSource } from '../model/userExtSource'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class RegistrarManagerService { - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration - ) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - /** - * Add new mail notification. - * @param inputAddApplicationMailForGroup - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addApplicationMailForGroup( - inputAddApplicationMailForGroup: InputAddApplicationMailForGroup, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public addApplicationMailForGroup( - inputAddApplicationMailForGroup: InputAddApplicationMailForGroup, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public addApplicationMailForGroup( - inputAddApplicationMailForGroup: InputAddApplicationMailForGroup, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public addApplicationMailForGroup( - inputAddApplicationMailForGroup: InputAddApplicationMailForGroup, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputAddApplicationMailForGroup === null || inputAddApplicationMailForGroup === undefined) { - throw new Error( - 'Required parameter inputAddApplicationMailForGroup was null or undefined when calling addApplicationMailForGroup.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/registrarManager/addApplicationMail/g`, - inputAddApplicationMailForGroup, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Add new mail notification. - * @param inputAddApplicationMailForVo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addApplicationMailForVo( - inputAddApplicationMailForVo: InputAddApplicationMailForVo, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public addApplicationMailForVo( - inputAddApplicationMailForVo: InputAddApplicationMailForVo, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public addApplicationMailForVo( - inputAddApplicationMailForVo: InputAddApplicationMailForVo, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public addApplicationMailForVo( - inputAddApplicationMailForVo: InputAddApplicationMailForVo, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputAddApplicationMailForVo === null || inputAddApplicationMailForVo === undefined) { - throw new Error( - 'Required parameter inputAddApplicationMailForVo was null or undefined when calling addApplicationMailForVo.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/registrarManager/addApplicationMail/v`, - inputAddApplicationMailForVo, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Adds groups to a list of groups which can be registered into during vo registration. - * @param groups list of Group ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addGroupsToAutoRegistration( - groups: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public addGroupsToAutoRegistration( - groups: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public addGroupsToAutoRegistration( - groups: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public addGroupsToAutoRegistration( - groups: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (groups === null || groups === undefined) { - throw new Error( - 'Required parameter groups was null or undefined when calling addGroupsToAutoRegistration.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (groups) { - groups.forEach((element) => { - queryParameters = queryParameters.append('groups[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/registrarManager/addGroupsToAutoRegistration`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Manually approves an application. - * Expected to be called as a result of direct VO administrator action in the web UI. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public approveApplication( - id: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public approveApplication( - id: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public approveApplication( - id: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public approveApplication( - id: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling approveApplication.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/registrarManager/approveApplication`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Check for similar users by name and email in session (authz) information - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public checkForSimilarUsersWithAuthInfo( - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public checkForSimilarUsersWithAuthInfo( - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public checkForSimilarUsersWithAuthInfo( - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public checkForSimilarUsersWithAuthInfo( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post>( - `${this.configuration.basePath}/urlinjsonout/registrarManager/checkForSimilarUsers/authInfo`, - null, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Joins current user identity with the one previously provided and referenced by the token. - * @param token token to be used for joining identities - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public consolidateIdentityUsingToken( - token: string, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public consolidateIdentityUsingToken( - token: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public consolidateIdentityUsingToken( - token: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public consolidateIdentityUsingToken( - token: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (token === null || token === undefined) { - throw new Error( - 'Required parameter token was null or undefined when calling consolidateIdentityUsingToken.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (token !== undefined && token !== null) { - queryParameters = queryParameters.set('token', token); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/registrarManager/consolidateIdentityUsingToken`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Copy all form items from selected Group into another. - * @param fromGroup source group - * @param toGroup destination group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyFormFromGroupToGroup( - fromGroup?: number, - toGroup?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public copyFormFromGroupToGroup( - fromGroup?: number, - toGroup?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public copyFormFromGroupToGroup( - fromGroup?: number, - toGroup?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public copyFormFromGroupToGroup( - fromGroup?: number, - toGroup?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (fromGroup !== undefined && fromGroup !== null) { - queryParameters = queryParameters.set('fromGroup', fromGroup); - } - if (toGroup !== undefined && toGroup !== null) { - queryParameters = queryParameters.set('toGroup', toGroup); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/registrarManager/copyForm/groupToGroup`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Copy all form items from selected Group into VO. - * @param fromGroup source group - * @param toVo destination VO - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyFormFromGroupToVo( - fromGroup?: number, - toVo?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public copyFormFromGroupToVo( - fromGroup?: number, - toVo?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public copyFormFromGroupToVo( - fromGroup?: number, - toVo?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public copyFormFromGroupToVo( - fromGroup?: number, - toVo?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (fromGroup !== undefined && fromGroup !== null) { - queryParameters = queryParameters.set('fromGroup', fromGroup); - } - if (toVo !== undefined && toVo !== null) { - queryParameters = queryParameters.set('toVo', toVo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/registrarManager/copyForm/groupToVo`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Copy all form items from selected VO into Group. - * @param fromVo source VO - * @param toGroup destination group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyFormFromVoToGroup( - fromVo?: number, - toGroup?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public copyFormFromVoToGroup( - fromVo?: number, - toGroup?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public copyFormFromVoToGroup( - fromVo?: number, - toGroup?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public copyFormFromVoToGroup( - fromVo?: number, - toGroup?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (fromVo !== undefined && fromVo !== null) { - queryParameters = queryParameters.set('fromVo', fromVo); - } - if (toGroup !== undefined && toGroup !== null) { - queryParameters = queryParameters.set('toGroup', toGroup); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/registrarManager/copyForm/voToGroup`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Copy all form items from selected VO into another. - * @param fromVo source VO - * @param toVo destination VO - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyFormFromVoToVo( - fromVo?: number, - toVo?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public copyFormFromVoToVo( - fromVo?: number, - toVo?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public copyFormFromVoToVo( - fromVo?: number, - toVo?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public copyFormFromVoToVo( - fromVo?: number, - toVo?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (fromVo !== undefined && fromVo !== null) { - queryParameters = queryParameters.set('fromVo', fromVo); - } - if (toVo !== undefined && toVo !== null) { - queryParameters = queryParameters.set('toVo', toVo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/registrarManager/copyForm/voToVo`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Copy all e-mail notifications from selected Group into another. - * @param fromGroup source group - * @param toGroup destination group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyMailsFromGroupToGroup( - fromGroup?: number, - toGroup?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public copyMailsFromGroupToGroup( - fromGroup?: number, - toGroup?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public copyMailsFromGroupToGroup( - fromGroup?: number, - toGroup?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public copyMailsFromGroupToGroup( - fromGroup?: number, - toGroup?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (fromGroup !== undefined && fromGroup !== null) { - queryParameters = queryParameters.set('fromGroup', fromGroup); - } - if (toGroup !== undefined && toGroup !== null) { - queryParameters = queryParameters.set('toGroup', toGroup); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/registrarManager/copyMails/groupToGroup`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Copy all e-mail notifications from selected Group into VO. - * @param fromGroup source group - * @param toVo destination VO - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyMailsFromGroupToVo( - fromGroup?: number, - toVo?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public copyMailsFromGroupToVo( - fromGroup?: number, - toVo?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public copyMailsFromGroupToVo( - fromGroup?: number, - toVo?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public copyMailsFromGroupToVo( - fromGroup?: number, - toVo?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (fromGroup !== undefined && fromGroup !== null) { - queryParameters = queryParameters.set('fromGroup', fromGroup); - } - if (toVo !== undefined && toVo !== null) { - queryParameters = queryParameters.set('toVo', toVo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/registrarManager/copyMails/groupToVo`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Copy all e-mail notifications from selected VO into Group. - * @param fromVo source VO - * @param toGroup destination group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyMailsFromVoToGroup( - fromVo?: number, - toGroup?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public copyMailsFromVoToGroup( - fromVo?: number, - toGroup?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public copyMailsFromVoToGroup( - fromVo?: number, - toGroup?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public copyMailsFromVoToGroup( - fromVo?: number, - toGroup?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (fromVo !== undefined && fromVo !== null) { - queryParameters = queryParameters.set('fromVo', fromVo); - } - if (toGroup !== undefined && toGroup !== null) { - queryParameters = queryParameters.set('toGroup', toGroup); - } - - let headers = this.defaultHeaders; - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/registrarManager/copyMails/voToGroup`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Copy all e-mail notifications from selected VO into another. - * @param fromVo source VO - * @param toVo destination VO - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyMailsFromVoToVo( - fromVo?: number, - toVo?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public copyMailsFromVoToVo( - fromVo?: number, - toVo?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public copyMailsFromVoToVo( - fromVo?: number, - toVo?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public copyMailsFromVoToVo( - fromVo?: number, - toVo?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (fromVo !== undefined && fromVo !== null) { - queryParameters = queryParameters.set('fromVo', fromVo); - } - if (toVo !== undefined && toVo !== null) { - queryParameters = queryParameters.set('toVo', toVo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/registrarManager/copyMails/voToVo`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Create application form for a group. - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createApplicationFormInGroup( - group: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public createApplicationFormInGroup( - group: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public createApplicationFormInGroup( - group: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public createApplicationFormInGroup( - group: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling createApplicationFormInGroup.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/registrarManager/createApplicationForm/group`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Create application form for a VO. - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createApplicationFormInVo( - vo: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public createApplicationFormInVo( - vo: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public createApplicationFormInVo( - vo: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public createApplicationFormInVo( - vo: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling createApplicationFormInVo.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/registrarManager/createApplicationForm/vo`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Deletes an application. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteApplication(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public deleteApplication( - id: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deleteApplication( - id: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deleteApplication( - id: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling deleteApplication.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/registrarManager/deleteApplication`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Deletes an e-mail notification from DB based on id property. - * @param group id of Group - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteApplicationMailForGroup( - group: number, - id: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public deleteApplicationMailForGroup( - group: number, - id: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deleteApplicationMailForGroup( - group: number, - id: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deleteApplicationMailForGroup( - group: number, - id: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling deleteApplicationMailForGroup.' - ); - } - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling deleteApplicationMailForGroup.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/registrarManager/deleteApplicationMail/g`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Deletes an e-mail notification from DB based on id property. - * @param vo id of Vo - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteApplicationMailForVo( - vo: number, - id: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public deleteApplicationMailForVo( - vo: number, - id: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deleteApplicationMailForVo( - vo: number, - id: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deleteApplicationMailForVo( - vo: number, - id: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling deleteApplicationMailForVo.' - ); - } - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling deleteApplicationMailForVo.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/registrarManager/deleteApplicationMail/v`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Deletes groups from a list of groups which can be registered into during vo registration. - * @param groups list of Group ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteGroupsFromAutoRegistration( - groups: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public deleteGroupsFromAutoRegistration( - groups: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deleteGroupsFromAutoRegistration( - groups: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deleteGroupsFromAutoRegistration( - groups: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (groups === null || groups === undefined) { - throw new Error( - 'Required parameter groups was null or undefined when calling deleteGroupsFromAutoRegistration.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (groups) { - groups.forEach((element) => { - queryParameters = queryParameters.append('groups[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/registrarManager/deleteGroupsFromAutoRegistration`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns application object by its id. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getApplicationById( - id: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getApplicationById( - id: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getApplicationById( - id: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getApplicationById( - id: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling getApplicationById.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/registrarManager/getApplicationById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns data submitted by user in given application (by id). - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getApplicationDataById( - id: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getApplicationDataById( - id: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getApplicationDataById( - id: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getApplicationDataById( - id: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling getApplicationDataById.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/registrarManager/getApplicationDataById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns all mail notifications related to specific app form. - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getApplicationMailsForGroup( - group: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getApplicationMailsForGroup( - group: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getApplicationMailsForGroup( - group: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getApplicationMailsForGroup( - group: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getApplicationMailsForGroup.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/registrarManager/getApplicationMails/g`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns all mail notifications related to specific app form. - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getApplicationMailsForVo( - vo: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getApplicationMailsForVo( - vo: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getApplicationMailsForVo( - vo: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getApplicationMailsForVo( - vo: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling getApplicationMailsForVo.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/registrarManager/getApplicationMails/v`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets all applications for a given Group. - * @param group id of Group - * @param state list of states: NEW, VERIFIED, APPROVED, REJECTED - * @param dateFrom return with the same date or applications newer than this date - * @param dateTo return applications with the same date or older than this date - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getApplicationsForGroup( - group: number, - state?: Array, - dateFrom?: string, - dateTo?: string, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getApplicationsForGroup( - group: number, - state?: Array, - dateFrom?: string, - dateTo?: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getApplicationsForGroup( - group: number, - state?: Array, - dateFrom?: string, - dateTo?: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getApplicationsForGroup( - group: number, - state?: Array, - dateFrom?: string, - dateTo?: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getApplicationsForGroup.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (state) { - state.forEach((element) => { - queryParameters = queryParameters.append('state[]', element); - }); - } - if (dateFrom !== undefined && dateFrom !== null) { - queryParameters = queryParameters.set('dateFrom', dateFrom); - } - if (dateTo !== undefined && dateTo !== null) { - queryParameters = queryParameters.set('dateTo', dateTo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/registrarManager/getApplicationsForGroup`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets all aplications for a given Member. - * @param member id of Member - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getApplicationsForMember( - member: number, - group?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getApplicationsForMember( - member: number, - group?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getApplicationsForMember( - member: number, - group?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getApplicationsForMember( - member: number, - group?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getApplicationsForMember.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/registrarManager/getApplicationsForMember`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets all applications for a given VO. - * @param vo id of Vo - * @param state list of states: NEW, VERIFIED, APPROVED, REJECTED - * @param dateFrom return applications with the same date or newer than this date - * @param dateTo return applications with the same date or older than this date - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getApplicationsForVo( - vo: number, - state?: Array, - dateFrom?: string, - dateTo?: string, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getApplicationsForVo( - vo: number, - state?: Array, - dateFrom?: string, - dateTo?: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getApplicationsForVo( - vo: number, - state?: Array, - dateFrom?: string, - dateTo?: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getApplicationsForVo( - vo: number, - state?: Array, - dateFrom?: string, - dateTo?: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling getApplicationsForVo.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (state) { - state.forEach((element) => { - queryParameters = queryParameters.append('state[]', element); - }); - } - if (dateFrom !== undefined && dateFrom !== null) { - queryParameters = queryParameters.set('dateFrom', dateFrom); - } - if (dateTo !== undefined && dateTo !== null) { - queryParameters = queryParameters.set('dateTo', dateTo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/registrarManager/getApplicationsForVo`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get page of applications from the given vo, based on the query attributes. - * @param inputGetPaginatedApplications - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getApplicationsPage( - inputGetPaginatedApplications: InputGetPaginatedApplications, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getApplicationsPage( - inputGetPaginatedApplications: InputGetPaginatedApplications, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getApplicationsPage( - inputGetPaginatedApplications: InputGetPaginatedApplications, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getApplicationsPage( - inputGetPaginatedApplications: InputGetPaginatedApplications, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputGetPaginatedApplications === null || inputGetPaginatedApplications === undefined) { - throw new Error( - 'Required parameter inputGetPaginatedApplications was null or undefined when calling getApplicationsPage.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/registrarManager/getApplicationsPage`, - inputGetPaginatedApplications, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get time-limited token proving user identity in external source (for now 3 minutes). - * It can be used to join user identity with another by calling consolidateIdentityUsingToken() method and passing the token. Please note, that different authz (identity) must be used to perform both calls. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getConsolidatorToken(observe?: 'body', reportProgress?: boolean): Observable; - public getConsolidatorToken( - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getConsolidatorToken( - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getConsolidatorToken( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/registrarManager/getConsolidatorToken`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets all items in Group application form. - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFormItemsForGroup( - group: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getFormItemsForGroup( - group: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getFormItemsForGroup( - group: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getFormItemsForGroup( - group: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getFormItemsForGroup.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/registrarManager/getFormItems/group`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets items of specified type in Group application form, for initital registration or extension of account. - * @param group id of Group - * @param type application type: INITIAL, EXTENSION or EMBEDDED - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFormItemsForGroupWithType( - group: number, - type?: string, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getFormItemsForGroupWithType( - group: number, - type?: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getFormItemsForGroupWithType( - group: number, - type?: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getFormItemsForGroupWithType( - group: number, - type?: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getFormItemsForGroupWithType.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (type !== undefined && type !== null) { - queryParameters = queryParameters.set('type', type); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/registrarManager/getFormItems/group-type`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets all items in VO application form. - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFormItemsForVo( - vo: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getFormItemsForVo( - vo: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getFormItemsForVo( - vo: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getFormItemsForVo( - vo: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling getFormItemsForVo.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/registrarManager/getFormItems/vo`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets items of specified type in VO application form, for initital registration or extension of account. - * @param vo id of Vo - * @param type application type: INITIAL or EXTENSION - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFormItemsForVoWithType( - vo: number, - type?: string, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getFormItemsForVoWithType( - vo: number, - type?: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getFormItemsForVoWithType( - vo: number, - type?: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getFormItemsForVoWithType( - vo: number, - type?: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling getFormItemsForVoWithType.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (type !== undefined && type !== null) { - queryParameters = queryParameters.set('type', type); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/registrarManager/getFormItems/vo-type`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets an application form for a given Group. - * There is exactly one form for membership per Group, one form is used for both initial registration and annual account expansion, just the form items are marked whether the should be present in one, the other, or both types of application. - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupApplicationForm( - group: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getGroupApplicationForm( - group: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getGroupApplicationForm( - group: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getGroupApplicationForm( - group: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getGroupApplicationForm.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/registrarManager/getApplicationForm/group`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns all groups which can be registered into during vo registration. - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupsToAutoRegistration( - vo: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getGroupsToAutoRegistration( - vo: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getGroupsToAutoRegistration( - vo: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getGroupsToAutoRegistration( - vo: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling getGroupsToAutoRegistration.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/registrarManager/getGroupsToAutoRegistration`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets an application form for a given VO. - * There is exactly one form for membership per VO, one form is used for both initial registration and annual account expansion, just the form items are marked whether the should be present in one, the other, or both types of application. - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVoApplicationForm( - vo: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getVoApplicationForm( - vo: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getVoApplicationForm( - vo: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getVoApplicationForm( - vo: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling getVoApplicationForm.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/registrarManager/getApplicationForm/vo`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Manually rejects an application. - * Expected to be called as a result of direct VO administrator action in the web UI. - * @param id numeric id - * @param reason description of reason - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public rejectApplication( - id: number, - reason?: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public rejectApplication( - id: number, - reason?: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public rejectApplication( - id: number, - reason?: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public rejectApplication( - id: number, - reason?: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling rejectApplication.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - if (reason !== undefined && reason !== null) { - queryParameters = queryParameters.set('reason', reason); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/registrarManager/rejectApplication`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Sends invitation email to user which is not member of VO - * @param email email address to send invitation to - * @param language preferred language to use - * @param voId id of VO to send invitation into - * @param name name of person used in invitation email (optional) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public sendInvitation( - email: string, - language: string, - voId?: number, - name?: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public sendInvitation( - email: string, - language: string, - voId?: number, - name?: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public sendInvitation( - email: string, - language: string, - voId?: number, - name?: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public sendInvitation( - email: string, - language: string, - voId?: number, - name?: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (email === null || email === undefined) { - throw new Error( - 'Required parameter email was null or undefined when calling sendInvitation.' - ); - } - if (language === null || language === undefined) { - throw new Error( - 'Required parameter language was null or undefined when calling sendInvitation.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (voId !== undefined && voId !== null) { - queryParameters = queryParameters.set('voId', voId); - } - if (name !== undefined && name !== null) { - queryParameters = queryParameters.set('name', name); - } - if (email !== undefined && email !== null) { - queryParameters = queryParameters.set('email', email); - } - if (language !== undefined && language !== null) { - queryParameters = queryParameters.set('language', language); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/registrarManager/sendInvitation`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Sends invitation email to user which is not member of VO and Group - * Invitation link targets VO application form fist, after submission, Group application form is displayed. - * @param email email address to send invitation to - * @param language preferred language to use - * @param voId id of VO to send invitation into - * @param groupId id of Group to send invitation into - * @param name name of person used in invitation email (optional) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public sendInvitationForGroup( - email: string, - language: string, - voId?: number, - groupId?: number, - name?: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public sendInvitationForGroup( - email: string, - language: string, - voId?: number, - groupId?: number, - name?: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public sendInvitationForGroup( - email: string, - language: string, - voId?: number, - groupId?: number, - name?: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public sendInvitationForGroup( - email: string, - language: string, - voId?: number, - groupId?: number, - name?: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (email === null || email === undefined) { - throw new Error( - 'Required parameter email was null or undefined when calling sendInvitationForGroup.' - ); - } - if (language === null || language === undefined) { - throw new Error( - 'Required parameter language was null or undefined when calling sendInvitationForGroup.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (voId !== undefined && voId !== null) { - queryParameters = queryParameters.set('voId', voId); - } - if (groupId !== undefined && groupId !== null) { - queryParameters = queryParameters.set('groupId', groupId); - } - if (name !== undefined && name !== null) { - queryParameters = queryParameters.set('name', name); - } - if (email !== undefined && email !== null) { - queryParameters = queryParameters.set('email', email); - } - if (language !== undefined && language !== null) { - queryParameters = queryParameters.set('language', language); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/registrarManager/sendInvitation/g`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Sends invitation email to user which is not member of Group - * @param userId id of user to send invitation to - * @param voId id of VO to send invitation into - * @param groupId id of Group to send invitation into - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public sendInvitationGroupToExistingUser( - userId?: number, - voId?: number, - groupId?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public sendInvitationGroupToExistingUser( - userId?: number, - voId?: number, - groupId?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public sendInvitationGroupToExistingUser( - userId?: number, - voId?: number, - groupId?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public sendInvitationGroupToExistingUser( - userId?: number, - voId?: number, - groupId?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (userId !== undefined && userId !== null) { - queryParameters = queryParameters.set('userId', userId); - } - if (voId !== undefined && voId !== null) { - queryParameters = queryParameters.set('voId', voId); - } - if (groupId !== undefined && groupId !== null) { - queryParameters = queryParameters.set('groupId', groupId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/registrarManager/sendInvitation/u-g`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Sends invitation email to user which is not member of VO - * @param userId id of user to send invitation to - * @param voId id of VO to send invitation into - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public sendInvitationToExistingUser( - userId?: number, - voId?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public sendInvitationToExistingUser( - userId?: number, - voId?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public sendInvitationToExistingUser( - userId?: number, - voId?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public sendInvitationToExistingUser( - userId?: number, - voId?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (userId !== undefined && userId !== null) { - queryParameters = queryParameters.set('userId', userId); - } - if (voId !== undefined && voId !== null) { - queryParameters = queryParameters.set('voId', voId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/registrarManager/sendInvitation/u`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Re-send mail notification for existing application. - * Message of specified type is sent only, when application is in expected state related to the notification. Note, that some data related to processing application are not available (e.g. list of exceptions during approval), since this method doesn\'t perform any action with Application itself. Perun admin can send any notification except USER_INVITE type, see #sendInvitation() for this. - * @param inputSendMessage - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public sendMessage( - inputSendMessage: InputSendMessage, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public sendMessage( - inputSendMessage: InputSendMessage, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public sendMessage( - inputSendMessage: InputSendMessage, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public sendMessage( - inputSendMessage: InputSendMessage, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputSendMessage === null || inputSendMessage === undefined) { - throw new Error( - 'Required parameter inputSendMessage was null or undefined when calling sendMessage.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/registrarManager/sendMessage`, - inputSendMessage, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Enable or disable sending for list of mail definitions. - * @param inputSetSendingEnabled - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setSendingEnabled( - inputSetSendingEnabled: InputSetSendingEnabled, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setSendingEnabled( - inputSetSendingEnabled: InputSetSendingEnabled, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setSendingEnabled( - inputSetSendingEnabled: InputSetSendingEnabled, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setSendingEnabled( - inputSetSendingEnabled: InputSetSendingEnabled, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputSetSendingEnabled === null || inputSetSendingEnabled === undefined) { - throw new Error( - 'Required parameter inputSetSendingEnabled was null or undefined when calling setSendingEnabled.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/registrarManager/setSendingEnabled`, - inputSetSendingEnabled, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Creates a new application and if succeeds, trigger validation and approval. The method triggers approval for VOs with auto-approved applications. - * @param inputSubmitApplication - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public submitApplication( - inputSubmitApplication: InputSubmitApplication, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public submitApplication( - inputSubmitApplication: InputSubmitApplication, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public submitApplication( - inputSubmitApplication: InputSubmitApplication, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public submitApplication( - inputSubmitApplication: InputSubmitApplication, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputSubmitApplication === null || inputSubmitApplication === undefined) { - throw new Error( - 'Required parameter inputSubmitApplication was null or undefined when calling submitApplication.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/registrarManager/submitApplication`, - inputSubmitApplication, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Updates an e-mail notification. - * @param inputUpdateApplicationMail - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateApplicationMail( - inputUpdateApplicationMail: InputUpdateApplicationMail, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public updateApplicationMail( - inputUpdateApplicationMail: InputUpdateApplicationMail, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public updateApplicationMail( - inputUpdateApplicationMail: InputUpdateApplicationMail, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public updateApplicationMail( - inputUpdateApplicationMail: InputUpdateApplicationMail, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputUpdateApplicationMail === null || inputUpdateApplicationMail === undefined) { - throw new Error( - 'Required parameter inputUpdateApplicationMail was null or undefined when calling updateApplicationMail.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/registrarManager/updateApplicationMail`, - inputUpdateApplicationMail, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Updates the form attributes, not the form items. - * @param inputUpdateForm - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateForm( - inputUpdateForm: InputUpdateForm, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public updateForm( - inputUpdateForm: InputUpdateForm, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public updateForm( - inputUpdateForm: InputUpdateForm, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public updateForm( - inputUpdateForm: InputUpdateForm, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputUpdateForm === null || inputUpdateForm === undefined) { - throw new Error( - 'Required parameter inputUpdateForm was null or undefined when calling updateForm.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/registrarManager/updateForm`, - inputUpdateForm, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Update application form item data value, which was originally submitted by the User. - * @param inputFormItemData - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateFormItemData( - inputFormItemData: InputFormItemData, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public updateFormItemData( - inputFormItemData: InputFormItemData, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public updateFormItemData( - inputFormItemData: InputFormItemData, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public updateFormItemData( - inputFormItemData: InputFormItemData, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputFormItemData === null || inputFormItemData === undefined) { - throw new Error( - 'Required parameter inputFormItemData was null or undefined when calling updateFormItemData.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/registrarManager/updateFormItemData`, - inputFormItemData, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Update application form items data, which was originally submitted by the User. - * @param inputFormItemData1 - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateFormItemsData( - inputFormItemData1: InputFormItemData1, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public updateFormItemsData( - inputFormItemData1: InputFormItemData1, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public updateFormItemsData( - inputFormItemData1: InputFormItemData1, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public updateFormItemsData( - inputFormItemData1: InputFormItemData1, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputFormItemData1 === null || inputFormItemData1 === undefined) { - throw new Error( - 'Required parameter inputFormItemData1 was null or undefined when calling updateFormItemsData.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/registrarManager/updateFormItemsData`, - inputFormItemData1, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Updates form items sent in list. - * @param inputUpdateFormItemsForGroup - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateFormItemsForGroup( - inputUpdateFormItemsForGroup: InputUpdateFormItemsForGroup, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public updateFormItemsForGroup( - inputUpdateFormItemsForGroup: InputUpdateFormItemsForGroup, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public updateFormItemsForGroup( - inputUpdateFormItemsForGroup: InputUpdateFormItemsForGroup, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public updateFormItemsForGroup( - inputUpdateFormItemsForGroup: InputUpdateFormItemsForGroup, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputUpdateFormItemsForGroup === null || inputUpdateFormItemsForGroup === undefined) { - throw new Error( - 'Required parameter inputUpdateFormItemsForGroup was null or undefined when calling updateFormItemsForGroup.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/registrarManager/updateFormItems/group`, - inputUpdateFormItemsForGroup, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Updates form items sent in list. - * @param inputUpdateFormItemsForVo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateFormItemsForVo( - inputUpdateFormItemsForVo: InputUpdateFormItemsForVo, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public updateFormItemsForVo( - inputUpdateFormItemsForVo: InputUpdateFormItemsForVo, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public updateFormItemsForVo( - inputUpdateFormItemsForVo: InputUpdateFormItemsForVo, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public updateFormItemsForVo( - inputUpdateFormItemsForVo: InputUpdateFormItemsForVo, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputUpdateFormItemsForVo === null || inputUpdateFormItemsForVo === undefined) { - throw new Error( - 'Required parameter inputUpdateFormItemsForVo was null or undefined when calling updateFormItemsForVo.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/registrarManager/updateFormItems/vo`, - inputUpdateFormItemsForVo, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Forcefully marks application as verified (only when application was in NEW state). - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public verifyApplication( - id: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public verifyApplication( - id: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public verifyApplication( - id: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public verifyApplication( - id: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling verifyApplication.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + + + /** + * Add new mail notification. + * @param inputAddApplicationMailForGroup + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addApplicationMailForGroup(inputAddApplicationMailForGroup: InputAddApplicationMailForGroup, observe?: 'body', reportProgress?: boolean): Observable; + public addApplicationMailForGroup(inputAddApplicationMailForGroup: InputAddApplicationMailForGroup, observe?: 'response', reportProgress?: boolean): Observable>; + public addApplicationMailForGroup(inputAddApplicationMailForGroup: InputAddApplicationMailForGroup, observe?: 'events', reportProgress?: boolean): Observable>; + public addApplicationMailForGroup(inputAddApplicationMailForGroup: InputAddApplicationMailForGroup, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputAddApplicationMailForGroup === null || inputAddApplicationMailForGroup === undefined) { + throw new Error('Required parameter inputAddApplicationMailForGroup was null or undefined when calling addApplicationMailForGroup.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/registrarManager/addApplicationMail/g`, + inputAddApplicationMailForGroup, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Add new mail notification. + * @param inputAddApplicationMailForVo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addApplicationMailForVo(inputAddApplicationMailForVo: InputAddApplicationMailForVo, observe?: 'body', reportProgress?: boolean): Observable; + public addApplicationMailForVo(inputAddApplicationMailForVo: InputAddApplicationMailForVo, observe?: 'response', reportProgress?: boolean): Observable>; + public addApplicationMailForVo(inputAddApplicationMailForVo: InputAddApplicationMailForVo, observe?: 'events', reportProgress?: boolean): Observable>; + public addApplicationMailForVo(inputAddApplicationMailForVo: InputAddApplicationMailForVo, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputAddApplicationMailForVo === null || inputAddApplicationMailForVo === undefined) { + throw new Error('Required parameter inputAddApplicationMailForVo was null or undefined when calling addApplicationMailForVo.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/registrarManager/addApplicationMail/v`, + inputAddApplicationMailForVo, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Adds groups to a list of groups which can be registered into during vo registration. + * @param groups list of Group ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addGroupsToAutoRegistration(groups: Array, observe?: 'body', reportProgress?: boolean): Observable; + public addGroupsToAutoRegistration(groups: Array, observe?: 'response', reportProgress?: boolean): Observable>; + public addGroupsToAutoRegistration(groups: Array, observe?: 'events', reportProgress?: boolean): Observable>; + public addGroupsToAutoRegistration(groups: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (groups === null || groups === undefined) { + throw new Error('Required parameter groups was null or undefined when calling addGroupsToAutoRegistration.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (groups) { + groups.forEach((element) => { + queryParameters = queryParameters.append('groups[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/addGroupsToAutoRegistration`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Manually approves an application. + * Expected to be called as a result of direct VO administrator action in the web UI. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public approveApplication(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public approveApplication(id: number, observe?: 'response', reportProgress?: boolean): Observable>; + public approveApplication(id: number, observe?: 'events', reportProgress?: boolean): Observable>; + public approveApplication(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling approveApplication.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/approveApplication`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Check for similar users by name and email in session (authz) information + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public checkForSimilarUsersWithAuthInfo(observe?: 'body', reportProgress?: boolean): Observable>; + public checkForSimilarUsersWithAuthInfo(observe?: 'response', reportProgress?: boolean): Observable>>; + public checkForSimilarUsersWithAuthInfo(observe?: 'events', reportProgress?: boolean): Observable>>; + public checkForSimilarUsersWithAuthInfo(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post>(`${this.configuration.basePath}/urlinjsonout/registrarManager/checkForSimilarUsers/authInfo`, + null, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Joins current user identity with the one previously provided and referenced by the token. + * @param token token to be used for joining identities + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public consolidateIdentityUsingToken(token: string, observe?: 'body', reportProgress?: boolean): Observable>; + public consolidateIdentityUsingToken(token: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public consolidateIdentityUsingToken(token: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public consolidateIdentityUsingToken(token: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (token === null || token === undefined) { + throw new Error('Required parameter token was null or undefined when calling consolidateIdentityUsingToken.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (token !== undefined && token !== null) { + queryParameters = queryParameters.set('token', token); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/registrarManager/consolidateIdentityUsingToken`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Copy all form items from selected Group into another. + * @param fromGroup source group + * @param toGroup destination group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyFormFromGroupToGroup(fromGroup?: number, toGroup?: number, observe?: 'body', reportProgress?: boolean): Observable; + public copyFormFromGroupToGroup(fromGroup?: number, toGroup?: number, observe?: 'response', reportProgress?: boolean): Observable>; + public copyFormFromGroupToGroup(fromGroup?: number, toGroup?: number, observe?: 'events', reportProgress?: boolean): Observable>; + public copyFormFromGroupToGroup(fromGroup?: number, toGroup?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (fromGroup !== undefined && fromGroup !== null) { + queryParameters = queryParameters.set('fromGroup', fromGroup); + } + if (toGroup !== undefined && toGroup !== null) { + queryParameters = queryParameters.set('toGroup', toGroup); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/copyForm/groupToGroup`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Copy all form items from selected Group into VO. + * @param fromGroup source group + * @param toVo destination VO + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyFormFromGroupToVo(fromGroup?: number, toVo?: number, observe?: 'body', reportProgress?: boolean): Observable; + public copyFormFromGroupToVo(fromGroup?: number, toVo?: number, observe?: 'response', reportProgress?: boolean): Observable>; + public copyFormFromGroupToVo(fromGroup?: number, toVo?: number, observe?: 'events', reportProgress?: boolean): Observable>; + public copyFormFromGroupToVo(fromGroup?: number, toVo?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (fromGroup !== undefined && fromGroup !== null) { + queryParameters = queryParameters.set('fromGroup', fromGroup); + } + if (toVo !== undefined && toVo !== null) { + queryParameters = queryParameters.set('toVo', toVo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/copyForm/groupToVo`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Copy all form items from selected VO into Group. + * @param fromVo source VO + * @param toGroup destination group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyFormFromVoToGroup(fromVo?: number, toGroup?: number, observe?: 'body', reportProgress?: boolean): Observable; + public copyFormFromVoToGroup(fromVo?: number, toGroup?: number, observe?: 'response', reportProgress?: boolean): Observable>; + public copyFormFromVoToGroup(fromVo?: number, toGroup?: number, observe?: 'events', reportProgress?: boolean): Observable>; + public copyFormFromVoToGroup(fromVo?: number, toGroup?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (fromVo !== undefined && fromVo !== null) { + queryParameters = queryParameters.set('fromVo', fromVo); + } + if (toGroup !== undefined && toGroup !== null) { + queryParameters = queryParameters.set('toGroup', toGroup); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/copyForm/voToGroup`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Copy all form items from selected VO into another. + * @param fromVo source VO + * @param toVo destination VO + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyFormFromVoToVo(fromVo?: number, toVo?: number, observe?: 'body', reportProgress?: boolean): Observable; + public copyFormFromVoToVo(fromVo?: number, toVo?: number, observe?: 'response', reportProgress?: boolean): Observable>; + public copyFormFromVoToVo(fromVo?: number, toVo?: number, observe?: 'events', reportProgress?: boolean): Observable>; + public copyFormFromVoToVo(fromVo?: number, toVo?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (fromVo !== undefined && fromVo !== null) { + queryParameters = queryParameters.set('fromVo', fromVo); + } + if (toVo !== undefined && toVo !== null) { + queryParameters = queryParameters.set('toVo', toVo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/copyForm/voToVo`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Copy all e-mail notifications from selected Group into another. + * @param fromGroup source group + * @param toGroup destination group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyMailsFromGroupToGroup(fromGroup?: number, toGroup?: number, observe?: 'body', reportProgress?: boolean): Observable; + public copyMailsFromGroupToGroup(fromGroup?: number, toGroup?: number, observe?: 'response', reportProgress?: boolean): Observable>; + public copyMailsFromGroupToGroup(fromGroup?: number, toGroup?: number, observe?: 'events', reportProgress?: boolean): Observable>; + public copyMailsFromGroupToGroup(fromGroup?: number, toGroup?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (fromGroup !== undefined && fromGroup !== null) { + queryParameters = queryParameters.set('fromGroup', fromGroup); + } + if (toGroup !== undefined && toGroup !== null) { + queryParameters = queryParameters.set('toGroup', toGroup); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/copyMails/groupToGroup`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Copy all e-mail notifications from selected Group into VO. + * @param fromGroup source group + * @param toVo destination VO + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyMailsFromGroupToVo(fromGroup?: number, toVo?: number, observe?: 'body', reportProgress?: boolean): Observable; + public copyMailsFromGroupToVo(fromGroup?: number, toVo?: number, observe?: 'response', reportProgress?: boolean): Observable>; + public copyMailsFromGroupToVo(fromGroup?: number, toVo?: number, observe?: 'events', reportProgress?: boolean): Observable>; + public copyMailsFromGroupToVo(fromGroup?: number, toVo?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (fromGroup !== undefined && fromGroup !== null) { + queryParameters = queryParameters.set('fromGroup', fromGroup); + } + if (toVo !== undefined && toVo !== null) { + queryParameters = queryParameters.set('toVo', toVo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/copyMails/groupToVo`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Copy all e-mail notifications from selected VO into Group. + * @param fromVo source VO + * @param toGroup destination group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyMailsFromVoToGroup(fromVo?: number, toGroup?: number, observe?: 'body', reportProgress?: boolean): Observable; + public copyMailsFromVoToGroup(fromVo?: number, toGroup?: number, observe?: 'response', reportProgress?: boolean): Observable>; + public copyMailsFromVoToGroup(fromVo?: number, toGroup?: number, observe?: 'events', reportProgress?: boolean): Observable>; + public copyMailsFromVoToGroup(fromVo?: number, toGroup?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (fromVo !== undefined && fromVo !== null) { + queryParameters = queryParameters.set('fromVo', fromVo); + } + if (toGroup !== undefined && toGroup !== null) { + queryParameters = queryParameters.set('toGroup', toGroup); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/copyMails/voToGroup`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Copy all e-mail notifications from selected VO into another. + * @param fromVo source VO + * @param toVo destination VO + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyMailsFromVoToVo(fromVo?: number, toVo?: number, observe?: 'body', reportProgress?: boolean): Observable; + public copyMailsFromVoToVo(fromVo?: number, toVo?: number, observe?: 'response', reportProgress?: boolean): Observable>; + public copyMailsFromVoToVo(fromVo?: number, toVo?: number, observe?: 'events', reportProgress?: boolean): Observable>; + public copyMailsFromVoToVo(fromVo?: number, toVo?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (fromVo !== undefined && fromVo !== null) { + queryParameters = queryParameters.set('fromVo', fromVo); + } + if (toVo !== undefined && toVo !== null) { + queryParameters = queryParameters.set('toVo', toVo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/copyMails/voToVo`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Create application form for a group. + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createApplicationFormInGroup(group: number, observe?: 'body', reportProgress?: boolean): Observable; + public createApplicationFormInGroup(group: number, observe?: 'response', reportProgress?: boolean): Observable>; + public createApplicationFormInGroup(group: number, observe?: 'events', reportProgress?: boolean): Observable>; + public createApplicationFormInGroup(group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling createApplicationFormInGroup.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/createApplicationForm/group`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Create application form for a VO. + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createApplicationFormInVo(vo: number, observe?: 'body', reportProgress?: boolean): Observable; + public createApplicationFormInVo(vo: number, observe?: 'response', reportProgress?: boolean): Observable>; + public createApplicationFormInVo(vo: number, observe?: 'events', reportProgress?: boolean): Observable>; + public createApplicationFormInVo(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling createApplicationFormInVo.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/createApplicationForm/vo`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Deletes an application. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteApplication(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public deleteApplication(id: number, observe?: 'response', reportProgress?: boolean): Observable>; + public deleteApplication(id: number, observe?: 'events', reportProgress?: boolean): Observable>; + public deleteApplication(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling deleteApplication.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/deleteApplication`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Deletes an e-mail notification from DB based on id property. + * @param group id of Group + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteApplicationMailForGroup(group: number, id: number, observe?: 'body', reportProgress?: boolean): Observable; + public deleteApplicationMailForGroup(group: number, id: number, observe?: 'response', reportProgress?: boolean): Observable>; + public deleteApplicationMailForGroup(group: number, id: number, observe?: 'events', reportProgress?: boolean): Observable>; + public deleteApplicationMailForGroup(group: number, id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling deleteApplicationMailForGroup.'); + } + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling deleteApplicationMailForGroup.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/deleteApplicationMail/g`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Deletes an e-mail notification from DB based on id property. + * @param vo id of Vo + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteApplicationMailForVo(vo: number, id: number, observe?: 'body', reportProgress?: boolean): Observable; + public deleteApplicationMailForVo(vo: number, id: number, observe?: 'response', reportProgress?: boolean): Observable>; + public deleteApplicationMailForVo(vo: number, id: number, observe?: 'events', reportProgress?: boolean): Observable>; + public deleteApplicationMailForVo(vo: number, id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling deleteApplicationMailForVo.'); + } + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling deleteApplicationMailForVo.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/deleteApplicationMail/v`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Deletes groups from a list of groups which can be registered into during vo registration. + * @param groups list of Group ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteGroupsFromAutoRegistration(groups: Array, observe?: 'body', reportProgress?: boolean): Observable; + public deleteGroupsFromAutoRegistration(groups: Array, observe?: 'response', reportProgress?: boolean): Observable>; + public deleteGroupsFromAutoRegistration(groups: Array, observe?: 'events', reportProgress?: boolean): Observable>; + public deleteGroupsFromAutoRegistration(groups: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (groups === null || groups === undefined) { + throw new Error('Required parameter groups was null or undefined when calling deleteGroupsFromAutoRegistration.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (groups) { + groups.forEach((element) => { + queryParameters = queryParameters.append('groups[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/deleteGroupsFromAutoRegistration`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns application object by its id. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getApplicationById(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public getApplicationById(id: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getApplicationById(id: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getApplicationById(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getApplicationById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/registrarManager/getApplicationById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns data submitted by user in given application (by id). + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getApplicationDataById(id: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getApplicationDataById(id: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getApplicationDataById(id: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getApplicationDataById(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getApplicationDataById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/registrarManager/getApplicationDataById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns all mail notifications related to specific app form. + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getApplicationMailsForGroup(group: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getApplicationMailsForGroup(group: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getApplicationMailsForGroup(group: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getApplicationMailsForGroup(group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getApplicationMailsForGroup.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/registrarManager/getApplicationMails/g`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns all mail notifications related to specific app form. + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getApplicationMailsForVo(vo: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getApplicationMailsForVo(vo: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getApplicationMailsForVo(vo: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getApplicationMailsForVo(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getApplicationMailsForVo.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/registrarManager/getApplicationMails/v`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Gets all applications for a given Group. + * @param group id of Group + * @param state list of states: NEW, VERIFIED, APPROVED, REJECTED + * @param dateFrom return with the same date or applications newer than this date + * @param dateTo return applications with the same date or older than this date + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getApplicationsForGroup(group: number, state?: Array, dateFrom?: string, dateTo?: string, observe?: 'body', reportProgress?: boolean): Observable>; + public getApplicationsForGroup(group: number, state?: Array, dateFrom?: string, dateTo?: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public getApplicationsForGroup(group: number, state?: Array, dateFrom?: string, dateTo?: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public getApplicationsForGroup(group: number, state?: Array, dateFrom?: string, dateTo?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getApplicationsForGroup.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (state) { + state.forEach((element) => { + queryParameters = queryParameters.append('state[]', element); + }) + } + if (dateFrom !== undefined && dateFrom !== null) { + queryParameters = queryParameters.set('dateFrom', dateFrom); + } + if (dateTo !== undefined && dateTo !== null) { + queryParameters = queryParameters.set('dateTo', dateTo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/registrarManager/getApplicationsForGroup`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Gets all aplications for a given Member. + * @param member id of Member + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getApplicationsForMember(member: number, group?: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getApplicationsForMember(member: number, group?: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getApplicationsForMember(member: number, group?: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getApplicationsForMember(member: number, group?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getApplicationsForMember.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/registrarManager/getApplicationsForMember`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Gets all applications for a given VO. + * @param vo id of Vo + * @param state list of states: NEW, VERIFIED, APPROVED, REJECTED + * @param dateFrom return applications with the same date or newer than this date + * @param dateTo return applications with the same date or older than this date + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getApplicationsForVo(vo: number, state?: Array, dateFrom?: string, dateTo?: string, observe?: 'body', reportProgress?: boolean): Observable>; + public getApplicationsForVo(vo: number, state?: Array, dateFrom?: string, dateTo?: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public getApplicationsForVo(vo: number, state?: Array, dateFrom?: string, dateTo?: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public getApplicationsForVo(vo: number, state?: Array, dateFrom?: string, dateTo?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getApplicationsForVo.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (state) { + state.forEach((element) => { + queryParameters = queryParameters.append('state[]', element); + }) + } + if (dateFrom !== undefined && dateFrom !== null) { + queryParameters = queryParameters.set('dateFrom', dateFrom); + } + if (dateTo !== undefined && dateTo !== null) { + queryParameters = queryParameters.set('dateTo', dateTo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/registrarManager/getApplicationsForVo`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get page of applications from the given vo, based on the query attributes. + * @param inputGetPaginatedApplications + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getApplicationsPage(inputGetPaginatedApplications: InputGetPaginatedApplications, observe?: 'body', reportProgress?: boolean): Observable; + public getApplicationsPage(inputGetPaginatedApplications: InputGetPaginatedApplications, observe?: 'response', reportProgress?: boolean): Observable>; + public getApplicationsPage(inputGetPaginatedApplications: InputGetPaginatedApplications, observe?: 'events', reportProgress?: boolean): Observable>; + public getApplicationsPage(inputGetPaginatedApplications: InputGetPaginatedApplications, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputGetPaginatedApplications === null || inputGetPaginatedApplications === undefined) { + throw new Error('Required parameter inputGetPaginatedApplications was null or undefined when calling getApplicationsPage.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/registrarManager/getApplicationsPage`, + inputGetPaginatedApplications, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get time-limited token proving user identity in external source (for now 3 minutes). + * It can be used to join user identity with another by calling consolidateIdentityUsingToken() method and passing the token. Please note, that different authz (identity) must be used to perform both calls. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getConsolidatorToken(observe?: 'body', reportProgress?: boolean): Observable; + public getConsolidatorToken(observe?: 'response', reportProgress?: boolean): Observable>; + public getConsolidatorToken(observe?: 'events', reportProgress?: boolean): Observable>; + public getConsolidatorToken(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/registrarManager/getConsolidatorToken`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Gets all items in Group application form. + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFormItemsForGroup(group: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getFormItemsForGroup(group: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getFormItemsForGroup(group: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getFormItemsForGroup(group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getFormItemsForGroup.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/registrarManager/getFormItems/group`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Gets items of specified type in Group application form, for initital registration or extension of account. + * @param group id of Group + * @param type application type: INITIAL, EXTENSION or EMBEDDED + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFormItemsForGroupWithType(group: number, type?: string, observe?: 'body', reportProgress?: boolean): Observable>; + public getFormItemsForGroupWithType(group: number, type?: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public getFormItemsForGroupWithType(group: number, type?: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public getFormItemsForGroupWithType(group: number, type?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getFormItemsForGroupWithType.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (type !== undefined && type !== null) { + queryParameters = queryParameters.set('type', type); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/registrarManager/getFormItems/group-type`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Gets all items in VO application form. + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFormItemsForVo(vo: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getFormItemsForVo(vo: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getFormItemsForVo(vo: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getFormItemsForVo(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getFormItemsForVo.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/registrarManager/getFormItems/vo`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Gets items of specified type in VO application form, for initital registration or extension of account. + * @param vo id of Vo + * @param type application type: INITIAL or EXTENSION + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFormItemsForVoWithType(vo: number, type?: string, observe?: 'body', reportProgress?: boolean): Observable>; + public getFormItemsForVoWithType(vo: number, type?: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public getFormItemsForVoWithType(vo: number, type?: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public getFormItemsForVoWithType(vo: number, type?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getFormItemsForVoWithType.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (type !== undefined && type !== null) { + queryParameters = queryParameters.set('type', type); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/registrarManager/getFormItems/vo-type`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Gets an application form for a given Group. + * There is exactly one form for membership per Group, one form is used for both initial registration and annual account expansion, just the form items are marked whether the should be present in one, the other, or both types of application. + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupApplicationForm(group: number, observe?: 'body', reportProgress?: boolean): Observable; + public getGroupApplicationForm(group: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getGroupApplicationForm(group: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getGroupApplicationForm(group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getGroupApplicationForm.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/registrarManager/getApplicationForm/group`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns all groups which can be registered into during vo registration. + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupsToAutoRegistration(vo: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getGroupsToAutoRegistration(vo: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getGroupsToAutoRegistration(vo: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getGroupsToAutoRegistration(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getGroupsToAutoRegistration.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/registrarManager/getGroupsToAutoRegistration`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Gets an application form for a given VO. + * There is exactly one form for membership per VO, one form is used for both initial registration and annual account expansion, just the form items are marked whether the should be present in one, the other, or both types of application. + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVoApplicationForm(vo: number, observe?: 'body', reportProgress?: boolean): Observable; + public getVoApplicationForm(vo: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getVoApplicationForm(vo: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getVoApplicationForm(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getVoApplicationForm.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/registrarManager/getApplicationForm/vo`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Manually rejects an application. + * Expected to be called as a result of direct VO administrator action in the web UI. + * @param id numeric id + * @param reason description of reason + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public rejectApplication(id: number, reason?: string, observe?: 'body', reportProgress?: boolean): Observable; + public rejectApplication(id: number, reason?: string, observe?: 'response', reportProgress?: boolean): Observable>; + public rejectApplication(id: number, reason?: string, observe?: 'events', reportProgress?: boolean): Observable>; + public rejectApplication(id: number, reason?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling rejectApplication.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + if (reason !== undefined && reason !== null) { + queryParameters = queryParameters.set('reason', reason); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/rejectApplication`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Sends invitation email to user which is not member of VO + * @param email email address to send invitation to + * @param language preferred language to use + * @param voId id of VO to send invitation into + * @param name name of person used in invitation email (optional) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public sendInvitation(email: string, language: string, voId?: number, name?: string, observe?: 'body', reportProgress?: boolean): Observable; + public sendInvitation(email: string, language: string, voId?: number, name?: string, observe?: 'response', reportProgress?: boolean): Observable>; + public sendInvitation(email: string, language: string, voId?: number, name?: string, observe?: 'events', reportProgress?: boolean): Observable>; + public sendInvitation(email: string, language: string, voId?: number, name?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (email === null || email === undefined) { + throw new Error('Required parameter email was null or undefined when calling sendInvitation.'); + } + if (language === null || language === undefined) { + throw new Error('Required parameter language was null or undefined when calling sendInvitation.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (voId !== undefined && voId !== null) { + queryParameters = queryParameters.set('voId', voId); + } + if (name !== undefined && name !== null) { + queryParameters = queryParameters.set('name', name); + } + if (email !== undefined && email !== null) { + queryParameters = queryParameters.set('email', email); + } + if (language !== undefined && language !== null) { + queryParameters = queryParameters.set('language', language); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/sendInvitation`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Sends invitation email to user which is not member of VO and Group + * Invitation link targets VO application form fist, after submission, Group application form is displayed. + * @param email email address to send invitation to + * @param language preferred language to use + * @param voId id of VO to send invitation into + * @param groupId id of Group to send invitation into + * @param name name of person used in invitation email (optional) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public sendInvitationForGroup(email: string, language: string, voId?: number, groupId?: number, name?: string, observe?: 'body', reportProgress?: boolean): Observable; + public sendInvitationForGroup(email: string, language: string, voId?: number, groupId?: number, name?: string, observe?: 'response', reportProgress?: boolean): Observable>; + public sendInvitationForGroup(email: string, language: string, voId?: number, groupId?: number, name?: string, observe?: 'events', reportProgress?: boolean): Observable>; + public sendInvitationForGroup(email: string, language: string, voId?: number, groupId?: number, name?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (email === null || email === undefined) { + throw new Error('Required parameter email was null or undefined when calling sendInvitationForGroup.'); + } + if (language === null || language === undefined) { + throw new Error('Required parameter language was null or undefined when calling sendInvitationForGroup.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (voId !== undefined && voId !== null) { + queryParameters = queryParameters.set('voId', voId); + } + if (groupId !== undefined && groupId !== null) { + queryParameters = queryParameters.set('groupId', groupId); + } + if (name !== undefined && name !== null) { + queryParameters = queryParameters.set('name', name); + } + if (email !== undefined && email !== null) { + queryParameters = queryParameters.set('email', email); + } + if (language !== undefined && language !== null) { + queryParameters = queryParameters.set('language', language); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/sendInvitation/g`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Sends invitation email to user which is not member of Group + * @param userId id of user to send invitation to + * @param voId id of VO to send invitation into + * @param groupId id of Group to send invitation into + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public sendInvitationGroupToExistingUser(userId?: number, voId?: number, groupId?: number, observe?: 'body', reportProgress?: boolean): Observable; + public sendInvitationGroupToExistingUser(userId?: number, voId?: number, groupId?: number, observe?: 'response', reportProgress?: boolean): Observable>; + public sendInvitationGroupToExistingUser(userId?: number, voId?: number, groupId?: number, observe?: 'events', reportProgress?: boolean): Observable>; + public sendInvitationGroupToExistingUser(userId?: number, voId?: number, groupId?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (userId !== undefined && userId !== null) { + queryParameters = queryParameters.set('userId', userId); + } + if (voId !== undefined && voId !== null) { + queryParameters = queryParameters.set('voId', voId); + } + if (groupId !== undefined && groupId !== null) { + queryParameters = queryParameters.set('groupId', groupId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/sendInvitation/u-g`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Sends invitation email to user which is not member of VO + * @param userId id of user to send invitation to + * @param voId id of VO to send invitation into + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public sendInvitationToExistingUser(userId?: number, voId?: number, observe?: 'body', reportProgress?: boolean): Observable; + public sendInvitationToExistingUser(userId?: number, voId?: number, observe?: 'response', reportProgress?: boolean): Observable>; + public sendInvitationToExistingUser(userId?: number, voId?: number, observe?: 'events', reportProgress?: boolean): Observable>; + public sendInvitationToExistingUser(userId?: number, voId?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (userId !== undefined && userId !== null) { + queryParameters = queryParameters.set('userId', userId); + } + if (voId !== undefined && voId !== null) { + queryParameters = queryParameters.set('voId', voId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/sendInvitation/u`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Re-send mail notification for existing application. + * Message of specified type is sent only, when application is in expected state related to the notification. Note, that some data related to processing application are not available (e.g. list of exceptions during approval), since this method doesn\'t perform any action with Application itself. Perun admin can send any notification except USER_INVITE type, see #sendInvitation() for this. + * @param inputSendMessage + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public sendMessage(inputSendMessage: InputSendMessage, observe?: 'body', reportProgress?: boolean): Observable; + public sendMessage(inputSendMessage: InputSendMessage, observe?: 'response', reportProgress?: boolean): Observable>; + public sendMessage(inputSendMessage: InputSendMessage, observe?: 'events', reportProgress?: boolean): Observable>; + public sendMessage(inputSendMessage: InputSendMessage, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSendMessage === null || inputSendMessage === undefined) { + throw new Error('Required parameter inputSendMessage was null or undefined when calling sendMessage.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/registrarManager/sendMessage`, + inputSendMessage, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Enable or disable sending for list of mail definitions. + * @param inputSetSendingEnabled + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setSendingEnabled(inputSetSendingEnabled: InputSetSendingEnabled, observe?: 'body', reportProgress?: boolean): Observable; + public setSendingEnabled(inputSetSendingEnabled: InputSetSendingEnabled, observe?: 'response', reportProgress?: boolean): Observable>; + public setSendingEnabled(inputSetSendingEnabled: InputSetSendingEnabled, observe?: 'events', reportProgress?: boolean): Observable>; + public setSendingEnabled(inputSetSendingEnabled: InputSetSendingEnabled, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetSendingEnabled === null || inputSetSendingEnabled === undefined) { + throw new Error('Required parameter inputSetSendingEnabled was null or undefined when calling setSendingEnabled.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/registrarManager/setSendingEnabled`, + inputSetSendingEnabled, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Creates a new application and if succeeds, trigger validation and approval. The method triggers approval for VOs with auto-approved applications. + * @param inputSubmitApplication + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public submitApplication(inputSubmitApplication: InputSubmitApplication, observe?: 'body', reportProgress?: boolean): Observable; + public submitApplication(inputSubmitApplication: InputSubmitApplication, observe?: 'response', reportProgress?: boolean): Observable>; + public submitApplication(inputSubmitApplication: InputSubmitApplication, observe?: 'events', reportProgress?: boolean): Observable>; + public submitApplication(inputSubmitApplication: InputSubmitApplication, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSubmitApplication === null || inputSubmitApplication === undefined) { + throw new Error('Required parameter inputSubmitApplication was null or undefined when calling submitApplication.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/registrarManager/submitApplication`, + inputSubmitApplication, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Updates an e-mail notification. + * @param inputUpdateApplicationMail + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateApplicationMail(inputUpdateApplicationMail: InputUpdateApplicationMail, observe?: 'body', reportProgress?: boolean): Observable; + public updateApplicationMail(inputUpdateApplicationMail: InputUpdateApplicationMail, observe?: 'response', reportProgress?: boolean): Observable>; + public updateApplicationMail(inputUpdateApplicationMail: InputUpdateApplicationMail, observe?: 'events', reportProgress?: boolean): Observable>; + public updateApplicationMail(inputUpdateApplicationMail: InputUpdateApplicationMail, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputUpdateApplicationMail === null || inputUpdateApplicationMail === undefined) { + throw new Error('Required parameter inputUpdateApplicationMail was null or undefined when calling updateApplicationMail.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/registrarManager/updateApplicationMail`, + inputUpdateApplicationMail, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Updates the form attributes, not the form items. + * @param inputUpdateForm + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateForm(inputUpdateForm: InputUpdateForm, observe?: 'body', reportProgress?: boolean): Observable; + public updateForm(inputUpdateForm: InputUpdateForm, observe?: 'response', reportProgress?: boolean): Observable>; + public updateForm(inputUpdateForm: InputUpdateForm, observe?: 'events', reportProgress?: boolean): Observable>; + public updateForm(inputUpdateForm: InputUpdateForm, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputUpdateForm === null || inputUpdateForm === undefined) { + throw new Error('Required parameter inputUpdateForm was null or undefined when calling updateForm.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/registrarManager/updateForm`, + inputUpdateForm, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Update application form item data value, which was originally submitted by the User. + * @param inputFormItemData + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateFormItemData(inputFormItemData: InputFormItemData, observe?: 'body', reportProgress?: boolean): Observable; + public updateFormItemData(inputFormItemData: InputFormItemData, observe?: 'response', reportProgress?: boolean): Observable>; + public updateFormItemData(inputFormItemData: InputFormItemData, observe?: 'events', reportProgress?: boolean): Observable>; + public updateFormItemData(inputFormItemData: InputFormItemData, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputFormItemData === null || inputFormItemData === undefined) { + throw new Error('Required parameter inputFormItemData was null or undefined when calling updateFormItemData.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/registrarManager/updateFormItemData`, + inputFormItemData, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Update application form items data, which was originally submitted by the User. + * @param inputFormItemData1 + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateFormItemsData(inputFormItemData1: InputFormItemData1, observe?: 'body', reportProgress?: boolean): Observable; + public updateFormItemsData(inputFormItemData1: InputFormItemData1, observe?: 'response', reportProgress?: boolean): Observable>; + public updateFormItemsData(inputFormItemData1: InputFormItemData1, observe?: 'events', reportProgress?: boolean): Observable>; + public updateFormItemsData(inputFormItemData1: InputFormItemData1, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputFormItemData1 === null || inputFormItemData1 === undefined) { + throw new Error('Required parameter inputFormItemData1 was null or undefined when calling updateFormItemsData.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/registrarManager/updateFormItemsData`, + inputFormItemData1, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Updates form items sent in list. + * @param inputUpdateFormItemsForGroup + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateFormItemsForGroup(inputUpdateFormItemsForGroup: InputUpdateFormItemsForGroup, observe?: 'body', reportProgress?: boolean): Observable; + public updateFormItemsForGroup(inputUpdateFormItemsForGroup: InputUpdateFormItemsForGroup, observe?: 'response', reportProgress?: boolean): Observable>; + public updateFormItemsForGroup(inputUpdateFormItemsForGroup: InputUpdateFormItemsForGroup, observe?: 'events', reportProgress?: boolean): Observable>; + public updateFormItemsForGroup(inputUpdateFormItemsForGroup: InputUpdateFormItemsForGroup, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputUpdateFormItemsForGroup === null || inputUpdateFormItemsForGroup === undefined) { + throw new Error('Required parameter inputUpdateFormItemsForGroup was null or undefined when calling updateFormItemsForGroup.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/registrarManager/updateFormItems/group`, + inputUpdateFormItemsForGroup, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Updates form items sent in list. + * @param inputUpdateFormItemsForVo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateFormItemsForVo(inputUpdateFormItemsForVo: InputUpdateFormItemsForVo, observe?: 'body', reportProgress?: boolean): Observable; + public updateFormItemsForVo(inputUpdateFormItemsForVo: InputUpdateFormItemsForVo, observe?: 'response', reportProgress?: boolean): Observable>; + public updateFormItemsForVo(inputUpdateFormItemsForVo: InputUpdateFormItemsForVo, observe?: 'events', reportProgress?: boolean): Observable>; + public updateFormItemsForVo(inputUpdateFormItemsForVo: InputUpdateFormItemsForVo, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputUpdateFormItemsForVo === null || inputUpdateFormItemsForVo === undefined) { + throw new Error('Required parameter inputUpdateFormItemsForVo was null or undefined when calling updateFormItemsForVo.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/registrarManager/updateFormItems/vo`, + inputUpdateFormItemsForVo, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Forcefully marks application as verified (only when application was in NEW state). + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public verifyApplication(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public verifyApplication(id: number, observe?: 'response', reportProgress?: boolean): Observable>; + public verifyApplication(id: number, observe?: 'events', reportProgress?: boolean): Observable>; + public verifyApplication(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling verifyApplication.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/verifyApplication`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/registrarManager/verifyApplication`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } } diff --git a/libs/perun/openapi/src/lib/api/resourcesManager.service.ts b/libs/perun/openapi/src/lib/api/resourcesManager.service.ts index f68858cc5..f5bb955df 100644 --- a/libs/perun/openapi/src/lib/api/resourcesManager.service.ts +++ b/libs/perun/openapi/src/lib/api/resourcesManager.service.ts @@ -11,17 +11,11 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { AssignedGroup } from '../model/assignedGroup'; import { AssignedMember } from '../model/assignedMember'; @@ -51,7492 +45,5422 @@ import { Service } from '../model/service'; import { User } from '../model/user'; import { Vo } from '../model/vo'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class ResourcesManagerService { - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration - ) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - /** - * Try to activate the group-resource status. If the async is set to false, the validation is performed synchronously. The assignment will be either ACTIVE, in case of a sucessfull synchronous call, or it will be PROCESSING in case of an asynchronous call. After the async validation, the state can be either ACTIVE or FAILED. - * @param group id of Group - * @param resource id of Resource - * @param async asynchronous flag, if set to true, some operation will be performed asynchronously - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public activateGroupResourceAssignment( - group: number, - resource: number, - async?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public activateGroupResourceAssignment( - group: number, - resource: number, - async?: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public activateGroupResourceAssignment( - group: number, - resource: number, - async?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public activateGroupResourceAssignment( - group: number, - resource: number, - async?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling activateGroupResourceAssignment.' - ); - } - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling activateGroupResourceAssignment.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (async !== undefined && async !== null) { - queryParameters = queryParameters.set('async', async); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/resourcesManager/activateGroupResourceAssignment`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Adds a group administrator to the Resource. - * @param resource id of Resource - * @param authorizedGroup Group id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addAdminToGroup( - resource: number, - authorizedGroup: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public addAdminToGroup( - resource: number, - authorizedGroup: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public addAdminToGroup( - resource: number, - authorizedGroup: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public addAdminToGroup( - resource: number, - authorizedGroup: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling addAdminToGroup.' - ); - } - if (authorizedGroup === null || authorizedGroup === undefined) { - throw new Error( - 'Required parameter authorizedGroup was null or undefined when calling addAdminToGroup.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (authorizedGroup !== undefined && authorizedGroup !== null) { - queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/resourcesManager/addAdmin/r-g`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Adds a Resource admin. - * @param resource id of Resource - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addAdminToUser( - resource: number, - user: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public addAdminToUser( - resource: number, - user: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public addAdminToUser( - resource: number, - user: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public addAdminToUser( - resource: number, - user: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling addAdminToUser.' - ); - } - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling addAdminToUser.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/resourcesManager/addAdmin/r-u`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Sets ResourceSelfService role to given group for given resource. - * @param resource id of Resource - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addResourceSelfServiceGroup( - resource: number, - group: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public addResourceSelfServiceGroup( - resource: number, - group: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public addResourceSelfServiceGroup( - resource: number, - group: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public addResourceSelfServiceGroup( - resource: number, - group: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling addResourceSelfServiceGroup.' - ); - } - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling addResourceSelfServiceGroup.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/resourcesManager/addResourceSelfServiceGroup`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Sets ResourceSelfService role to given user for given resource. - * @param resource id of Resource - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addResourceSelfServiceUser( - resource: number, - user: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public addResourceSelfServiceUser( - resource: number, - user: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public addResourceSelfServiceUser( - resource: number, - user: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public addResourceSelfServiceUser( - resource: number, - user: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling addResourceSelfServiceUser.' - ); - } - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling addResourceSelfServiceUser.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/resourcesManager/addResourceSelfServiceUser`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Assigns given groups to all of the given resources. If async is set to false, check if attributes for each member from groups are valid and fill members\' attributes with missing values. - * @param groups list of Group ids List<Integer> - * @param resources list of Resource ids List<Integer> - * @param async asynchronous flag, if set to true, some operation will be performed asynchronously - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public allowGroupsToResources( - groups: Array, - resources: Array, - async?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public allowGroupsToResources( - groups: Array, - resources: Array, - async?: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public allowGroupsToResources( - groups: Array, - resources: Array, - async?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public allowGroupsToResources( - groups: Array, - resources: Array, - async?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (groups === null || groups === undefined) { - throw new Error( - 'Required parameter groups was null or undefined when calling allowGroupsToResources.' - ); - } - if (resources === null || resources === undefined) { - throw new Error( - 'Required parameter resources was null or undefined when calling allowGroupsToResources.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (groups) { - groups.forEach((element) => { - queryParameters = queryParameters.append('groups[]', element); - }); - } - if (resources) { - resources.forEach((element) => { - queryParameters = queryParameters.append('resources[]', element); - }); - } - if (async !== undefined && async !== null) { - queryParameters = queryParameters.set('async', async); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/resourcesManager/allowGroupsToResources`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Assigns a group to a resource. Check if attributes for each member from group are valid. Fill members\' attributes with missing value. Work in sync/async mode. Provide options for creating inactive or automatic subgroups group-resource assignments. - * @param group id of Group - * @param resource id of Resource - * @param async asynchronous flag, if set to true, some operation will be performed asynchronously - * @param assignInactive flag, if set to true, group-resource assignment will have status INACTIVE - * @param autoAssignSubgroups flag, if set to true, subgroups are assigned to resource as well - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public assignGroupToResource( - group: number, - resource: number, - async?: boolean, - assignInactive?: boolean, - autoAssignSubgroups?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public assignGroupToResource( - group: number, - resource: number, - async?: boolean, - assignInactive?: boolean, - autoAssignSubgroups?: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public assignGroupToResource( - group: number, - resource: number, - async?: boolean, - assignInactive?: boolean, - autoAssignSubgroups?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public assignGroupToResource( - group: number, - resource: number, - async?: boolean, - assignInactive?: boolean, - autoAssignSubgroups?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling assignGroupToResource.' - ); - } - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling assignGroupToResource.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (async !== undefined && async !== null) { - queryParameters = queryParameters.set('async', async); - } - if (assignInactive !== undefined && assignInactive !== null) { - queryParameters = queryParameters.set('assignInactive', assignInactive); - } - if (autoAssignSubgroups !== undefined && autoAssignSubgroups !== null) { - queryParameters = queryParameters.set('autoAssignSubgroups', autoAssignSubgroups); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/resourcesManager/assignGroupToResource`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Assigns a group to resources. Check if attributes for each member from group are valid. Fill members\' attributes with missing values. Work in sync/async mode. Provide options for creating inactive or automatic subgroups group-resource assignments. - * @param group id of Group - * @param resources list of Resource ids List<Integer> - * @param async asynchronous flag, if set to true, some operation will be performed asynchronously - * @param assignInactive flag, if set to true, group-resource assignment will have status INACTIVE - * @param autoAssignSubgroups flag, if set to true, subgroups are assigned to resource as well - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public assignGroupToResources( - group: number, - resources: Array, - async?: boolean, - assignInactive?: boolean, - autoAssignSubgroups?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public assignGroupToResources( - group: number, - resources: Array, - async?: boolean, - assignInactive?: boolean, - autoAssignSubgroups?: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public assignGroupToResources( - group: number, - resources: Array, - async?: boolean, - assignInactive?: boolean, - autoAssignSubgroups?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public assignGroupToResources( - group: number, - resources: Array, - async?: boolean, - assignInactive?: boolean, - autoAssignSubgroups?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling assignGroupToResources.' - ); - } - if (resources === null || resources === undefined) { - throw new Error( - 'Required parameter resources was null or undefined when calling assignGroupToResources.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (resources) { - resources.forEach((element) => { - queryParameters = queryParameters.append('resources[]', element); - }); - } - if (async !== undefined && async !== null) { - queryParameters = queryParameters.set('async', async); - } - if (assignInactive !== undefined && assignInactive !== null) { - queryParameters = queryParameters.set('assignInactive', assignInactive); - } - if (autoAssignSubgroups !== undefined && autoAssignSubgroups !== null) { - queryParameters = queryParameters.set('autoAssignSubgroups', autoAssignSubgroups); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/resourcesManager/assignGroupToResources`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Assigns groups to a resource. Check if attributes for each member from groups are valid. Fill members\' attributes with missing values. Work in sync/async mode. Provide options for creating inactive or automatic subgroups group-resource assignments. - * @param groups list of Group ids List<Integer> - * @param resource id of Resource - * @param async asynchronous flag, if set to true, some operation will be performed asynchronously - * @param assignInactive flag, if set to true, group-resource assignment will have status INACTIVE - * @param autoAssignSubgroups flag, if set to true, subgroups are assigned to resource as well - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public assignGroupsToResource( - groups: Array, - resource: number, - async?: boolean, - assignInactive?: boolean, - autoAssignSubgroups?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public assignGroupsToResource( - groups: Array, - resource: number, - async?: boolean, - assignInactive?: boolean, - autoAssignSubgroups?: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public assignGroupsToResource( - groups: Array, - resource: number, - async?: boolean, - assignInactive?: boolean, - autoAssignSubgroups?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public assignGroupsToResource( - groups: Array, - resource: number, - async?: boolean, - assignInactive?: boolean, - autoAssignSubgroups?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (groups === null || groups === undefined) { - throw new Error( - 'Required parameter groups was null or undefined when calling assignGroupsToResource.' - ); - } - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling assignGroupsToResource.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (groups) { - groups.forEach((element) => { - queryParameters = queryParameters.append('groups[]', element); - }); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (async !== undefined && async !== null) { - queryParameters = queryParameters.set('async', async); - } - if (assignInactive !== undefined && assignInactive !== null) { - queryParameters = queryParameters.set('assignInactive', assignInactive); - } - if (autoAssignSubgroups !== undefined && autoAssignSubgroups !== null) { - queryParameters = queryParameters.set('autoAssignSubgroups', autoAssignSubgroups); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/resourcesManager/assignGroupsToResource`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Assigns ResourceRag to resource. The ResourceTag must contain its id, voId and tagName. - * @param inputAssignResourceTagToResource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public assignResourceTagToResource( - inputAssignResourceTagToResource: InputAssignResourceTagToResource, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public assignResourceTagToResource( - inputAssignResourceTagToResource: InputAssignResourceTagToResource, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public assignResourceTagToResource( - inputAssignResourceTagToResource: InputAssignResourceTagToResource, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public assignResourceTagToResource( - inputAssignResourceTagToResource: InputAssignResourceTagToResource, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if ( - inputAssignResourceTagToResource === null || - inputAssignResourceTagToResource === undefined - ) { - throw new Error( - 'Required parameter inputAssignResourceTagToResource was null or undefined when calling assignResourceTagToResource.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/resourcesManager/assignResourceTagToResource`, - inputAssignResourceTagToResource, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Assigns service to resource. - * @param resource id of Resource - * @param service id of Service - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public assignService( - resource: number, - service: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public assignService( - resource: number, - service: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public assignService( - resource: number, - service: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public assignService( - resource: number, - service: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling assignService.' - ); - } - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling assignService.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/resourcesManager/assignService`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Assigns services to resource. - * @param resource id of Resource - * @param services list of Service ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public assignServices( - resource: number, - services: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public assignServices( - resource: number, - services: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public assignServices( - resource: number, - services: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public assignServices( - resource: number, - services: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling assignServices.' - ); - } - if (services === null || services === undefined) { - throw new Error( - 'Required parameter services was null or undefined when calling assignServices.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (services) { - services.forEach((element) => { - queryParameters = queryParameters.append('services[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/resourcesManager/assignServices`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Assign all services from a services package to a resource. - * @param resource id of Resource - * @param servicesPackage id of ServicesPackage - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public assignServicesPackage( - resource: number, - servicesPackage: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public assignServicesPackage( - resource: number, - servicesPackage: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public assignServicesPackage( - resource: number, - servicesPackage: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public assignServicesPackage( - resource: number, - servicesPackage: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling assignServicesPackage.' - ); - } - if (servicesPackage === null || servicesPackage === undefined) { - throw new Error( - 'Required parameter servicesPackage was null or undefined when calling assignServicesPackage.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (servicesPackage !== undefined && servicesPackage !== null) { - queryParameters = queryParameters.set('servicesPackage', servicesPackage); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/resourcesManager/assignServicesPackage`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Copy \"template\" settings from user\'s another existing resource and create new resource with this template. The settings are attributes, services, tags (if exists), groups and their members (if the resources are from the same VO and withGroups is true) Template Resource can be from any of user\'s facilities. - * @param inputCopyResource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyResource( - inputCopyResource: InputCopyResource, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public copyResource( - inputCopyResource: InputCopyResource, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public copyResource( - inputCopyResource: InputCopyResource, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public copyResource( - inputCopyResource: InputCopyResource, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputCopyResource === null || inputCopyResource === undefined) { - throw new Error( - 'Required parameter inputCopyResource was null or undefined when calling copyResource.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/resourcesManager/copyResource`, - inputCopyResource, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Creates a new resource. - * @param vo id of Vo - * @param facility id of Facility - * @param name name of entity - * @param description optional resource description - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createResource( - vo: number, - facility: number, - name: string, - description?: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public createResource( - vo: number, - facility: number, - name: string, - description?: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public createResource( - vo: number, - facility: number, - name: string, - description?: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public createResource( - vo: number, - facility: number, - name: string, - description?: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling createResource.'); - } - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling createResource.' - ); - } - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling createResource.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (name !== undefined && name !== null) { - queryParameters = queryParameters.set('name', name); - } - if (description !== undefined && description !== null) { - queryParameters = queryParameters.set('description', description); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/resourcesManager/createResource`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Create new resource tag in VO - * @param inputCreateResourceTagWithResourceTag - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createResourceTagWithResourceTag( - inputCreateResourceTagWithResourceTag: InputCreateResourceTagWithResourceTag, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public createResourceTagWithResourceTag( - inputCreateResourceTagWithResourceTag: InputCreateResourceTagWithResourceTag, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public createResourceTagWithResourceTag( - inputCreateResourceTagWithResourceTag: InputCreateResourceTagWithResourceTag, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public createResourceTagWithResourceTag( - inputCreateResourceTagWithResourceTag: InputCreateResourceTagWithResourceTag, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if ( - inputCreateResourceTagWithResourceTag === null || - inputCreateResourceTagWithResourceTag === undefined - ) { - throw new Error( - 'Required parameter inputCreateResourceTagWithResourceTag was null or undefined when calling createResourceTagWithResourceTag.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/resourcesManager/createResourceTag/resourceTag`, - inputCreateResourceTagWithResourceTag, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Create new resource tag defined by tag name in VO - * @param tagName tagName - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createResourceTagWithTagName( - tagName: string, - vo: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public createResourceTagWithTagName( - tagName: string, - vo: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public createResourceTagWithTagName( - tagName: string, - vo: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public createResourceTagWithTagName( - tagName: string, - vo: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (tagName === null || tagName === undefined) { - throw new Error( - 'Required parameter tagName was null or undefined when calling createResourceTagWithTagName.' - ); - } - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling createResourceTagWithTagName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (tagName !== undefined && tagName !== null) { - queryParameters = queryParameters.set('tagName', tagName); - } - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/resourcesManager/createResourceTag/tagName`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Deactivates the group-resource assignment. The assignment will become INACTIVE and will not be used to allow users from the given group to the resource. - * @param group id of Group - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deactivateGroupResourceAssignment( - group: number, - resource: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public deactivateGroupResourceAssignment( - group: number, - resource: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deactivateGroupResourceAssignment( - group: number, - resource: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deactivateGroupResourceAssignment( - group: number, - resource: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling deactivateGroupResourceAssignment.' - ); - } - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling deactivateGroupResourceAssignment.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/resourcesManager/deactivateGroupResourceAssignment`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Deletes all VO resources - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteAllResources( - vo: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public deleteAllResources( - vo: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deleteAllResources( - vo: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deleteAllResources( - vo: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling deleteAllResources.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/resourcesManager/deleteAllResources`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Delete all resources tags of VO - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteAllResourcesTagsForVo( - vo: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public deleteAllResourcesTagsForVo( - vo: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deleteAllResourcesTagsForVo( - vo: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deleteAllResourcesTagsForVo( - vo: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling deleteAllResourcesTagsForVo.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/resourcesManager/deleteAllResourcesTagsForVo`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Deletes a resource. - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteResource( - resource: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public deleteResource( - resource: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deleteResource( - resource: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deleteResource( - resource: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling deleteResource.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/resourcesManager/deleteResource`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Delete resource tag by it\'s id and VO_ID - * @param inputDeleteResourceTag - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteResourceTag( - inputDeleteResourceTag: InputDeleteResourceTag, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public deleteResourceTag( - inputDeleteResourceTag: InputDeleteResourceTag, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deleteResourceTag( - inputDeleteResourceTag: InputDeleteResourceTag, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deleteResourceTag( - inputDeleteResourceTag: InputDeleteResourceTag, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputDeleteResourceTag === null || inputDeleteResourceTag === undefined) { - throw new Error( - 'Required parameter inputDeleteResourceTag was null or undefined when calling deleteResourceTag.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/resourcesManager/deleteResourceTag`, - inputDeleteResourceTag, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all Resource group admins. - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAdminGroups( - resource: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAdminGroups( - resource: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAdminGroups( - resource: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAdminGroups( - resource: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getAdminGroups.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/resourcesManager/getAdminGroups`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get list of all resource administrators for supported role and given resource. - * If onlyDirectAdmins is == true, return only direct admins of the group for supported role. Supported roles are ResourceAdmin, VOAdmin. - * @param resource id of Resource - * @param onlyDirectAdmins boolean if true, get only direct resource administrators (if false, get both direct and indirect) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAdmins( - resource: number, - onlyDirectAdmins: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAdmins( - resource: number, - onlyDirectAdmins: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAdmins( - resource: number, - onlyDirectAdmins: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAdmins( - resource: number, - onlyDirectAdmins: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getAdmins.'); - } - if (onlyDirectAdmins === null || onlyDirectAdmins === undefined) { - throw new Error( - 'Required parameter onlyDirectAdmins was null or undefined when calling getAdmins.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (onlyDirectAdmins !== undefined && onlyDirectAdmins !== null) { - queryParameters = queryParameters.set('onlyDirectAdmins', onlyDirectAdmins); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/resourcesManager/getAdmins`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all resources with the specific tag assigned. - * @param inputGetAllResourcesByResourceTag - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllResourcesByResourceTag( - inputGetAllResourcesByResourceTag: InputGetAllResourcesByResourceTag, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAllResourcesByResourceTag( - inputGetAllResourcesByResourceTag: InputGetAllResourcesByResourceTag, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllResourcesByResourceTag( - inputGetAllResourcesByResourceTag: InputGetAllResourcesByResourceTag, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAllResourcesByResourceTag( - inputGetAllResourcesByResourceTag: InputGetAllResourcesByResourceTag, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if ( - inputGetAllResourcesByResourceTag === null || - inputGetAllResourcesByResourceTag === undefined - ) { - throw new Error( - 'Required parameter inputGetAllResourcesByResourceTag was null or undefined when calling getAllResourcesByResourceTag.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post>( - `${this.configuration.basePath}/json/resourcesManager/getAllResourcesByResourceTag`, - inputGetAllResourcesByResourceTag, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets all resource tags of Resource. - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllResourcesTagsForResource( - resource: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAllResourcesTagsForResource( - resource: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllResourcesTagsForResource( - resource: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAllResourcesTagsForResource( - resource: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getAllResourcesTagsForResource.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/resourcesManager/getAllResourcesTagsForResource`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets all resource tags of VO. - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllResourcesTagsForVo( - vo: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAllResourcesTagsForVo( - vo: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllResourcesTagsForVo( - vo: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAllResourcesTagsForVo( - vo: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling getAllResourcesTagsForVo.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/resourcesManager/getAllResourcesTagsForVo`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns list of Resources, where the user is an Administrator. - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllResourcesWhereUserIsAdmin( - user: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAllResourcesWhereUserIsAdmin( - user: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllResourcesWhereUserIsAdmin( - user: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAllResourcesWhereUserIsAdmin( - user: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling getAllResourcesWhereUserIsAdmin.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/resourcesManager/getResourcesWhereUserIsAdmin/all`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns all members assigned to the resource. - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllowedMembers( - resource: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAllowedMembers( - resource: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllowedMembers( - resource: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAllowedMembers( - resource: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getAllowedMembers.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/resourcesManager/getAllowedMembers`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all resources which have the member access on. - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllowedResources( - member: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAllowedResources( - member: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllowedResources( - member: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAllowedResources( - member: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getAllowedResources.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/resourcesManager/getAllowedResources`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns all users assigned to the resource. - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllowedUsersOfResource( - resource: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAllowedUsersOfResource( - resource: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllowedUsersOfResource( - resource: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAllowedUsersOfResource( - resource: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getAllowedUsersOfResource.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/resourcesManager/getAllowedUsers`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * List all groups associated with the resource and optionally a member. - * @param resource id of Resource - * @param member optional member id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedGroups( - resource: number, - member?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAssignedGroups( - resource: number, - member?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAssignedGroups( - resource: number, - member?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAssignedGroups( - resource: number, - member?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getAssignedGroups.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/resourcesManager/getAssignedGroups`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns all members assigned to the resource. - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedMembers( - resource: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAssignedMembers( - resource: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAssignedMembers( - resource: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAssignedMembers( - resource: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getAssignedMembers.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/resourcesManager/getAssignedMembers`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns members of groups assigned to resource with status of group-resource assignment. - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedMembersWithStatus( - resource: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAssignedMembersWithStatus( - resource: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAssignedMembersWithStatus( - resource: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAssignedMembersWithStatus( - resource: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getAssignedMembersWithStatus.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/resourcesManager/getAssignedMembersWithStatus`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * List all resources associated with a group. - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedResourcesWithGroup( - group: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAssignedResourcesWithGroup( - group: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAssignedResourcesWithGroup( - group: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAssignedResourcesWithGroup( - group: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getAssignedResourcesWithGroup.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/resourcesManager/getAssignedResources/g`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * List all resources associated with a member\'s group. - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedResourcesWithMember( - member: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAssignedResourcesWithMember( - member: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAssignedResourcesWithMember( - member: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAssignedResourcesWithMember( - member: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getAssignedResourcesWithMember.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/resourcesManager/getAssignedResources/m`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns all assigned resources with statuses where member is assigned through the groups. - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedResourcesWithStatus( - member: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAssignedResourcesWithStatus( - member: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAssignedResourcesWithStatus( - member: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAssignedResourcesWithStatus( - member: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getAssignedResourcesWithStatus.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/resourcesManager/getAssignedResourcesWithStatus`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns all members assigned to the resource as RichMembers. - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedRichMembers( - resource: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAssignedRichMembers( - resource: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAssignedRichMembers( - resource: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAssignedRichMembers( - resource: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getAssignedRichMembers.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/resourcesManager/getAssignedRichMembers`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * List all rich resources associated with a group. - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedRichResourcesWithGroup( - group: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAssignedRichResourcesWithGroup( - group: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAssignedRichResourcesWithGroup( - group: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAssignedRichResourcesWithGroup( - group: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getAssignedRichResourcesWithGroup.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/resourcesManager/getAssignedRichResources/g`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * List all rich resources associated with a member\'s group. - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedRichResourcesWithMember( - member: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAssignedRichResourcesWithMember( - member: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAssignedRichResourcesWithMember( - member: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAssignedRichResourcesWithMember( - member: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getAssignedRichResourcesWithMember.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/resourcesManager/getAssignedRichResources/m`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all rich resources where the service and the member are assigned with facility property filled. - * @param member id of Member - * @param service id of Service - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedRichResourcesWithMemberService( - member: number, - service: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAssignedRichResourcesWithMemberService( - member: number, - service: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAssignedRichResourcesWithMemberService( - member: number, - service: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAssignedRichResourcesWithMemberService( - member: number, - service: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getAssignedRichResourcesWithMemberService.' - ); - } - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling getAssignedRichResourcesWithMemberService.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/resourcesManager/getAssignedRichResources/s-m`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * List all services associated with the resource. - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedServicesToResource( - resource: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAssignedServicesToResource( - resource: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAssignedServicesToResource( - resource: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAssignedServicesToResource( - resource: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getAssignedServicesToResource.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/resourcesManager/getAssignedServices`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all bans for member on any resource. - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getBansForMember( - member: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getBansForMember( - member: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getBansForMember( - member: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getBansForMember( - member: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getBansForMember.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/resourcesManager/getBansForMember`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all bans for members on the resource. - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getBansForResource( - resource: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getBansForResource( - resource: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getBansForResource( - resource: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getBansForResource( - resource: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getBansForResource.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/resourcesManager/getBansForResource`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Find resource for given id and returns it with given attributes. If attrNames are null or empty, all resource attributes are returned. - * @param id numeric id - * @param attrNames list of attribute names List<String> or null - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getEnrichedResourceById( - id: number, - attrNames?: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getEnrichedResourceById( - id: number, - attrNames?: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getEnrichedResourceById( - id: number, - attrNames?: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getEnrichedResourceById( - id: number, - attrNames?: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling getEnrichedResourceById.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/resourcesManager/getEnrichedResourceById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Find resources for given facility and attributes for given names. If the attrNames are empty or null, return all attributes. - * @param facility id of Facility - * @param attrNames list of attribute names List<String> or null - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getEnrichedResourcesForFacility( - facility: number, - attrNames?: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getEnrichedResourcesForFacility( - facility: number, - attrNames?: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getEnrichedResourcesForFacility( - facility: number, - attrNames?: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getEnrichedResourcesForFacility( - facility: number, - attrNames?: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getEnrichedResourcesForFacility.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/resourcesManager/getEnrichedResourcesForFacility`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Find resources for given vo and attributes for given names. If the attrNames are empty or null, return all attributes. - * @param vo id of Vo - * @param attrNames list of attribute names List<String> or null - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getEnrichedResourcesForVo( - vo: number, - attrNames?: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getEnrichedResourcesForVo( - vo: number, - attrNames?: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getEnrichedResourcesForVo( - vo: number, - attrNames?: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getEnrichedResourcesForVo( - vo: number, - attrNames?: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling getEnrichedResourcesForVo.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/resourcesManager/getEnrichedResourcesForVo`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get facility which belongs to a specific resource. - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacility( - resource: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getFacility( - resource: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getFacility( - resource: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getFacility( - resource: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getFacility.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/resourcesManager/getFacility`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Lists all of the assigned groups for the given resource. Also, returns specified attributes for the groups. - * @param resource id of Resource - * @param attrNames list of attribute names List<String> or null - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupAssignments( - resource: number, - attrNames?: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getGroupAssignments( - resource: number, - attrNames?: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getGroupAssignments( - resource: number, - attrNames?: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getGroupAssignments( - resource: number, - attrNames?: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getGroupAssignments.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/resourcesManager/getGroupAssignments`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Lists all of the resource assignments for the given group. Also, returns specified attributes for the resources and resource tags. - * @param group id of Group - * @param attrNames list of attribute names List<String> or null - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourceAssignments( - group: number, - attrNames?: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getResourceAssignments( - group: number, - attrNames?: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getResourceAssignments( - group: number, - attrNames?: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getResourceAssignments( - group: number, - attrNames?: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getResourceAssignments.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/resourcesManager/getResourceAssignments`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get ban by memberId and resource id. - * @param member id of Member - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourceBan( - member: number, - resource: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getResourceBan( - member: number, - resource: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getResourceBan( - member: number, - resource: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getResourceBan( - member: number, - resource: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getResourceBan.' - ); - } - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getResourceBan.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/resourcesManager/getBan`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get Ban for member on resource by it\'s id. - * @param banId BanOnResource id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourceBanById( - banId: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getResourceBanById( - banId: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getResourceBanById( - banId: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getResourceBanById( - banId: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (banId === null || banId === undefined) { - throw new Error( - 'Required parameter banId was null or undefined when calling getResourceBanById.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (banId !== undefined && banId !== null) { - queryParameters = queryParameters.set('banId', banId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/resourcesManager/getBanById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns a resource by id. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourceById( - id: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getResourceById( - id: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getResourceById( - id: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getResourceById( - id: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getResourceById.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/resourcesManager/getResourceById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns resource by its name, Vo id and Facility id. - * @param vo id of Vo - * @param facility id of Facility - * @param name name of entity - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourceByName( - vo: number, - facility: number, - name: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getResourceByName( - vo: number, - facility: number, - name: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getResourceByName( - vo: number, - facility: number, - name: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getResourceByName( - vo: number, - facility: number, - name: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling getResourceByName.' - ); - } - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getResourceByName.' - ); - } - if (name === null || name === undefined) { - throw new Error( - 'Required parameter name was null or undefined when calling getResourceByName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (name !== undefined && name !== null) { - queryParameters = queryParameters.set('name', name); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/resourcesManager/getResourceByName`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all VO resources. - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResources( - vo: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getResources( - vo: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getResources( - vo: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getResources( - vo: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getResources.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/resourcesManager/getResources`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns list of Resources by their ids. - * @param ids list of ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourcesByIds( - ids: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getResourcesByIds( - ids: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getResourcesByIds( - ids: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getResourcesByIds( - ids: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (ids === null || ids === undefined) { - throw new Error( - 'Required parameter ids was null or undefined when calling getResourcesByIds.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (ids) { - ids.forEach((element) => { - queryParameters = queryParameters.append('ids[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/resourcesManager/getResourcesByIds`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets count of all users. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourcesCountForAll(observe?: 'body', reportProgress?: boolean): Observable; - public getResourcesCountForAll( - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getResourcesCountForAll( - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getResourcesCountForAll( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/resourcesManager/getResourcesCount/all`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns number of VO resources - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourcesCountForVo( - vo: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getResourcesCountForVo( - vo: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getResourcesCountForVo( - vo: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getResourcesCountForVo( - vo: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling getResourcesCountForVo.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/resourcesManager/getResourcesCount/vo`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns list of Resources for specified VO, where the user is an Administrator. - * @param vo id of Vo - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourcesFromVoWhereUserIsAdmin( - vo: number, - user: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getResourcesFromVoWhereUserIsAdmin( - vo: number, - user: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getResourcesFromVoWhereUserIsAdmin( - vo: number, - user: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getResourcesFromVoWhereUserIsAdmin( - vo: number, - user: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling getResourcesFromVoWhereUserIsAdmin.' - ); - } - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling getResourcesFromVoWhereUserIsAdmin.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/resourcesManager/getResourcesWhereUserIsAdmin/fromVo`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns list of Resources for specified VO and Facility, where the group is an Administrator. - * @param facility id of Facility - * @param vo id of Vo - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourcesWhereGroupIsAdmin( - facility: number, - vo: number, - group: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getResourcesWhereGroupIsAdmin( - facility: number, - vo: number, - group: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getResourcesWhereGroupIsAdmin( - facility: number, - vo: number, - group: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getResourcesWhereGroupIsAdmin( - facility: number, - vo: number, - group: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getResourcesWhereGroupIsAdmin.' - ); - } - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling getResourcesWhereGroupIsAdmin.' - ); - } - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getResourcesWhereGroupIsAdmin.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/resourcesManager/getResourcesWhereUserIsAdmin/group`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns list of Resources for specified VO and Facility, where the user is an Administrator. - * @param facility id of Facility - * @param vo id of Vo - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourcesWhereUserIsAdmin( - facility: number, - vo: number, - user: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getResourcesWhereUserIsAdmin( - facility: number, - vo: number, - user: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getResourcesWhereUserIsAdmin( - facility: number, - vo: number, - user: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getResourcesWhereUserIsAdmin( - facility: number, - vo: number, - user: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getResourcesWhereUserIsAdmin.' - ); - } - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling getResourcesWhereUserIsAdmin.' - ); - } - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling getResourcesWhereUserIsAdmin.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/resourcesManager/getResourcesWhereUserIsAdmin`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get list of all richUser administrators for the resource and supported role with specific attributes. Supported roles: ResourceAdmin, VOAdmin If \"onlyDirectAdmins\" is true, return only direct admins of the resource for supported role with specific attributes. If \"allUserAttributes\" is true, do not specify attributes through list and return them all in objects richUser. Ignoring list of specific attributes. - * @param resource id of Resource - * @param specificAttributes list of specified attributes which are needed in object richUser - * @param allUserAttributes if == true, get all possible user attributes and ignore list of specificAttributes (if false, get only specific attributes) - * @param onlyDirectAdmins if == true, get only direct resource administrators (if false, get both direct and indirect) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRichAdmins( - resource: number, - specificAttributes: Array, - allUserAttributes: boolean, - onlyDirectAdmins: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getRichAdmins( - resource: number, - specificAttributes: Array, - allUserAttributes: boolean, - onlyDirectAdmins: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getRichAdmins( - resource: number, - specificAttributes: Array, - allUserAttributes: boolean, - onlyDirectAdmins: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getRichAdmins( - resource: number, - specificAttributes: Array, - allUserAttributes: boolean, - onlyDirectAdmins: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getRichAdmins.' - ); - } - if (specificAttributes === null || specificAttributes === undefined) { - throw new Error( - 'Required parameter specificAttributes was null or undefined when calling getRichAdmins.' - ); - } - if (allUserAttributes === null || allUserAttributes === undefined) { - throw new Error( - 'Required parameter allUserAttributes was null or undefined when calling getRichAdmins.' - ); - } - if (onlyDirectAdmins === null || onlyDirectAdmins === undefined) { - throw new Error( - 'Required parameter onlyDirectAdmins was null or undefined when calling getRichAdmins.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (specificAttributes) { - specificAttributes.forEach((element) => { - queryParameters = queryParameters.append('specificAttributes', element); - }); - } - if (allUserAttributes !== undefined && allUserAttributes !== null) { - queryParameters = queryParameters.set('allUserAttributes', allUserAttributes); - } - if (onlyDirectAdmins !== undefined && onlyDirectAdmins !== null) { - queryParameters = queryParameters.set('onlyDirectAdmins', onlyDirectAdmins); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/resourcesManager/getRichAdmins`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns RichResource by id (also containing facility and VO inside). - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRichResourceById( - id: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getRichResourceById( - id: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getRichResourceById( - id: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getRichResourceById( - id: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling getRichResourceById.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/resourcesManager/getRichResourceById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all VO rich resources. - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRichResources( - vo: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getRichResources( - vo: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getRichResources( - vo: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getRichResources( - vo: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getRichResources.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/resourcesManager/getRichResources`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns list of RichResources by their ids. - * @param ids list of ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRichResourcesByIds( - ids: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getRichResourcesByIds( - ids: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getRichResourcesByIds( - ids: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getRichResourcesByIds( - ids: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (ids === null || ids === undefined) { - throw new Error( - 'Required parameter ids was null or undefined when calling getRichResourcesByIds.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (ids) { - ids.forEach((element) => { - queryParameters = queryParameters.append('ids[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/resourcesManager/getRichResourcesByIds`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns Vo which is tied to a specific resource. - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVo(resource: number, observe?: 'body', reportProgress?: boolean): Observable; - public getVo( - resource: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getVo( - resource: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getVo( - resource: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getVo.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get(`${this.configuration.basePath}/json/resourcesManager/getVo`, { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - }); - } - - /** - * Removes all resources tags from a resource. - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeAllResourceTagsFromResource( - resource: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeAllResourceTagsFromResource( - resource: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeAllResourceTagsFromResource( - resource: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeAllResourceTagsFromResource( - resource: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling removeAllResourceTagsFromResource.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/resourcesManager/removeAllResourcesTagFromResource`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove specific ban by memberId and resourceId. - * @param member id of Member - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeBanByMemberAndResource( - member: number, - resource: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeBanByMemberAndResource( - member: number, - resource: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeBanByMemberAndResource( - member: number, - resource: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeBanByMemberAndResource( - member: number, - resource: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling removeBanByMemberAndResource.' - ); - } - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling removeBanByMemberAndResource.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/resourcesManager/removeBan/member-resource-id`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Removes a group administrator of the Resource. - * @param resource id of Resource - * @param authorizedGroup Group id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeGroupAdminResource( - resource: number, - authorizedGroup: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeGroupAdminResource( - resource: number, - authorizedGroup: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeGroupAdminResource( - resource: number, - authorizedGroup: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeGroupAdminResource( - resource: number, - authorizedGroup: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling removeGroupAdminResource.' - ); - } - if (authorizedGroup === null || authorizedGroup === undefined) { - throw new Error( - 'Required parameter authorizedGroup was null or undefined when calling removeGroupAdminResource.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (authorizedGroup !== undefined && authorizedGroup !== null) { - queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/resourcesManager/removeAdmin/r-g`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove a group from a resource. After removing, check attributes and fix them if it is needed. - * @param group id of Group - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeGroupFromResource( - group: number, - resource: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeGroupFromResource( - group: number, - resource: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeGroupFromResource( - group: number, - resource: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeGroupFromResource( - group: number, - resource: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling removeGroupFromResource.' - ); - } - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling removeGroupFromResource.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/resourcesManager/removeGroupFromResource`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove a group from resource. After removing, check attributes and fix them if it is needed. - * @param group id of Group - * @param resources list of Resource ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeGroupFromResources( - group: number, - resources: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeGroupFromResources( - group: number, - resources: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeGroupFromResources( - group: number, - resources: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeGroupFromResources( - group: number, - resources: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling removeGroupFromResources.' - ); - } - if (resources === null || resources === undefined) { - throw new Error( - 'Required parameter resources was null or undefined when calling removeGroupFromResources.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (resources) { - resources.forEach((element) => { - queryParameters = queryParameters.append('resources[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/resourcesManager/removeGroupFromResources`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove groups from a resource. After removing, check attributes and fix them if it is needed. - * @param groups list of Group ids List<Integer> - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeGroupsFromResource( - groups: Array, - resource: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeGroupsFromResource( - groups: Array, - resource: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeGroupsFromResource( - groups: Array, - resource: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeGroupsFromResource( - groups: Array, - resource: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (groups === null || groups === undefined) { - throw new Error( - 'Required parameter groups was null or undefined when calling removeGroupsFromResource.' - ); - } - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling removeGroupsFromResource.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (groups) { - groups.forEach((element) => { - queryParameters = queryParameters.append('groups[]', element); - }); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/resourcesManager/removeGroupsFromResource`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove specific ban by it\'s id. - * @param banId BanOnResource id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeResourceBanById( - banId: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeResourceBanById( - banId: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeResourceBanById( - banId: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeResourceBanById( - banId: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (banId === null || banId === undefined) { - throw new Error( - 'Required parameter banId was null or undefined when calling removeResourceBanById.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (banId !== undefined && banId !== null) { - queryParameters = queryParameters.set('banId', banId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/resourcesManager/removeBan/id`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Unset ResourceSelfService role to given group for given resource. - * @param resource id of Resource - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeResourceSelfServiceGroup( - resource: number, - group: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeResourceSelfServiceGroup( - resource: number, - group: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeResourceSelfServiceGroup( - resource: number, - group: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeResourceSelfServiceGroup( - resource: number, - group: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling removeResourceSelfServiceGroup.' - ); - } - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling removeResourceSelfServiceGroup.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/resourcesManager/removeResourceSelfServiceGroup`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Unset ResourceSelfService role to given user for given resource. - * @param resource id of Resource - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeResourceSelfServiceUser( - resource: number, - user: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeResourceSelfServiceUser( - resource: number, - user: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeResourceSelfServiceUser( - resource: number, - user: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeResourceSelfServiceUser( - resource: number, - user: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling removeResourceSelfServiceUser.' - ); - } - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling removeResourceSelfServiceUser.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/resourcesManager/removeResourceSelfServiceUser`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Removes ResourceRag from a resource. The ResourceTag must contain its id, voId and tagName. - * @param inputRemoveResourceTagFromResource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeResourceTagFromResource( - inputRemoveResourceTagFromResource: InputRemoveResourceTagFromResource, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeResourceTagFromResource( - inputRemoveResourceTagFromResource: InputRemoveResourceTagFromResource, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeResourceTagFromResource( - inputRemoveResourceTagFromResource: InputRemoveResourceTagFromResource, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeResourceTagFromResource( - inputRemoveResourceTagFromResource: InputRemoveResourceTagFromResource, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if ( - inputRemoveResourceTagFromResource === null || - inputRemoveResourceTagFromResource === undefined - ) { - throw new Error( - 'Required parameter inputRemoveResourceTagFromResource was null or undefined when calling removeResourceTagFromResource.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/resourcesManager/removeResourceTagFromResource`, - inputRemoveResourceTagFromResource, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Removes a service from a resource. - * @param resource id of Resource - * @param service id of Service - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeService( - resource: number, - service: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeService( - resource: number, - service: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeService( - resource: number, - service: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeService( - resource: number, - service: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling removeService.' - ); - } - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling removeService.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/resourcesManager/removeService`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Removes services from a resource. - * @param resource id of Resource - * @param services list of Service ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeServices( - resource: number, - services: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeServices( - resource: number, - services: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeServices( - resource: number, - services: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeServices( - resource: number, - services: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling removeServices.' - ); - } - if (services === null || services === undefined) { - throw new Error( - 'Required parameter services was null or undefined when calling removeServices.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (services) { - services.forEach((element) => { - queryParameters = queryParameters.append('services[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/resourcesManager/removeServices`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove from resource all services from services package. - * @param resource id of Resource - * @param servicesPackage id of ServicesPackage - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeServicesPackage( - resource: number, - servicesPackage: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeServicesPackage( - resource: number, - servicesPackage: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeServicesPackage( - resource: number, - servicesPackage: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeServicesPackage( - resource: number, - servicesPackage: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling removeServicesPackage.' - ); - } - if (servicesPackage === null || servicesPackage === undefined) { - throw new Error( - 'Required parameter servicesPackage was null or undefined when calling removeServicesPackage.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (servicesPackage !== undefined && servicesPackage !== null) { - queryParameters = queryParameters.set('servicesPackage', servicesPackage); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/resourcesManager/removeServicesPackage`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Removes a Resource admin. - * @param resource id of Resource - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeUserAdminResource( - resource: number, - user: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeUserAdminResource( - resource: number, - user: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeUserAdminResource( - resource: number, - user: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeUserAdminResource( - resource: number, - user: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling removeUserAdminResource.' - ); - } - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling removeUserAdminResource.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/resourcesManager/removeAdmin/r-u`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Set ban for member on resource. - * @param inputSetBan - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setResourceBan( - inputSetBan: InputSetBan, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setResourceBan( - inputSetBan: InputSetBan, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setResourceBan( - inputSetBan: InputSetBan, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setResourceBan( - inputSetBan: InputSetBan, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputSetBan === null || inputSetBan === undefined) { - throw new Error( - 'Required parameter inputSetBan was null or undefined when calling setResourceBan.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/resourcesManager/setBan`, - inputSetBan, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Unassigns given groups from the given resources. - * @param groups list of Group ids List<Integer> - * @param resources list of Resource ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public unallowGroupsFromResources( - groups: Array, - resources: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public unallowGroupsFromResources( - groups: Array, - resources: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public unallowGroupsFromResources( - groups: Array, - resources: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public unallowGroupsFromResources( - groups: Array, - resources: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (groups === null || groups === undefined) { - throw new Error( - 'Required parameter groups was null or undefined when calling unallowGroupsFromResources.' - ); - } - if (resources === null || resources === undefined) { - throw new Error( - 'Required parameter resources was null or undefined when calling unallowGroupsFromResources.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (groups) { - groups.forEach((element) => { - queryParameters = queryParameters.append('groups[]', element); - }); - } - if (resources) { - resources.forEach((element) => { - queryParameters = queryParameters.append('resources[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/resourcesManager/unallowGroupsFromResources`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Updates a resource. - * @param inputUpdateResource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateResource( - inputUpdateResource: InputUpdateResource, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public updateResource( - inputUpdateResource: InputUpdateResource, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public updateResource( - inputUpdateResource: InputUpdateResource, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public updateResource( - inputUpdateResource: InputUpdateResource, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputUpdateResource === null || inputUpdateResource === undefined) { - throw new Error( - 'Required parameter inputUpdateResource was null or undefined when calling updateResource.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/resourcesManager/updateResource`, - inputUpdateResource, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Update existing ban (description, validation timestamp) - * @param inputUpdateBan - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateResourceBan( - inputUpdateBan: InputUpdateBan, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public updateResourceBan( - inputUpdateBan: InputUpdateBan, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public updateResourceBan( - inputUpdateBan: InputUpdateBan, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public updateResourceBan( - inputUpdateBan: InputUpdateBan, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputUpdateBan === null || inputUpdateBan === undefined) { - throw new Error( - 'Required parameter inputUpdateBan was null or undefined when calling updateResourceBan.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/resourcesManager/updateBan`, - inputUpdateBan, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Update resource tag name by it\'s id and VO_ID - * @param inputUpdateResourceTag - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateResourceTag( - inputUpdateResourceTag: InputUpdateResourceTag, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public updateResourceTag( - inputUpdateResourceTag: InputUpdateResourceTag, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public updateResourceTag( - inputUpdateResourceTag: InputUpdateResourceTag, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public updateResourceTag( - inputUpdateResourceTag: InputUpdateResourceTag, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputUpdateResourceTag === null || inputUpdateResourceTag === undefined) { - throw new Error( - 'Required parameter inputUpdateResourceTag was null or undefined when calling updateResourceTag.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + + + /** + * Try to activate the group-resource status. If the async is set to false, the validation is performed synchronously. The assignment will be either ACTIVE, in case of a sucessfull synchronous call, or it will be PROCESSING in case of an asynchronous call. After the async validation, the state can be either ACTIVE or FAILED. + * @param group id of Group + * @param resource id of Resource + * @param async asynchronous flag, if set to true, some operation will be performed asynchronously + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public activateGroupResourceAssignment(group: number, resource: number, async?: boolean, observe?: 'body', reportProgress?: boolean): Observable; + public activateGroupResourceAssignment(group: number, resource: number, async?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; + public activateGroupResourceAssignment(group: number, resource: number, async?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; + public activateGroupResourceAssignment(group: number, resource: number, async?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling activateGroupResourceAssignment.'); + } + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling activateGroupResourceAssignment.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (async !== undefined && async !== null) { + queryParameters = queryParameters.set('async', async); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/activateGroupResourceAssignment`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Adds a group administrator to the Resource. + * @param resource id of Resource + * @param authorizedGroup Group id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addAdminToGroup(resource: number, authorizedGroup: number, observe?: 'body', reportProgress?: boolean): Observable; + public addAdminToGroup(resource: number, authorizedGroup: number, observe?: 'response', reportProgress?: boolean): Observable>; + public addAdminToGroup(resource: number, authorizedGroup: number, observe?: 'events', reportProgress?: boolean): Observable>; + public addAdminToGroup(resource: number, authorizedGroup: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling addAdminToGroup.'); + } + if (authorizedGroup === null || authorizedGroup === undefined) { + throw new Error('Required parameter authorizedGroup was null or undefined when calling addAdminToGroup.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (authorizedGroup !== undefined && authorizedGroup !== null) { + queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/addAdmin/r-g`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Adds a Resource admin. + * @param resource id of Resource + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addAdminToUser(resource: number, user: number, observe?: 'body', reportProgress?: boolean): Observable; + public addAdminToUser(resource: number, user: number, observe?: 'response', reportProgress?: boolean): Observable>; + public addAdminToUser(resource: number, user: number, observe?: 'events', reportProgress?: boolean): Observable>; + public addAdminToUser(resource: number, user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling addAdminToUser.'); + } + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling addAdminToUser.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/addAdmin/r-u`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Sets ResourceSelfService role to given group for given resource. + * @param resource id of Resource + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addResourceSelfServiceGroup(resource: number, group: number, observe?: 'body', reportProgress?: boolean): Observable; + public addResourceSelfServiceGroup(resource: number, group: number, observe?: 'response', reportProgress?: boolean): Observable>; + public addResourceSelfServiceGroup(resource: number, group: number, observe?: 'events', reportProgress?: boolean): Observable>; + public addResourceSelfServiceGroup(resource: number, group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling addResourceSelfServiceGroup.'); + } + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling addResourceSelfServiceGroup.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/addResourceSelfServiceGroup`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Sets ResourceSelfService role to given user for given resource. + * @param resource id of Resource + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addResourceSelfServiceUser(resource: number, user: number, observe?: 'body', reportProgress?: boolean): Observable; + public addResourceSelfServiceUser(resource: number, user: number, observe?: 'response', reportProgress?: boolean): Observable>; + public addResourceSelfServiceUser(resource: number, user: number, observe?: 'events', reportProgress?: boolean): Observable>; + public addResourceSelfServiceUser(resource: number, user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling addResourceSelfServiceUser.'); + } + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling addResourceSelfServiceUser.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/addResourceSelfServiceUser`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Assigns given groups to all of the given resources. If async is set to false, check if attributes for each member from groups are valid and fill members\' attributes with missing values. + * @param groups list of Group ids List<Integer> + * @param resources list of Resource ids List<Integer> + * @param async asynchronous flag, if set to true, some operation will be performed asynchronously + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public allowGroupsToResources(groups: Array, resources: Array, async?: boolean, observe?: 'body', reportProgress?: boolean): Observable; + public allowGroupsToResources(groups: Array, resources: Array, async?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; + public allowGroupsToResources(groups: Array, resources: Array, async?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; + public allowGroupsToResources(groups: Array, resources: Array, async?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (groups === null || groups === undefined) { + throw new Error('Required parameter groups was null or undefined when calling allowGroupsToResources.'); + } + if (resources === null || resources === undefined) { + throw new Error('Required parameter resources was null or undefined when calling allowGroupsToResources.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (groups) { + groups.forEach((element) => { + queryParameters = queryParameters.append('groups[]', element); + }) + } + if (resources) { + resources.forEach((element) => { + queryParameters = queryParameters.append('resources[]', element); + }) + } + if (async !== undefined && async !== null) { + queryParameters = queryParameters.set('async', async); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/allowGroupsToResources`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Assigns a group to a resource. Check if attributes for each member from group are valid. Fill members\' attributes with missing value. Work in sync/async mode. Provide options for creating inactive or automatic subgroups group-resource assignments. + * @param group id of Group + * @param resource id of Resource + * @param async asynchronous flag, if set to true, some operation will be performed asynchronously + * @param assignInactive flag, if set to true, group-resource assignment will have status INACTIVE + * @param autoAssignSubgroups flag, if set to true, subgroups are assigned to resource as well + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public assignGroupToResource(group: number, resource: number, async?: boolean, assignInactive?: boolean, autoAssignSubgroups?: boolean, observe?: 'body', reportProgress?: boolean): Observable; + public assignGroupToResource(group: number, resource: number, async?: boolean, assignInactive?: boolean, autoAssignSubgroups?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; + public assignGroupToResource(group: number, resource: number, async?: boolean, assignInactive?: boolean, autoAssignSubgroups?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; + public assignGroupToResource(group: number, resource: number, async?: boolean, assignInactive?: boolean, autoAssignSubgroups?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling assignGroupToResource.'); + } + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling assignGroupToResource.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (async !== undefined && async !== null) { + queryParameters = queryParameters.set('async', async); + } + if (assignInactive !== undefined && assignInactive !== null) { + queryParameters = queryParameters.set('assignInactive', assignInactive); + } + if (autoAssignSubgroups !== undefined && autoAssignSubgroups !== null) { + queryParameters = queryParameters.set('autoAssignSubgroups', autoAssignSubgroups); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/assignGroupToResource`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Assigns a group to resources. Check if attributes for each member from group are valid. Fill members\' attributes with missing values. Work in sync/async mode. Provide options for creating inactive or automatic subgroups group-resource assignments. + * @param group id of Group + * @param resources list of Resource ids List<Integer> + * @param async asynchronous flag, if set to true, some operation will be performed asynchronously + * @param assignInactive flag, if set to true, group-resource assignment will have status INACTIVE + * @param autoAssignSubgroups flag, if set to true, subgroups are assigned to resource as well + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public assignGroupToResources(group: number, resources: Array, async?: boolean, assignInactive?: boolean, autoAssignSubgroups?: boolean, observe?: 'body', reportProgress?: boolean): Observable; + public assignGroupToResources(group: number, resources: Array, async?: boolean, assignInactive?: boolean, autoAssignSubgroups?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; + public assignGroupToResources(group: number, resources: Array, async?: boolean, assignInactive?: boolean, autoAssignSubgroups?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; + public assignGroupToResources(group: number, resources: Array, async?: boolean, assignInactive?: boolean, autoAssignSubgroups?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling assignGroupToResources.'); + } + if (resources === null || resources === undefined) { + throw new Error('Required parameter resources was null or undefined when calling assignGroupToResources.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (resources) { + resources.forEach((element) => { + queryParameters = queryParameters.append('resources[]', element); + }) + } + if (async !== undefined && async !== null) { + queryParameters = queryParameters.set('async', async); + } + if (assignInactive !== undefined && assignInactive !== null) { + queryParameters = queryParameters.set('assignInactive', assignInactive); + } + if (autoAssignSubgroups !== undefined && autoAssignSubgroups !== null) { + queryParameters = queryParameters.set('autoAssignSubgroups', autoAssignSubgroups); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/assignGroupToResources`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Assigns groups to a resource. Check if attributes for each member from groups are valid. Fill members\' attributes with missing values. Work in sync/async mode. Provide options for creating inactive or automatic subgroups group-resource assignments. + * @param groups list of Group ids List<Integer> + * @param resource id of Resource + * @param async asynchronous flag, if set to true, some operation will be performed asynchronously + * @param assignInactive flag, if set to true, group-resource assignment will have status INACTIVE + * @param autoAssignSubgroups flag, if set to true, subgroups are assigned to resource as well + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public assignGroupsToResource(groups: Array, resource: number, async?: boolean, assignInactive?: boolean, autoAssignSubgroups?: boolean, observe?: 'body', reportProgress?: boolean): Observable; + public assignGroupsToResource(groups: Array, resource: number, async?: boolean, assignInactive?: boolean, autoAssignSubgroups?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; + public assignGroupsToResource(groups: Array, resource: number, async?: boolean, assignInactive?: boolean, autoAssignSubgroups?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; + public assignGroupsToResource(groups: Array, resource: number, async?: boolean, assignInactive?: boolean, autoAssignSubgroups?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (groups === null || groups === undefined) { + throw new Error('Required parameter groups was null or undefined when calling assignGroupsToResource.'); + } + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling assignGroupsToResource.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (groups) { + groups.forEach((element) => { + queryParameters = queryParameters.append('groups[]', element); + }) + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (async !== undefined && async !== null) { + queryParameters = queryParameters.set('async', async); + } + if (assignInactive !== undefined && assignInactive !== null) { + queryParameters = queryParameters.set('assignInactive', assignInactive); + } + if (autoAssignSubgroups !== undefined && autoAssignSubgroups !== null) { + queryParameters = queryParameters.set('autoAssignSubgroups', autoAssignSubgroups); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/assignGroupsToResource`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Assigns ResourceRag to resource. The ResourceTag must contain its id, voId and tagName. + * @param inputAssignResourceTagToResource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public assignResourceTagToResource(inputAssignResourceTagToResource: InputAssignResourceTagToResource, observe?: 'body', reportProgress?: boolean): Observable; + public assignResourceTagToResource(inputAssignResourceTagToResource: InputAssignResourceTagToResource, observe?: 'response', reportProgress?: boolean): Observable>; + public assignResourceTagToResource(inputAssignResourceTagToResource: InputAssignResourceTagToResource, observe?: 'events', reportProgress?: boolean): Observable>; + public assignResourceTagToResource(inputAssignResourceTagToResource: InputAssignResourceTagToResource, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputAssignResourceTagToResource === null || inputAssignResourceTagToResource === undefined) { + throw new Error('Required parameter inputAssignResourceTagToResource was null or undefined when calling assignResourceTagToResource.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/resourcesManager/assignResourceTagToResource`, + inputAssignResourceTagToResource, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Assigns service to resource. + * @param resource id of Resource + * @param service id of Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public assignService(resource: number, service: number, observe?: 'body', reportProgress?: boolean): Observable; + public assignService(resource: number, service: number, observe?: 'response', reportProgress?: boolean): Observable>; + public assignService(resource: number, service: number, observe?: 'events', reportProgress?: boolean): Observable>; + public assignService(resource: number, service: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling assignService.'); + } + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling assignService.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/assignService`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Assigns services to resource. + * @param resource id of Resource + * @param services list of Service ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public assignServices(resource: number, services: Array, observe?: 'body', reportProgress?: boolean): Observable; + public assignServices(resource: number, services: Array, observe?: 'response', reportProgress?: boolean): Observable>; + public assignServices(resource: number, services: Array, observe?: 'events', reportProgress?: boolean): Observable>; + public assignServices(resource: number, services: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling assignServices.'); + } + if (services === null || services === undefined) { + throw new Error('Required parameter services was null or undefined when calling assignServices.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (services) { + services.forEach((element) => { + queryParameters = queryParameters.append('services[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/assignServices`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Assign all services from a services package to a resource. + * @param resource id of Resource + * @param servicesPackage id of ServicesPackage + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public assignServicesPackage(resource: number, servicesPackage: number, observe?: 'body', reportProgress?: boolean): Observable; + public assignServicesPackage(resource: number, servicesPackage: number, observe?: 'response', reportProgress?: boolean): Observable>; + public assignServicesPackage(resource: number, servicesPackage: number, observe?: 'events', reportProgress?: boolean): Observable>; + public assignServicesPackage(resource: number, servicesPackage: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling assignServicesPackage.'); + } + if (servicesPackage === null || servicesPackage === undefined) { + throw new Error('Required parameter servicesPackage was null or undefined when calling assignServicesPackage.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (servicesPackage !== undefined && servicesPackage !== null) { + queryParameters = queryParameters.set('servicesPackage', servicesPackage); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/assignServicesPackage`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Copy \"template\" settings from user\'s another existing resource and create new resource with this template. The settings are attributes, services, tags (if exists), groups and their members (if the resources are from the same VO and withGroups is true) Template Resource can be from any of user\'s facilities. + * @param inputCopyResource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyResource(inputCopyResource: InputCopyResource, observe?: 'body', reportProgress?: boolean): Observable; + public copyResource(inputCopyResource: InputCopyResource, observe?: 'response', reportProgress?: boolean): Observable>; + public copyResource(inputCopyResource: InputCopyResource, observe?: 'events', reportProgress?: boolean): Observable>; + public copyResource(inputCopyResource: InputCopyResource, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputCopyResource === null || inputCopyResource === undefined) { + throw new Error('Required parameter inputCopyResource was null or undefined when calling copyResource.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/resourcesManager/copyResource`, + inputCopyResource, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Creates a new resource. + * @param vo id of Vo + * @param facility id of Facility + * @param name name of entity + * @param description optional resource description + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createResource(vo: number, facility: number, name: string, description?: string, observe?: 'body', reportProgress?: boolean): Observable; + public createResource(vo: number, facility: number, name: string, description?: string, observe?: 'response', reportProgress?: boolean): Observable>; + public createResource(vo: number, facility: number, name: string, description?: string, observe?: 'events', reportProgress?: boolean): Observable>; + public createResource(vo: number, facility: number, name: string, description?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling createResource.'); + } + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling createResource.'); + } + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling createResource.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (name !== undefined && name !== null) { + queryParameters = queryParameters.set('name', name); + } + if (description !== undefined && description !== null) { + queryParameters = queryParameters.set('description', description); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/createResource`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Create new resource tag in VO + * @param inputCreateResourceTagWithResourceTag + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createResourceTagWithResourceTag(inputCreateResourceTagWithResourceTag: InputCreateResourceTagWithResourceTag, observe?: 'body', reportProgress?: boolean): Observable; + public createResourceTagWithResourceTag(inputCreateResourceTagWithResourceTag: InputCreateResourceTagWithResourceTag, observe?: 'response', reportProgress?: boolean): Observable>; + public createResourceTagWithResourceTag(inputCreateResourceTagWithResourceTag: InputCreateResourceTagWithResourceTag, observe?: 'events', reportProgress?: boolean): Observable>; + public createResourceTagWithResourceTag(inputCreateResourceTagWithResourceTag: InputCreateResourceTagWithResourceTag, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputCreateResourceTagWithResourceTag === null || inputCreateResourceTagWithResourceTag === undefined) { + throw new Error('Required parameter inputCreateResourceTagWithResourceTag was null or undefined when calling createResourceTagWithResourceTag.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/resourcesManager/createResourceTag/resourceTag`, + inputCreateResourceTagWithResourceTag, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Create new resource tag defined by tag name in VO + * @param tagName tagName + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createResourceTagWithTagName(tagName: string, vo: number, observe?: 'body', reportProgress?: boolean): Observable; + public createResourceTagWithTagName(tagName: string, vo: number, observe?: 'response', reportProgress?: boolean): Observable>; + public createResourceTagWithTagName(tagName: string, vo: number, observe?: 'events', reportProgress?: boolean): Observable>; + public createResourceTagWithTagName(tagName: string, vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (tagName === null || tagName === undefined) { + throw new Error('Required parameter tagName was null or undefined when calling createResourceTagWithTagName.'); + } + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling createResourceTagWithTagName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (tagName !== undefined && tagName !== null) { + queryParameters = queryParameters.set('tagName', tagName); + } + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/createResourceTag/tagName`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Deactivates the group-resource assignment. The assignment will become INACTIVE and will not be used to allow users from the given group to the resource. + * @param group id of Group + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deactivateGroupResourceAssignment(group: number, resource: number, observe?: 'body', reportProgress?: boolean): Observable; + public deactivateGroupResourceAssignment(group: number, resource: number, observe?: 'response', reportProgress?: boolean): Observable>; + public deactivateGroupResourceAssignment(group: number, resource: number, observe?: 'events', reportProgress?: boolean): Observable>; + public deactivateGroupResourceAssignment(group: number, resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling deactivateGroupResourceAssignment.'); + } + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling deactivateGroupResourceAssignment.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/deactivateGroupResourceAssignment`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Deletes all VO resources + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteAllResources(vo: number, observe?: 'body', reportProgress?: boolean): Observable; + public deleteAllResources(vo: number, observe?: 'response', reportProgress?: boolean): Observable>; + public deleteAllResources(vo: number, observe?: 'events', reportProgress?: boolean): Observable>; + public deleteAllResources(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling deleteAllResources.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/deleteAllResources`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Delete all resources tags of VO + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteAllResourcesTagsForVo(vo: number, observe?: 'body', reportProgress?: boolean): Observable; + public deleteAllResourcesTagsForVo(vo: number, observe?: 'response', reportProgress?: boolean): Observable>; + public deleteAllResourcesTagsForVo(vo: number, observe?: 'events', reportProgress?: boolean): Observable>; + public deleteAllResourcesTagsForVo(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling deleteAllResourcesTagsForVo.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/deleteAllResourcesTagsForVo`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Deletes a resource. + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteResource(resource: number, observe?: 'body', reportProgress?: boolean): Observable; + public deleteResource(resource: number, observe?: 'response', reportProgress?: boolean): Observable>; + public deleteResource(resource: number, observe?: 'events', reportProgress?: boolean): Observable>; + public deleteResource(resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling deleteResource.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/deleteResource`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Delete resource tag by it\'s id and VO_ID + * @param inputDeleteResourceTag + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteResourceTag(inputDeleteResourceTag: InputDeleteResourceTag, observe?: 'body', reportProgress?: boolean): Observable; + public deleteResourceTag(inputDeleteResourceTag: InputDeleteResourceTag, observe?: 'response', reportProgress?: boolean): Observable>; + public deleteResourceTag(inputDeleteResourceTag: InputDeleteResourceTag, observe?: 'events', reportProgress?: boolean): Observable>; + public deleteResourceTag(inputDeleteResourceTag: InputDeleteResourceTag, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputDeleteResourceTag === null || inputDeleteResourceTag === undefined) { + throw new Error('Required parameter inputDeleteResourceTag was null or undefined when calling deleteResourceTag.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/resourcesManager/deleteResourceTag`, + inputDeleteResourceTag, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all Resource group admins. + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAdminGroups(resource: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAdminGroups(resource: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAdminGroups(resource: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAdminGroups(resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getAdminGroups.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getAdminGroups`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get list of all resource administrators for supported role and given resource. + * If onlyDirectAdmins is == true, return only direct admins of the group for supported role. Otherwise include users who are VALID members of administrator groups. Supported roles are ResourceAdmin, VOAdmin. + * @param resource id of Resource + * @param onlyDirectAdmins boolean if true, get only direct resource administrators (if false, get both direct and indirect) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAdmins(resource: number, onlyDirectAdmins: boolean, observe?: 'body', reportProgress?: boolean): Observable>; + public getAdmins(resource: number, onlyDirectAdmins: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAdmins(resource: number, onlyDirectAdmins: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAdmins(resource: number, onlyDirectAdmins: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getAdmins.'); + } + if (onlyDirectAdmins === null || onlyDirectAdmins === undefined) { + throw new Error('Required parameter onlyDirectAdmins was null or undefined when calling getAdmins.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (onlyDirectAdmins !== undefined && onlyDirectAdmins !== null) { + queryParameters = queryParameters.set('onlyDirectAdmins', onlyDirectAdmins); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getAdmins`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all resources with the specific tag assigned. + * @param inputGetAllResourcesByResourceTag + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllResourcesByResourceTag(inputGetAllResourcesByResourceTag: InputGetAllResourcesByResourceTag, observe?: 'body', reportProgress?: boolean): Observable>; + public getAllResourcesByResourceTag(inputGetAllResourcesByResourceTag: InputGetAllResourcesByResourceTag, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllResourcesByResourceTag(inputGetAllResourcesByResourceTag: InputGetAllResourcesByResourceTag, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllResourcesByResourceTag(inputGetAllResourcesByResourceTag: InputGetAllResourcesByResourceTag, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputGetAllResourcesByResourceTag === null || inputGetAllResourcesByResourceTag === undefined) { + throw new Error('Required parameter inputGetAllResourcesByResourceTag was null or undefined when calling getAllResourcesByResourceTag.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post>(`${this.configuration.basePath}/json/resourcesManager/getAllResourcesByResourceTag`, + inputGetAllResourcesByResourceTag, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Gets all resource tags of Resource. + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllResourcesTagsForResource(resource: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAllResourcesTagsForResource(resource: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllResourcesTagsForResource(resource: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllResourcesTagsForResource(resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getAllResourcesTagsForResource.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getAllResourcesTagsForResource`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Gets all resource tags of VO. + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllResourcesTagsForVo(vo: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAllResourcesTagsForVo(vo: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllResourcesTagsForVo(vo: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllResourcesTagsForVo(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getAllResourcesTagsForVo.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getAllResourcesTagsForVo`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns list of Resources, where the user is an Administrator. + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllResourcesWhereUserIsAdmin(user: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAllResourcesWhereUserIsAdmin(user: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllResourcesWhereUserIsAdmin(user: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllResourcesWhereUserIsAdmin(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getAllResourcesWhereUserIsAdmin.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getResourcesWhereUserIsAdmin/all`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns all members assigned to the resource. + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllowedMembers(resource: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAllowedMembers(resource: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllowedMembers(resource: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllowedMembers(resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getAllowedMembers.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getAllowedMembers`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all resources which have the member access on. + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllowedResources(member: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAllowedResources(member: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllowedResources(member: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllowedResources(member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getAllowedResources.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getAllowedResources`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns all users assigned to the resource. + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllowedUsersOfResource(resource: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAllowedUsersOfResource(resource: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllowedUsersOfResource(resource: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllowedUsersOfResource(resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getAllowedUsersOfResource.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getAllowedUsers`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * List all groups associated with the resource and optionally a member. + * @param resource id of Resource + * @param member optional member id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedGroups(resource: number, member?: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAssignedGroups(resource: number, member?: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAssignedGroups(resource: number, member?: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAssignedGroups(resource: number, member?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getAssignedGroups.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getAssignedGroups`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns all members assigned to the resource. + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedMembers(resource: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAssignedMembers(resource: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAssignedMembers(resource: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAssignedMembers(resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getAssignedMembers.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getAssignedMembers`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns members of groups assigned to resource with status of group-resource assignment. + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedMembersWithStatus(resource: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAssignedMembersWithStatus(resource: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAssignedMembersWithStatus(resource: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAssignedMembersWithStatus(resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getAssignedMembersWithStatus.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getAssignedMembersWithStatus`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * List all resources to which the group is assigned. + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedResourcesWithGroup(group: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAssignedResourcesWithGroup(group: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAssignedResourcesWithGroup(group: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAssignedResourcesWithGroup(group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getAssignedResourcesWithGroup.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getAssignedResources/g`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * List all resources associated with a member\'s group. + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedResourcesWithMember(member: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAssignedResourcesWithMember(member: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAssignedResourcesWithMember(member: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAssignedResourcesWithMember(member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getAssignedResourcesWithMember.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getAssignedResources/m`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns all assigned resources with statuses where member is assigned through the groups. + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedResourcesWithStatus(member: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAssignedResourcesWithStatus(member: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAssignedResourcesWithStatus(member: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAssignedResourcesWithStatus(member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getAssignedResourcesWithStatus.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getAssignedResourcesWithStatus`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns all members assigned to the resource as RichMembers. + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedRichMembers(resource: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAssignedRichMembers(resource: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAssignedRichMembers(resource: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAssignedRichMembers(resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getAssignedRichMembers.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getAssignedRichMembers`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * List all rich resources associated with a group. + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedRichResourcesWithGroup(group: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAssignedRichResourcesWithGroup(group: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAssignedRichResourcesWithGroup(group: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAssignedRichResourcesWithGroup(group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getAssignedRichResourcesWithGroup.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getAssignedRichResources/g`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * List all rich resources associated with a member\'s group. + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedRichResourcesWithMember(member: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAssignedRichResourcesWithMember(member: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAssignedRichResourcesWithMember(member: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAssignedRichResourcesWithMember(member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getAssignedRichResourcesWithMember.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getAssignedRichResources/m`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all rich resources where the service and the member are assigned with facility property filled. + * @param member id of Member + * @param service id of Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedRichResourcesWithMemberService(member: number, service: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAssignedRichResourcesWithMemberService(member: number, service: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAssignedRichResourcesWithMemberService(member: number, service: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAssignedRichResourcesWithMemberService(member: number, service: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getAssignedRichResourcesWithMemberService.'); + } + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling getAssignedRichResourcesWithMemberService.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getAssignedRichResources/s-m`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * List all services associated with the resource. + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedServicesToResource(resource: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAssignedServicesToResource(resource: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAssignedServicesToResource(resource: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAssignedServicesToResource(resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getAssignedServicesToResource.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getAssignedServices`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all bans for member on any resource. + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getBansForMember(member: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getBansForMember(member: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getBansForMember(member: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getBansForMember(member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getBansForMember.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getBansForMember`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all bans for members on the resource. + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getBansForResource(resource: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getBansForResource(resource: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getBansForResource(resource: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getBansForResource(resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getBansForResource.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getBansForResource`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Find resource for given id and returns it with given attributes. If attrNames are null or empty, all resource attributes are returned. + * @param id numeric id + * @param attrNames list of attribute names List<String> or null + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getEnrichedResourceById(id: number, attrNames?: Array, observe?: 'body', reportProgress?: boolean): Observable; + public getEnrichedResourceById(id: number, attrNames?: Array, observe?: 'response', reportProgress?: boolean): Observable>; + public getEnrichedResourceById(id: number, attrNames?: Array, observe?: 'events', reportProgress?: boolean): Observable>; + public getEnrichedResourceById(id: number, attrNames?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getEnrichedResourceById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/resourcesManager/getEnrichedResourceById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Find resources for given facility and attributes for given names. If the attrNames are empty or null, return all attributes. + * @param facility id of Facility + * @param attrNames list of attribute names List<String> or null + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getEnrichedResourcesForFacility(facility: number, attrNames?: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getEnrichedResourcesForFacility(facility: number, attrNames?: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getEnrichedResourcesForFacility(facility: number, attrNames?: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getEnrichedResourcesForFacility(facility: number, attrNames?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getEnrichedResourcesForFacility.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getEnrichedResourcesForFacility`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Find resources for given vo and attributes for given names. If the attrNames are empty or null, return all attributes. + * @param vo id of Vo + * @param attrNames list of attribute names List<String> or null + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getEnrichedResourcesForVo(vo: number, attrNames?: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getEnrichedResourcesForVo(vo: number, attrNames?: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getEnrichedResourcesForVo(vo: number, attrNames?: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getEnrichedResourcesForVo(vo: number, attrNames?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getEnrichedResourcesForVo.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getEnrichedResourcesForVo`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get facility which belongs to a specific resource. + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacility(resource: number, observe?: 'body', reportProgress?: boolean): Observable; + public getFacility(resource: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getFacility(resource: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getFacility(resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getFacility.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/resourcesManager/getFacility`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Lists all of the assigned groups for the given resource. Also, returns specified attributes for the groups. + * @param resource id of Resource + * @param attrNames list of attribute names List<String> or null + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupAssignments(resource: number, attrNames?: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getGroupAssignments(resource: number, attrNames?: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getGroupAssignments(resource: number, attrNames?: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getGroupAssignments(resource: number, attrNames?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getGroupAssignments.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getGroupAssignments`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Lists all of the resource assignments for the given group. Also, returns specified attributes for the resources and resource tags. + * @param group id of Group + * @param attrNames list of attribute names List<String> or null + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourceAssignments(group: number, attrNames?: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getResourceAssignments(group: number, attrNames?: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getResourceAssignments(group: number, attrNames?: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getResourceAssignments(group: number, attrNames?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getResourceAssignments.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getResourceAssignments`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get ban by memberId and resource id. + * @param member id of Member + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourceBan(member: number, resource: number, observe?: 'body', reportProgress?: boolean): Observable; + public getResourceBan(member: number, resource: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getResourceBan(member: number, resource: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getResourceBan(member: number, resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getResourceBan.'); + } + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getResourceBan.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/resourcesManager/getBan`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get Ban for member on resource by it\'s id. + * @param banId BanOnResource id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourceBanById(banId: number, observe?: 'body', reportProgress?: boolean): Observable; + public getResourceBanById(banId: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getResourceBanById(banId: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getResourceBanById(banId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (banId === null || banId === undefined) { + throw new Error('Required parameter banId was null or undefined when calling getResourceBanById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (banId !== undefined && banId !== null) { + queryParameters = queryParameters.set('banId', banId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/resourcesManager/getBanById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns a resource by id. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourceById(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public getResourceById(id: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getResourceById(id: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getResourceById(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getResourceById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/resourcesManager/getResourceById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns resource by its name, Vo id and Facility id. + * @param vo id of Vo + * @param facility id of Facility + * @param name name of entity + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourceByName(vo: number, facility: number, name: string, observe?: 'body', reportProgress?: boolean): Observable; + public getResourceByName(vo: number, facility: number, name: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getResourceByName(vo: number, facility: number, name: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getResourceByName(vo: number, facility: number, name: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getResourceByName.'); + } + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getResourceByName.'); + } + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling getResourceByName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (name !== undefined && name !== null) { + queryParameters = queryParameters.set('name', name); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/resourcesManager/getResourceByName`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all VO resources. + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResources(vo: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getResources(vo: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getResources(vo: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getResources(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getResources.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getResources`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns list of Resources by their ids. + * @param ids list of ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourcesByIds(ids: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getResourcesByIds(ids: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getResourcesByIds(ids: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getResourcesByIds(ids: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (ids === null || ids === undefined) { + throw new Error('Required parameter ids was null or undefined when calling getResourcesByIds.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (ids) { + ids.forEach((element) => { + queryParameters = queryParameters.append('ids[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getResourcesByIds`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Gets count of all users. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourcesCountForAll(observe?: 'body', reportProgress?: boolean): Observable; + public getResourcesCountForAll(observe?: 'response', reportProgress?: boolean): Observable>; + public getResourcesCountForAll(observe?: 'events', reportProgress?: boolean): Observable>; + public getResourcesCountForAll(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/resourcesManager/getResourcesCount/all`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns number of VO resources + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourcesCountForVo(vo: number, observe?: 'body', reportProgress?: boolean): Observable; + public getResourcesCountForVo(vo: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getResourcesCountForVo(vo: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getResourcesCountForVo(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getResourcesCountForVo.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/resourcesManager/getResourcesCount/vo`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns list of Resources for specified VO, where the user is an Administrator. + * @param vo id of Vo + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourcesFromVoWhereUserIsAdmin(vo: number, user: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getResourcesFromVoWhereUserIsAdmin(vo: number, user: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getResourcesFromVoWhereUserIsAdmin(vo: number, user: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getResourcesFromVoWhereUserIsAdmin(vo: number, user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getResourcesFromVoWhereUserIsAdmin.'); + } + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getResourcesFromVoWhereUserIsAdmin.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getResourcesWhereUserIsAdmin/fromVo`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns list of Resources for specified VO and Facility, where the group is an Administrator. + * @param facility id of Facility + * @param vo id of Vo + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourcesWhereGroupIsAdmin(facility: number, vo: number, group: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getResourcesWhereGroupIsAdmin(facility: number, vo: number, group: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getResourcesWhereGroupIsAdmin(facility: number, vo: number, group: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getResourcesWhereGroupIsAdmin(facility: number, vo: number, group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getResourcesWhereGroupIsAdmin.'); + } + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getResourcesWhereGroupIsAdmin.'); + } + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getResourcesWhereGroupIsAdmin.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getResourcesWhereUserIsAdmin/group`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns list of Resources for specified VO and Facility, where the user is a direct Administrator or a VALID member of an administrator group. + * @param facility id of Facility + * @param vo id of Vo + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourcesWhereUserIsAdmin(facility: number, vo: number, user: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getResourcesWhereUserIsAdmin(facility: number, vo: number, user: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getResourcesWhereUserIsAdmin(facility: number, vo: number, user: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getResourcesWhereUserIsAdmin(facility: number, vo: number, user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getResourcesWhereUserIsAdmin.'); + } + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getResourcesWhereUserIsAdmin.'); + } + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getResourcesWhereUserIsAdmin.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getResourcesWhereUserIsAdmin`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get list of all richUser administrators for the resource and supported role with specific attributes. If some group is administrator of the given group, all VALID members are included in the list. Supported roles: ResourceAdmin, VOAdmin If \"onlyDirectAdmins\" is true, return only direct admins of the resource for supported role with specific attributes. If \"allUserAttributes\" is true, do not specify attributes through list and return them all in objects richUser. Ignoring list of specific attributes. + * @param resource id of Resource + * @param specificAttributes list of specified attributes which are needed in object richUser + * @param allUserAttributes if == true, get all possible user attributes and ignore list of specificAttributes (if false, get only specific attributes) + * @param onlyDirectAdmins if == true, get only direct resource administrators (if false, get both direct and indirect) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRichAdmins(resource: number, specificAttributes: Array, allUserAttributes: boolean, onlyDirectAdmins: boolean, observe?: 'body', reportProgress?: boolean): Observable>; + public getRichAdmins(resource: number, specificAttributes: Array, allUserAttributes: boolean, onlyDirectAdmins: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; + public getRichAdmins(resource: number, specificAttributes: Array, allUserAttributes: boolean, onlyDirectAdmins: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; + public getRichAdmins(resource: number, specificAttributes: Array, allUserAttributes: boolean, onlyDirectAdmins: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getRichAdmins.'); + } + if (specificAttributes === null || specificAttributes === undefined) { + throw new Error('Required parameter specificAttributes was null or undefined when calling getRichAdmins.'); + } + if (allUserAttributes === null || allUserAttributes === undefined) { + throw new Error('Required parameter allUserAttributes was null or undefined when calling getRichAdmins.'); + } + if (onlyDirectAdmins === null || onlyDirectAdmins === undefined) { + throw new Error('Required parameter onlyDirectAdmins was null or undefined when calling getRichAdmins.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (specificAttributes) { + specificAttributes.forEach((element) => { + queryParameters = queryParameters.append('specificAttributes', element); + }) + } + if (allUserAttributes !== undefined && allUserAttributes !== null) { + queryParameters = queryParameters.set('allUserAttributes', allUserAttributes); + } + if (onlyDirectAdmins !== undefined && onlyDirectAdmins !== null) { + queryParameters = queryParameters.set('onlyDirectAdmins', onlyDirectAdmins); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getRichAdmins`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns RichResource by id (also containing facility and VO inside). + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRichResourceById(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public getRichResourceById(id: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getRichResourceById(id: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getRichResourceById(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getRichResourceById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/resourcesManager/getRichResourceById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all VO rich resources. + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRichResources(vo: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getRichResources(vo: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getRichResources(vo: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getRichResources(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getRichResources.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getRichResources`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns list of RichResources by their ids. + * @param ids list of ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRichResourcesByIds(ids: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getRichResourcesByIds(ids: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getRichResourcesByIds(ids: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getRichResourcesByIds(ids: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (ids === null || ids === undefined) { + throw new Error('Required parameter ids was null or undefined when calling getRichResourcesByIds.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (ids) { + ids.forEach((element) => { + queryParameters = queryParameters.append('ids[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getRichResourcesByIds`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns Vo which is tied to a specific resource. + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVo(resource: number, observe?: 'body', reportProgress?: boolean): Observable; + public getVo(resource: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getVo(resource: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getVo(resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getVo.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/resourcesManager/getVo`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Removes all resources tags from a resource. + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeAllResourceTagsFromResource(resource: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeAllResourceTagsFromResource(resource: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeAllResourceTagsFromResource(resource: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeAllResourceTagsFromResource(resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling removeAllResourceTagsFromResource.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/removeAllResourcesTagFromResource`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove specific ban by memberId and resourceId. + * @param member id of Member + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeBanByMemberAndResource(member: number, resource: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeBanByMemberAndResource(member: number, resource: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeBanByMemberAndResource(member: number, resource: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeBanByMemberAndResource(member: number, resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling removeBanByMemberAndResource.'); + } + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling removeBanByMemberAndResource.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/removeBan/member-resource-id`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Removes a group administrator of the Resource. + * @param resource id of Resource + * @param authorizedGroup Group id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeGroupAdminResource(resource: number, authorizedGroup: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeGroupAdminResource(resource: number, authorizedGroup: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeGroupAdminResource(resource: number, authorizedGroup: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeGroupAdminResource(resource: number, authorizedGroup: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling removeGroupAdminResource.'); + } + if (authorizedGroup === null || authorizedGroup === undefined) { + throw new Error('Required parameter authorizedGroup was null or undefined when calling removeGroupAdminResource.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (authorizedGroup !== undefined && authorizedGroup !== null) { + queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/removeAdmin/r-g`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove a group from a resource. After removing, check attributes and fix them if it is needed. + * @param group id of Group + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeGroupFromResource(group: number, resource: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeGroupFromResource(group: number, resource: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeGroupFromResource(group: number, resource: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeGroupFromResource(group: number, resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling removeGroupFromResource.'); + } + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling removeGroupFromResource.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/removeGroupFromResource`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove a group from resource. After removing, check attributes and fix them if it is needed. + * @param group id of Group + * @param resources list of Resource ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeGroupFromResources(group: number, resources: Array, observe?: 'body', reportProgress?: boolean): Observable; + public removeGroupFromResources(group: number, resources: Array, observe?: 'response', reportProgress?: boolean): Observable>; + public removeGroupFromResources(group: number, resources: Array, observe?: 'events', reportProgress?: boolean): Observable>; + public removeGroupFromResources(group: number, resources: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling removeGroupFromResources.'); + } + if (resources === null || resources === undefined) { + throw new Error('Required parameter resources was null or undefined when calling removeGroupFromResources.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (resources) { + resources.forEach((element) => { + queryParameters = queryParameters.append('resources[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/removeGroupFromResources`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove groups from a resource. After removing, check attributes and fix them if it is needed. + * @param groups list of Group ids List<Integer> + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeGroupsFromResource(groups: Array, resource: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeGroupsFromResource(groups: Array, resource: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeGroupsFromResource(groups: Array, resource: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeGroupsFromResource(groups: Array, resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (groups === null || groups === undefined) { + throw new Error('Required parameter groups was null or undefined when calling removeGroupsFromResource.'); + } + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling removeGroupsFromResource.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (groups) { + groups.forEach((element) => { + queryParameters = queryParameters.append('groups[]', element); + }) + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/removeGroupsFromResource`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove specific ban by it\'s id. + * @param banId BanOnResource id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeResourceBanById(banId: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeResourceBanById(banId: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeResourceBanById(banId: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeResourceBanById(banId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (banId === null || banId === undefined) { + throw new Error('Required parameter banId was null or undefined when calling removeResourceBanById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (banId !== undefined && banId !== null) { + queryParameters = queryParameters.set('banId', banId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/removeBan/id`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Unset ResourceSelfService role to given group for given resource. + * @param resource id of Resource + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeResourceSelfServiceGroup(resource: number, group: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeResourceSelfServiceGroup(resource: number, group: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeResourceSelfServiceGroup(resource: number, group: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeResourceSelfServiceGroup(resource: number, group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling removeResourceSelfServiceGroup.'); + } + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling removeResourceSelfServiceGroup.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/removeResourceSelfServiceGroup`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Unset ResourceSelfService role to given user for given resource. + * @param resource id of Resource + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeResourceSelfServiceUser(resource: number, user: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeResourceSelfServiceUser(resource: number, user: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeResourceSelfServiceUser(resource: number, user: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeResourceSelfServiceUser(resource: number, user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling removeResourceSelfServiceUser.'); + } + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling removeResourceSelfServiceUser.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/removeResourceSelfServiceUser`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Removes ResourceRag from a resource. The ResourceTag must contain its id, voId and tagName. + * @param inputRemoveResourceTagFromResource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeResourceTagFromResource(inputRemoveResourceTagFromResource: InputRemoveResourceTagFromResource, observe?: 'body', reportProgress?: boolean): Observable; + public removeResourceTagFromResource(inputRemoveResourceTagFromResource: InputRemoveResourceTagFromResource, observe?: 'response', reportProgress?: boolean): Observable>; + public removeResourceTagFromResource(inputRemoveResourceTagFromResource: InputRemoveResourceTagFromResource, observe?: 'events', reportProgress?: boolean): Observable>; + public removeResourceTagFromResource(inputRemoveResourceTagFromResource: InputRemoveResourceTagFromResource, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputRemoveResourceTagFromResource === null || inputRemoveResourceTagFromResource === undefined) { + throw new Error('Required parameter inputRemoveResourceTagFromResource was null or undefined when calling removeResourceTagFromResource.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/resourcesManager/removeResourceTagFromResource`, + inputRemoveResourceTagFromResource, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Removes a service from a resource. + * @param resource id of Resource + * @param service id of Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeService(resource: number, service: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeService(resource: number, service: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeService(resource: number, service: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeService(resource: number, service: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling removeService.'); + } + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling removeService.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/removeService`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Removes services from a resource. + * @param resource id of Resource + * @param services list of Service ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeServices(resource: number, services: Array, observe?: 'body', reportProgress?: boolean): Observable; + public removeServices(resource: number, services: Array, observe?: 'response', reportProgress?: boolean): Observable>; + public removeServices(resource: number, services: Array, observe?: 'events', reportProgress?: boolean): Observable>; + public removeServices(resource: number, services: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling removeServices.'); + } + if (services === null || services === undefined) { + throw new Error('Required parameter services was null or undefined when calling removeServices.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (services) { + services.forEach((element) => { + queryParameters = queryParameters.append('services[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/removeServices`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove from resource all services from services package. + * @param resource id of Resource + * @param servicesPackage id of ServicesPackage + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeServicesPackage(resource: number, servicesPackage: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeServicesPackage(resource: number, servicesPackage: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeServicesPackage(resource: number, servicesPackage: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeServicesPackage(resource: number, servicesPackage: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling removeServicesPackage.'); + } + if (servicesPackage === null || servicesPackage === undefined) { + throw new Error('Required parameter servicesPackage was null or undefined when calling removeServicesPackage.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (servicesPackage !== undefined && servicesPackage !== null) { + queryParameters = queryParameters.set('servicesPackage', servicesPackage); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/removeServicesPackage`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Removes a Resource admin. + * @param resource id of Resource + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeUserAdminResource(resource: number, user: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeUserAdminResource(resource: number, user: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeUserAdminResource(resource: number, user: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeUserAdminResource(resource: number, user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling removeUserAdminResource.'); + } + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling removeUserAdminResource.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/removeAdmin/r-u`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Set ban for member on resource. + * @param inputSetBan + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setResourceBan(inputSetBan: InputSetBan, observe?: 'body', reportProgress?: boolean): Observable; + public setResourceBan(inputSetBan: InputSetBan, observe?: 'response', reportProgress?: boolean): Observable>; + public setResourceBan(inputSetBan: InputSetBan, observe?: 'events', reportProgress?: boolean): Observable>; + public setResourceBan(inputSetBan: InputSetBan, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetBan === null || inputSetBan === undefined) { + throw new Error('Required parameter inputSetBan was null or undefined when calling setResourceBan.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/resourcesManager/setBan`, + inputSetBan, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Unassigns given groups from the given resources. + * @param groups list of Group ids List<Integer> + * @param resources list of Resource ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public unallowGroupsFromResources(groups: Array, resources: Array, observe?: 'body', reportProgress?: boolean): Observable; + public unallowGroupsFromResources(groups: Array, resources: Array, observe?: 'response', reportProgress?: boolean): Observable>; + public unallowGroupsFromResources(groups: Array, resources: Array, observe?: 'events', reportProgress?: boolean): Observable>; + public unallowGroupsFromResources(groups: Array, resources: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (groups === null || groups === undefined) { + throw new Error('Required parameter groups was null or undefined when calling unallowGroupsFromResources.'); + } + if (resources === null || resources === undefined) { + throw new Error('Required parameter resources was null or undefined when calling unallowGroupsFromResources.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (groups) { + groups.forEach((element) => { + queryParameters = queryParameters.append('groups[]', element); + }) + } + if (resources) { + resources.forEach((element) => { + queryParameters = queryParameters.append('resources[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/unallowGroupsFromResources`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Updates a resource. + * @param inputUpdateResource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateResource(inputUpdateResource: InputUpdateResource, observe?: 'body', reportProgress?: boolean): Observable; + public updateResource(inputUpdateResource: InputUpdateResource, observe?: 'response', reportProgress?: boolean): Observable>; + public updateResource(inputUpdateResource: InputUpdateResource, observe?: 'events', reportProgress?: boolean): Observable>; + public updateResource(inputUpdateResource: InputUpdateResource, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputUpdateResource === null || inputUpdateResource === undefined) { + throw new Error('Required parameter inputUpdateResource was null or undefined when calling updateResource.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/resourcesManager/updateResource`, + inputUpdateResource, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Update existing ban (description, validation timestamp) + * @param inputUpdateBan + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateResourceBan(inputUpdateBan: InputUpdateBan, observe?: 'body', reportProgress?: boolean): Observable; + public updateResourceBan(inputUpdateBan: InputUpdateBan, observe?: 'response', reportProgress?: boolean): Observable>; + public updateResourceBan(inputUpdateBan: InputUpdateBan, observe?: 'events', reportProgress?: boolean): Observable>; + public updateResourceBan(inputUpdateBan: InputUpdateBan, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputUpdateBan === null || inputUpdateBan === undefined) { + throw new Error('Required parameter inputUpdateBan was null or undefined when calling updateResourceBan.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/resourcesManager/updateBan`, + inputUpdateBan, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Update resource tag name by it\'s id and VO_ID + * @param inputUpdateResourceTag + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateResourceTag(inputUpdateResourceTag: InputUpdateResourceTag, observe?: 'body', reportProgress?: boolean): Observable; + public updateResourceTag(inputUpdateResourceTag: InputUpdateResourceTag, observe?: 'response', reportProgress?: boolean): Observable>; + public updateResourceTag(inputUpdateResourceTag: InputUpdateResourceTag, observe?: 'events', reportProgress?: boolean): Observable>; + public updateResourceTag(inputUpdateResourceTag: InputUpdateResourceTag, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputUpdateResourceTag === null || inputUpdateResourceTag === undefined) { + throw new Error('Required parameter inputUpdateResourceTag was null or undefined when calling updateResourceTag.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/resourcesManager/updateResourceTag`, + inputUpdateResourceTag, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } - return this.httpClient.post( - `${this.configuration.basePath}/json/resourcesManager/updateResourceTag`, - inputUpdateResourceTag, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } } diff --git a/libs/perun/openapi/src/lib/api/servicesManager.service.ts b/libs/perun/openapi/src/lib/api/servicesManager.service.ts index 377029e03..4caf2dc82 100644 --- a/libs/perun/openapi/src/lib/api/servicesManager.service.ts +++ b/libs/perun/openapi/src/lib/api/servicesManager.service.ts @@ -11,17 +11,11 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { Destination } from '../model/destination'; import { DestinationPropagationType } from '../model/destinationPropagationType'; @@ -41,5817 +35,4200 @@ import { ServiceAttributes } from '../model/serviceAttributes'; import { ServiceForGUI } from '../model/serviceForGUI'; import { ServicesPackage } from '../model/servicesPackage'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class ServicesManagerService { - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration - ) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - /** - * Adds an destination for a facility and service. If destination doesn\'t exist it will be created. - * InvalidDestinationException is thrown when destination value is invalid in given destination type. - * @param service id of Service - * @param facility id of Facility - * @param destination Destination\'s destination, usually a DNS name - * @param type Destination\'s type - * @param propagationType Destination\'s propagationType - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addDestination( - service: number, - facility: number, - destination: string, - type: DestinationType, - propagationType?: DestinationPropagationType, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public addDestination( - service: number, - facility: number, - destination: string, - type: DestinationType, - propagationType?: DestinationPropagationType, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public addDestination( - service: number, - facility: number, - destination: string, - type: DestinationType, - propagationType?: DestinationPropagationType, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public addDestination( - service: number, - facility: number, - destination: string, - type: DestinationType, - propagationType?: DestinationPropagationType, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling addDestination.' - ); - } - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling addDestination.' - ); - } - if (destination === null || destination === undefined) { - throw new Error( - 'Required parameter destination was null or undefined when calling addDestination.' - ); - } - if (type === null || type === undefined) { - throw new Error('Required parameter type was null or undefined when calling addDestination.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (destination !== undefined && destination !== null) { - queryParameters = queryParameters.set('destination', destination); - } - if (type !== undefined && type !== null) { - queryParameters = queryParameters.set('type', type); - } - if (propagationType !== undefined && propagationType !== null) { - queryParameters = queryParameters.set('propagationType', propagationType); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/servicesManager/addDestination`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Adds an destination for a facility and list of services. If destination doesn\'t exist it will be created. InvalidDestinationException is thrown when destination value is invalid in given destination type. - * @param inputAddDestinationToMultipleServices - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addDestinationToMultipleServices( - inputAddDestinationToMultipleServices: InputAddDestinationToMultipleServices, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public addDestinationToMultipleServices( - inputAddDestinationToMultipleServices: InputAddDestinationToMultipleServices, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public addDestinationToMultipleServices( - inputAddDestinationToMultipleServices: InputAddDestinationToMultipleServices, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public addDestinationToMultipleServices( - inputAddDestinationToMultipleServices: InputAddDestinationToMultipleServices, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if ( - inputAddDestinationToMultipleServices === null || - inputAddDestinationToMultipleServices === undefined - ) { - throw new Error( - 'Required parameter inputAddDestinationToMultipleServices was null or undefined when calling addDestinationToMultipleServices.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/servicesManager/addDestination`, - inputAddDestinationToMultipleServices, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Add services destinations for one service. Destinations names are taken from all facility\'s host hostnames. - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addDestinationsDefinedByHostsOnFacilityWithFacility( - facility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public addDestinationsDefinedByHostsOnFacilityWithFacility( - facility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public addDestinationsDefinedByHostsOnFacilityWithFacility( - facility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public addDestinationsDefinedByHostsOnFacilityWithFacility( - facility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling addDestinationsDefinedByHostsOnFacilityWithFacility.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post>( - `${this.configuration.basePath}/urlinjsonout/servicesManager/addDestinationsDefinedByHostsOnFacility/f`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Add services destinations for list of services. Destinations names are taken from all facility\'s host hostnames. - * @param inputAddDestinationsDefinedByHostsOnFacility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addDestinationsDefinedByHostsOnFacilityWithListOfServiceAndFacility( - inputAddDestinationsDefinedByHostsOnFacility: InputAddDestinationsDefinedByHostsOnFacility, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public addDestinationsDefinedByHostsOnFacilityWithListOfServiceAndFacility( - inputAddDestinationsDefinedByHostsOnFacility: InputAddDestinationsDefinedByHostsOnFacility, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public addDestinationsDefinedByHostsOnFacilityWithListOfServiceAndFacility( - inputAddDestinationsDefinedByHostsOnFacility: InputAddDestinationsDefinedByHostsOnFacility, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public addDestinationsDefinedByHostsOnFacilityWithListOfServiceAndFacility( - inputAddDestinationsDefinedByHostsOnFacility: InputAddDestinationsDefinedByHostsOnFacility, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if ( - inputAddDestinationsDefinedByHostsOnFacility === null || - inputAddDestinationsDefinedByHostsOnFacility === undefined - ) { - throw new Error( - 'Required parameter inputAddDestinationsDefinedByHostsOnFacility was null or undefined when calling addDestinationsDefinedByHostsOnFacilityWithListOfServiceAndFacility.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post>( - `${this.configuration.basePath}/json/servicesManager/addDestinationsDefinedByHostsOnFacility/lists-f`, - inputAddDestinationsDefinedByHostsOnFacility, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Add services destinations for all services currently available on facility (assigned to all facility\'s resources). Destinations names are taken from all facility\'s host hostnames. - * @param service id of Service - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addDestinationsDefinedByHostsOnFacilityWithServiceAndFacility( - service: number, - facility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public addDestinationsDefinedByHostsOnFacilityWithServiceAndFacility( - service: number, - facility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public addDestinationsDefinedByHostsOnFacilityWithServiceAndFacility( - service: number, - facility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public addDestinationsDefinedByHostsOnFacilityWithServiceAndFacility( - service: number, - facility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling addDestinationsDefinedByHostsOnFacilityWithServiceAndFacility.' - ); - } - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling addDestinationsDefinedByHostsOnFacilityWithServiceAndFacility.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post>( - `${this.configuration.basePath}/urlinjsonout/servicesManager/addDestinationsDefinedByHostsOnFacility/s-f`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Adds destination for all services defined on the facility. - * InvalidDestinationException is thrown when destination value is invalid in given destination type. - * @param facility id of Facility - * @param destination string name of destination - * @param type Destination type (host,user@host,user@host:port,url,mail,service-specific) - * @param propagationType propagation type (PARALLEL, DUMMY - doesn\'t send data) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addDestinationsForAllServicesOnFacility( - facility: number, - destination: string, - type: DestinationType, - propagationType?: DestinationPropagationType, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public addDestinationsForAllServicesOnFacility( - facility: number, - destination: string, - type: DestinationType, - propagationType?: DestinationPropagationType, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public addDestinationsForAllServicesOnFacility( - facility: number, - destination: string, - type: DestinationType, - propagationType?: DestinationPropagationType, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public addDestinationsForAllServicesOnFacility( - facility: number, - destination: string, - type: DestinationType, - propagationType?: DestinationPropagationType, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling addDestinationsForAllServicesOnFacility.' - ); - } - if (destination === null || destination === undefined) { - throw new Error( - 'Required parameter destination was null or undefined when calling addDestinationsForAllServicesOnFacility.' - ); - } - if (type === null || type === undefined) { - throw new Error( - 'Required parameter type was null or undefined when calling addDestinationsForAllServicesOnFacility.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (destination !== undefined && destination !== null) { - queryParameters = queryParameters.set('destination', destination); - } - if (type !== undefined && type !== null) { - queryParameters = queryParameters.set('type', type); - } - if (propagationType !== undefined && propagationType !== null) { - queryParameters = queryParameters.set('propagationType', propagationType); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post>( - `${this.configuration.basePath}/urlinjsonout/servicesManager/addDestinationsForAllServicesOnFacility`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Mark the attribute as required for the service. Required attributes are requisite for Service to run. If you add attribute which has a default attribute then this default attribute will be automatically add too. - * @param service id of Service - * @param attributeId id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addRequiredAttribute( - service: number, - attributeId: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public addRequiredAttribute( - service: number, - attributeId: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public addRequiredAttribute( - service: number, - attributeId: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public addRequiredAttribute( - service: number, - attributeId: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling addRequiredAttribute.' - ); - } - if (attributeId === null || attributeId === undefined) { - throw new Error( - 'Required parameter attributeId was null or undefined when calling addRequiredAttribute.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (attributeId !== undefined && attributeId !== null) { - queryParameters = queryParameters.set('attributeId', attributeId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/servicesManager/addRequiredAttribute`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Batch version of addRequiredAttribute. - * @param service id of Service - * @param attributes list of attribute ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addRequiredAttributes( - service: number, - attributes: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public addRequiredAttributes( - service: number, - attributes: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public addRequiredAttributes( - service: number, - attributes: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public addRequiredAttributes( - service: number, - attributes: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling addRequiredAttributes.' - ); - } - if (attributes === null || attributes === undefined) { - throw new Error( - 'Required parameter attributes was null or undefined when calling addRequiredAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/servicesManager/addRequiredAttributes`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Adds a Service to a Services Package. - * @param servicesPackage id of ServicesPackage - * @param service id of Service - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addServiceToServicesPackage( - servicesPackage: number, - service: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public addServiceToServicesPackage( - servicesPackage: number, - service: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public addServiceToServicesPackage( - servicesPackage: number, - service: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public addServiceToServicesPackage( - servicesPackage: number, - service: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (servicesPackage === null || servicesPackage === undefined) { - throw new Error( - 'Required parameter servicesPackage was null or undefined when calling addServiceToServicesPackage.' - ); - } - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling addServiceToServicesPackage.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (servicesPackage !== undefined && servicesPackage !== null) { - queryParameters = queryParameters.set('servicesPackage', servicesPackage); - } - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/servicesManager/addServiceToServicesPackage`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Block all services currently assigned on this destination. Newly assigned services are still allowed for propagation. - * @param destination id of Destination - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public blockAllServicesOnDestinationById( - destination: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public blockAllServicesOnDestinationById( - destination: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public blockAllServicesOnDestinationById( - destination: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public blockAllServicesOnDestinationById( - destination: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (destination === null || destination === undefined) { - throw new Error( - 'Required parameter destination was null or undefined when calling blockAllServicesOnDestinationById.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (destination !== undefined && destination !== null) { - queryParameters = queryParameters.set('destination', destination); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/servicesManager/blockAllServicesOnDestination/d`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Block all services currently assigned on this destination. Newly assigned services are still allowed for propagation. - * @param destination string name of destination - * @param destinationType Destination type (like host, user@host, user@host:port, email, service-specific, ...) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public blockAllServicesOnDestinationByName( - destination: string, - destinationType: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public blockAllServicesOnDestinationByName( - destination: string, - destinationType: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public blockAllServicesOnDestinationByName( - destination: string, - destinationType: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public blockAllServicesOnDestinationByName( - destination: string, - destinationType: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (destination === null || destination === undefined) { - throw new Error( - 'Required parameter destination was null or undefined when calling blockAllServicesOnDestinationByName.' - ); - } - if (destinationType === null || destinationType === undefined) { - throw new Error( - 'Required parameter destinationType was null or undefined when calling blockAllServicesOnDestinationByName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (destination !== undefined && destination !== null) { - queryParameters = queryParameters.set('destination', destination); - } - if (destinationType !== undefined && destinationType !== null) { - queryParameters = queryParameters.set('destinationType', destinationType); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/servicesManager/blockAllServicesOnDestination/dname-dtype`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Block all services currently assigned on this facility. Newly assigned services are still allowed for propagation. - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public blockAllServicesOnFacility( - facility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public blockAllServicesOnFacility( - facility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public blockAllServicesOnFacility( - facility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public blockAllServicesOnFacility( - facility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling blockAllServicesOnFacility.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/servicesManager/blockAllServicesOnFacility`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Bans Service on a destination. - * @param service id of Service - * @param destination id of Destination - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public blockServiceOnDestination( - service: number, - destination: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public blockServiceOnDestination( - service: number, - destination: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public blockServiceOnDestination( - service: number, - destination: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public blockServiceOnDestination( - service: number, - destination: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling blockServiceOnDestination.' - ); - } - if (destination === null || destination === undefined) { - throw new Error( - 'Required parameter destination was null or undefined when calling blockServiceOnDestination.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (destination !== undefined && destination !== null) { - queryParameters = queryParameters.set('destination', destination); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/servicesManager/blockServiceOnDestination/s-d`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Bans Service on a destination. - * @param service id of Service - * @param destination string name of destination - * @param destinationType Destination type (like host, user@host, user@host:port, email, service-specific, ...) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public blockServiceOnDestinationWithNameAndType( - service: number, - destination: string, - destinationType: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public blockServiceOnDestinationWithNameAndType( - service: number, - destination: string, - destinationType: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public blockServiceOnDestinationWithNameAndType( - service: number, - destination: string, - destinationType: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public blockServiceOnDestinationWithNameAndType( - service: number, - destination: string, - destinationType: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling blockServiceOnDestinationWithNameAndType.' - ); - } - if (destination === null || destination === undefined) { - throw new Error( - 'Required parameter destination was null or undefined when calling blockServiceOnDestinationWithNameAndType.' - ); - } - if (destinationType === null || destinationType === undefined) { - throw new Error( - 'Required parameter destinationType was null or undefined when calling blockServiceOnDestinationWithNameAndType.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (destination !== undefined && destination !== null) { - queryParameters = queryParameters.set('destination', destination); - } - if (destinationType !== undefined && destinationType !== null) { - queryParameters = queryParameters.set('destinationType', destinationType); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/servicesManager/blockServiceOnDestination/s-dname-dtype`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Bans service on a facility. - * @param service id of Service - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public blockServiceOnFacility( - service: number, - facility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public blockServiceOnFacility( - service: number, - facility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public blockServiceOnFacility( - service: number, - facility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public blockServiceOnFacility( - service: number, - facility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling blockServiceOnFacility.' - ); - } - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling blockServiceOnFacility.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/servicesManager/blockServiceOnFacility`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Creates a new service. - * @param name name - * @param description description - * @param script script which should be constructed like ./service_name (where anything else than [a-z,A-Z] is converted to _) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createService( - name: string, - description: string, - script: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public createService( - name: string, - description: string, - script: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public createService( - name: string, - description: string, - script: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public createService( - name: string, - description: string, - script: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling createService.'); - } - if (description === null || description === undefined) { - throw new Error( - 'Required parameter description was null or undefined when calling createService.' - ); - } - if (script === null || script === undefined) { - throw new Error( - 'Required parameter script was null or undefined when calling createService.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (name !== undefined && name !== null) { - queryParameters = queryParameters.set('name', name); - } - if (description !== undefined && description !== null) { - queryParameters = queryParameters.set('description', description); - } - if (script !== undefined && script !== null) { - queryParameters = queryParameters.set('script', script); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/servicesManager/createService`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Creates a new service. Service object must contain name. Parameters desctiption, script, delay, recurrence, enabled are optional. Other parameters ignored. - * @param inputCreateService - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createServiceWithService( - inputCreateService: InputCreateService, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public createServiceWithService( - inputCreateService: InputCreateService, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public createServiceWithService( - inputCreateService: InputCreateService, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public createServiceWithService( - inputCreateService: InputCreateService, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputCreateService === null || inputCreateService === undefined) { - throw new Error( - 'Required parameter inputCreateService was null or undefined when calling createServiceWithService.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/servicesManager/createService`, - inputCreateService, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Creates a new services package. - * @param inputCreateServicesPackage - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createServicesPackage( - inputCreateServicesPackage: InputCreateServicesPackage, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public createServicesPackage( - inputCreateServicesPackage: InputCreateServicesPackage, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public createServicesPackage( - inputCreateServicesPackage: InputCreateServicesPackage, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public createServicesPackage( - inputCreateServicesPackage: InputCreateServicesPackage, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputCreateServicesPackage === null || inputCreateServicesPackage === undefined) { - throw new Error( - 'Required parameter inputCreateServicesPackage was null or undefined when calling createServicesPackage.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/servicesManager/createServicesPackage`, - inputCreateServicesPackage, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Creates a new services package. - * @param name name - * @param description description - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createServicesPackageByNameAndDescription( - name: string, - description: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public createServicesPackageByNameAndDescription( - name: string, - description: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public createServicesPackageByNameAndDescription( - name: string, - description: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public createServicesPackageByNameAndDescription( - name: string, - description: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (name === null || name === undefined) { - throw new Error( - 'Required parameter name was null or undefined when calling createServicesPackageByNameAndDescription.' - ); - } - if (description === null || description === undefined) { - throw new Error( - 'Required parameter description was null or undefined when calling createServicesPackageByNameAndDescription.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (name !== undefined && name !== null) { - queryParameters = queryParameters.set('name', name); - } - if (description !== undefined && description !== null) { - queryParameters = queryParameters.set('description', description); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/servicesManager/createServicesPackage`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Deletes a service. - * @param service id of Service - * @param force If true, delete entity forcefully. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteService( - service: number, - force?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public deleteService( - service: number, - force?: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deleteService( - service: number, - force?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deleteService( - service: number, - force?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling deleteService.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (force !== undefined && force !== null) { - queryParameters = queryParameters.set('force', force); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/servicesManager/deleteService`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Deletes a services package. - * @param servicesPackage id of ServicesPackage - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteServicesPackage( - servicesPackage: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public deleteServicesPackage( - servicesPackage: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deleteServicesPackage( - servicesPackage: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deleteServicesPackage( - servicesPackage: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (servicesPackage === null || servicesPackage === undefined) { - throw new Error( - 'Required parameter servicesPackage was null or undefined when calling deleteServicesPackage.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (servicesPackage !== undefined && servicesPackage !== null) { - queryParameters = queryParameters.set('servicesPackage', servicesPackage); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/servicesManager/deleteServicesPackage`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Forces service propagation on defined facility. Return int 1 = true if it is possible, 0 = false if not - * @param service id of Service - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public forceServicePropagation( - service: number, - facility?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public forceServicePropagation( - service: number, - facility?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public forceServicePropagation( - service: number, - facility?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public forceServicePropagation( - service: number, - facility?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling forceServicePropagation.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/servicesManager/forceServicePropagation`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get list of all destinations. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllDestinations( - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAllDestinations( - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllDestinations( - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAllDestinations( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/servicesManager/getDestinations/all`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns list of all rich destinations defined for the facility. - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllRichDestinationsForFacility( - facility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAllRichDestinationsForFacility( - facility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllRichDestinationsForFacility( - facility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAllRichDestinationsForFacility( - facility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getAllRichDestinationsForFacility.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/servicesManager/getAllRichDestinations/f`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns list of all rich destinations defined for the service. - * @param service id of Service - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllRichDestinationsForService( - service: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAllRichDestinationsForService( - service: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllRichDestinationsForService( - service: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAllRichDestinationsForService( - service: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling getAllRichDestinationsForService.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/servicesManager/getAllRichDestinations/s`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Lists resources assigned to service. - * @param service id of Service - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedResources( - service: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAssignedResources( - service: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAssignedResources( - service: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAssignedResources( - service: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling getAssignedResources.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/servicesManager/getAssignedResourcesForService`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * List all services associated with the facility (via resource). - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedServices( - facility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAssignedServices( - facility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAssignedServices( - facility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAssignedServices( - facility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getAssignedServices.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/servicesManager/getAssignedServices`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Generates the list of attributes per each member associated with the resources and groups. - * @param service id of Service - * @param facility id of Facility - * @param filterExpiredMembers if true the method does not take members expired in groups into account - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDataWithGroups( - service: number, - facility: number, - filterExpiredMembers?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getDataWithGroups( - service: number, - facility: number, - filterExpiredMembers?: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getDataWithGroups( - service: number, - facility: number, - filterExpiredMembers?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getDataWithGroups( - service: number, - facility: number, - filterExpiredMembers?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling getDataWithGroups.' - ); - } - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getDataWithGroups.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (filterExpiredMembers !== undefined && filterExpiredMembers !== null) { - queryParameters = queryParameters.set('filterExpiredMembers', filterExpiredMembers); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/servicesManager/getDataWithGroups`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Generates the list of attributes per each member associated with the resources and groups in vos. - * @param service id of Service - * @param facility id of Facility - * @param filterExpiredMembers if true the method does not take members expired in groups into account - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDataWithVos( - service: number, - facility: number, - filterExpiredMembers?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getDataWithVos( - service: number, - facility: number, - filterExpiredMembers?: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getDataWithVos( - service: number, - facility: number, - filterExpiredMembers?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getDataWithVos( - service: number, - facility: number, - filterExpiredMembers?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling getDataWithVos.' - ); - } - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getDataWithVos.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (filterExpiredMembers !== undefined && filterExpiredMembers !== null) { - queryParameters = queryParameters.set('filterExpiredMembers', filterExpiredMembers); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/servicesManager/getDataWithVos`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns a destination by its id. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDestinationById( - id: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getDestinationById( - id: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getDestinationById( - id: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getDestinationById( - id: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling getDestinationById.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/servicesManager/getDestinationById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns list of all destinations defined for the service and facility. - * @param service id of Service - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDestinations( - service: number, - facility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getDestinations( - service: number, - facility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getDestinations( - service: number, - facility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getDestinations( - service: number, - facility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling getDestinations.' - ); - } - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getDestinations.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/servicesManager/getDestinations/s-f`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets count of all destinations. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDestinationsCount(observe?: 'body', reportProgress?: boolean): Observable; - public getDestinationsCount( - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getDestinationsCount( - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getDestinationsCount( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/servicesManager/getDestinationsCount`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * List all destinations for all facilities which are joined by resources to the VO. - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilitiesDestinations( - vo: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getFacilitiesDestinations( - vo: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getFacilitiesDestinations( - vo: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getFacilitiesDestinations( - vo: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling getFacilitiesDestinations.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/servicesManager/getFacilitiesDestinations`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Return list of ServiceForGUI assigned on facility, (Service with \"allowedOnFacility\" property filled). 1 - allowed / 0 - service is service is denied. - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityAssignedServicesForGUI( - facility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getFacilityAssignedServicesForGUI( - facility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getFacilityAssignedServicesForGUI( - facility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getFacilityAssignedServicesForGUI( - facility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getFacilityAssignedServicesForGUI.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/servicesManager/getFacilityAssignedServicesForGUI`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Generates the list of attributes per each user and per each resource. Never return member or member-resource attribute. - * @param service id of Service - * @param facility id of Facility - * @param filterExpiredMembers if true the method does not take members expired in groups into account - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFlatData( - service: number, - facility: number, - filterExpiredMembers?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getFlatData( - service: number, - facility: number, - filterExpiredMembers?: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getFlatData( - service: number, - facility: number, - filterExpiredMembers?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getFlatData( - service: number, - facility: number, - filterExpiredMembers?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling getFlatData.'); - } - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getFlatData.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (filterExpiredMembers !== undefined && filterExpiredMembers !== null) { - queryParameters = queryParameters.set('filterExpiredMembers', filterExpiredMembers); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/servicesManager/getFlatData`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Generates hashed group structure data for given service and facility. - * @param service id of Service - * @param facility id of Facility - * @param filterExpiredMembers if true the method does not take members expired in groups into account - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getHashedDataWithGroups( - service: number, - facility: number, - filterExpiredMembers?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getHashedDataWithGroups( - service: number, - facility: number, - filterExpiredMembers?: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getHashedDataWithGroups( - service: number, - facility: number, - filterExpiredMembers?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getHashedDataWithGroups( - service: number, - facility: number, - filterExpiredMembers?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling getHashedDataWithGroups.' - ); - } - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getHashedDataWithGroups.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (filterExpiredMembers !== undefined && filterExpiredMembers !== null) { - queryParameters = queryParameters.set('filterExpiredMembers', filterExpiredMembers); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/servicesManager/getHashedDataWithGroups`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Generates hashed hierarchical data structure for given service and facility. - * @param service id of Service - * @param facility id of Facility - * @param filterExpiredMembers if true the method does not take members expired in groups into account - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getHashedHierarchicalData( - service: number, - facility: number, - filterExpiredMembers?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getHashedHierarchicalData( - service: number, - facility: number, - filterExpiredMembers?: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getHashedHierarchicalData( - service: number, - facility: number, - filterExpiredMembers?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getHashedHierarchicalData( - service: number, - facility: number, - filterExpiredMembers?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling getHashedHierarchicalData.' - ); - } - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getHashedHierarchicalData.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (filterExpiredMembers !== undefined && filterExpiredMembers !== null) { - queryParameters = queryParameters.set('filterExpiredMembers', filterExpiredMembers); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/servicesManager/getHashedHierarchicalData`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Generates the list of attributes per each member associated with the resource. - * @param service id of Service - * @param facility id of Facility - * @param filterExpiredMembers if true the method does not take members expired in groups into account - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getHierarchicalData( - service: number, - facility: number, - filterExpiredMembers?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getHierarchicalData( - service: number, - facility: number, - filterExpiredMembers?: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getHierarchicalData( - service: number, - facility: number, - filterExpiredMembers?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getHierarchicalData( - service: number, - facility: number, - filterExpiredMembers?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling getHierarchicalData.' - ); - } - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getHierarchicalData.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (filterExpiredMembers !== undefined && filterExpiredMembers !== null) { - queryParameters = queryParameters.set('filterExpiredMembers', filterExpiredMembers); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/servicesManager/getHierarchicalData`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns list of all rich destinations defined for the service and facility. - * @param service id of Service - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRichDestinations( - service: number, - facility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getRichDestinations( - service: number, - facility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getRichDestinations( - service: number, - facility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getRichDestinations( - service: number, - facility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling getRichDestinations.' - ); - } - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getRichDestinations.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/servicesManager/getRichDestinations`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns a service by its id. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getServiceById( - id: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getServiceById( - id: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getServiceById( - id: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getServiceById( - id: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getServiceById.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/servicesManager/getServiceById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns a service by its name. - * @param name name of entity - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getServiceByName( - name: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getServiceByName( - name: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getServiceByName( - name: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getServiceByName( - name: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (name === null || name === undefined) { - throw new Error( - 'Required parameter name was null or undefined when calling getServiceByName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (name !== undefined && name !== null) { - queryParameters = queryParameters.set('name', name); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/servicesManager/getServiceByName`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns all services. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getServices(observe?: 'body', reportProgress?: boolean): Observable>; - public getServices( - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getServices( - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getServices(observe: any = 'body', reportProgress: boolean = false): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/servicesManager/getServices`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns list of denials for a destination. - * @param destination id of Destination - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getServicesBlockedOnDestination( - destination: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getServicesBlockedOnDestination( - destination: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getServicesBlockedOnDestination( - destination: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getServicesBlockedOnDestination( - destination: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (destination === null || destination === undefined) { - throw new Error( - 'Required parameter destination was null or undefined when calling getServicesBlockedOnDestination.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (destination !== undefined && destination !== null) { - queryParameters = queryParameters.set('destination', destination); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/servicesManager/getServicesBlockedOnDestination`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns list of denials for a facility. - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getServicesBlockedOnFacility( - facility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getServicesBlockedOnFacility( - facility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getServicesBlockedOnFacility( - facility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getServicesBlockedOnFacility( - facility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getServicesBlockedOnFacility.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/servicesManager/getServicesBlockedOnFacility`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all services with given attribute. - * @param attributeDefinition id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getServicesByAttributeDefinition( - attributeDefinition: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getServicesByAttributeDefinition( - attributeDefinition: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getServicesByAttributeDefinition( - attributeDefinition: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getServicesByAttributeDefinition( - attributeDefinition: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (attributeDefinition === null || attributeDefinition === undefined) { - throw new Error( - 'Required parameter attributeDefinition was null or undefined when calling getServicesByAttributeDefinition.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (attributeDefinition !== undefined && attributeDefinition !== null) { - queryParameters = queryParameters.set('attributeDefinition', attributeDefinition); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/servicesManager/getServicesByAttributeDefinition`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Lists services stored in a package. - * @param servicesPackage id of ServicesPackage - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getServicesFromServicesPackage( - servicesPackage: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getServicesFromServicesPackage( - servicesPackage: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getServicesFromServicesPackage( - servicesPackage: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getServicesFromServicesPackage( - servicesPackage: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (servicesPackage === null || servicesPackage === undefined) { - throw new Error( - 'Required parameter servicesPackage was null or undefined when calling getServicesFromServicesPackage.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (servicesPackage !== undefined && servicesPackage !== null) { - queryParameters = queryParameters.set('servicesPackage', servicesPackage); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/servicesManager/getServicesFromServicesPackage`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets package by id. - * @param servicesPackage id of ServicesPackage - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getServicesPackageById( - servicesPackage: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getServicesPackageById( - servicesPackage: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getServicesPackageById( - servicesPackage: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getServicesPackageById( - servicesPackage: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (servicesPackage === null || servicesPackage === undefined) { - throw new Error( - 'Required parameter servicesPackage was null or undefined when calling getServicesPackageById.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (servicesPackage !== undefined && servicesPackage !== null) { - queryParameters = queryParameters.set('servicesPackage', servicesPackage); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/servicesManager/getServicesPackageById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets package by name. - * @param name ServicesPackage name - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getServicesPackageByName( - name: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getServicesPackageByName( - name: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getServicesPackageByName( - name: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getServicesPackageByName( - name: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (name === null || name === undefined) { - throw new Error( - 'Required parameter name was null or undefined when calling getServicesPackageByName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (name !== undefined && name !== null) { - queryParameters = queryParameters.set('name', name); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/servicesManager/getServicesPackageByName`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns packages. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getServicesPackages( - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getServicesPackages( - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getServicesPackages( - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getServicesPackages( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/servicesManager/getServicesPackages`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Is this Service denied on the destination? Return int 1 = true - the Service is denied on the destination, 0 = false - the Service is NOT denied on the destination - * @param service id of Service - * @param destination id of Destination - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public isServiceBlockedOnDestination( - service: number, - destination: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public isServiceBlockedOnDestination( - service: number, - destination: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public isServiceBlockedOnDestination( - service: number, - destination: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public isServiceBlockedOnDestination( - service: number, - destination: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling isServiceBlockedOnDestination.' - ); - } - if (destination === null || destination === undefined) { - throw new Error( - 'Required parameter destination was null or undefined when calling isServiceBlockedOnDestination.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (destination !== undefined && destination !== null) { - queryParameters = queryParameters.set('destination', destination); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/servicesManager/isServiceBlockedOnDestination`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Is this Service denied on the facility? Return int 1 = true - the Service is denied on the facility, 0 = false - the Service is NOT denied on the facility - * @param service id of Service - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public isServiceBlockedOnFacility( - service: number, - facility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public isServiceBlockedOnFacility( - service: number, - facility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public isServiceBlockedOnFacility( - service: number, - facility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public isServiceBlockedOnFacility( - service: number, - facility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling isServiceBlockedOnFacility.' - ); - } - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling isServiceBlockedOnFacility.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/servicesManager/isServiceBlockedOnFacility`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Plans service propagation on defined facility. Return int 1 = true if it is possible, 0 = false if not - * @param service id of Service - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public planServicePropagation( - service: number, - facility?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public planServicePropagation( - service: number, - facility?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public planServicePropagation( - service: number, - facility?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public planServicePropagation( - service: number, - facility?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling planServicePropagation.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/servicesManager/planServicePropagation`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Removes all destinations from a facility and service. - * @param service id of Service - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeAllDestinations( - service: number, - facility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeAllDestinations( - service: number, - facility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeAllDestinations( - service: number, - facility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeAllDestinations( - service: number, - facility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling removeAllDestinations.' - ); - } - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling removeAllDestinations.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/servicesManager/removeAllDestinations`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove all required attributes from service. - * @param service id of Service - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeAllRequiredAttributes( - service: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeAllRequiredAttributes( - service: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeAllRequiredAttributes( - service: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeAllRequiredAttributes( - service: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling removeAllRequiredAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/servicesManager/removeAllRequiredAttributes`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Removes the specified destination from the facility and service. - * @param service id of Service - * @param facility id of Facility - * @param destination Destination\'s destination - * @param type Destination\'s type - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeDestination( - service: number, - facility: number, - destination: string, - type: DestinationType, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeDestination( - service: number, - facility: number, - destination: string, - type: DestinationType, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeDestination( - service: number, - facility: number, - destination: string, - type: DestinationType, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeDestination( - service: number, - facility: number, - destination: string, - type: DestinationType, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling removeDestination.' - ); - } - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling removeDestination.' - ); - } - if (destination === null || destination === undefined) { - throw new Error( - 'Required parameter destination was null or undefined when calling removeDestination.' - ); - } - if (type === null || type === undefined) { - throw new Error( - 'Required parameter type was null or undefined when calling removeDestination.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (destination !== undefined && destination !== null) { - queryParameters = queryParameters.set('destination', destination); - } - if (type !== undefined && type !== null) { - queryParameters = queryParameters.set('type', type); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/servicesManager/removeDestination`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove required attribute from service. - * @param service id of Service - * @param attributeId id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeRequiredAttribute( - service: number, - attributeId: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeRequiredAttribute( - service: number, - attributeId: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeRequiredAttribute( - service: number, - attributeId: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeRequiredAttribute( - service: number, - attributeId: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling removeRequiredAttribute.' - ); - } - if (attributeId === null || attributeId === undefined) { - throw new Error( - 'Required parameter attributeId was null or undefined when calling removeRequiredAttribute.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (attributeId !== undefined && attributeId !== null) { - queryParameters = queryParameters.set('attributeId', attributeId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/servicesManager/removeRequiredAttribute`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove required attributes from service. - * @param service id of Service - * @param attributes list of attribute ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeRequiredAttributes( - service: number, - attributes: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeRequiredAttributes( - service: number, - attributes: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeRequiredAttributes( - service: number, - attributes: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeRequiredAttributes( - service: number, - attributes: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling removeRequiredAttributes.' - ); - } - if (attributes === null || attributes === undefined) { - throw new Error( - 'Required parameter attributes was null or undefined when calling removeRequiredAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/servicesManager/removeRequiredAttributes`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Removes a Service from a Services Package. - * @param servicesPackage id of ServicesPackage - * @param service id of Service - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeServiceFromServicesPackage( - servicesPackage: number, - service: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeServiceFromServicesPackage( - servicesPackage: number, - service: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeServiceFromServicesPackage( - servicesPackage: number, - service: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeServiceFromServicesPackage( - servicesPackage: number, - service: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (servicesPackage === null || servicesPackage === undefined) { - throw new Error( - 'Required parameter servicesPackage was null or undefined when calling removeServiceFromServicesPackage.' - ); - } - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling removeServiceFromServicesPackage.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (servicesPackage !== undefined && servicesPackage !== null) { - queryParameters = queryParameters.set('servicesPackage', servicesPackage); - } - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/servicesManager/removeServiceFromServicesPackage`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Erase all the possible denials on this destination. - * @param destination id of Destination - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public unblockAllServicesOnDestinationById( - destination: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public unblockAllServicesOnDestinationById( - destination: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public unblockAllServicesOnDestinationById( - destination: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public unblockAllServicesOnDestinationById( - destination: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (destination === null || destination === undefined) { - throw new Error( - 'Required parameter destination was null or undefined when calling unblockAllServicesOnDestinationById.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (destination !== undefined && destination !== null) { - queryParameters = queryParameters.set('destination', destination); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/servicesManager/unblockAllServicesOnDestination/d`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Erase all the possible denials on this destination. - * @param destination string name of destination - * @param destinationType Destination type (like host, user@host, user@host:port, email, service-specific, ...) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public unblockAllServicesOnDestinationByName( - destination: string, - destinationType: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public unblockAllServicesOnDestinationByName( - destination: string, - destinationType: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public unblockAllServicesOnDestinationByName( - destination: string, - destinationType: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public unblockAllServicesOnDestinationByName( - destination: string, - destinationType: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (destination === null || destination === undefined) { - throw new Error( - 'Required parameter destination was null or undefined when calling unblockAllServicesOnDestinationByName.' - ); - } - if (destinationType === null || destinationType === undefined) { - throw new Error( - 'Required parameter destinationType was null or undefined when calling unblockAllServicesOnDestinationByName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (destination !== undefined && destination !== null) { - queryParameters = queryParameters.set('destination', destination); - } - if (destinationType !== undefined && destinationType !== null) { - queryParameters = queryParameters.set('destinationType', destinationType); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/servicesManager/unblockAllServicesOnDestination/dname-dtype`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Erase all the possible denials on this facility. - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public unblockAllServicesOnFacility( - facility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public unblockAllServicesOnFacility( - facility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public unblockAllServicesOnFacility( - facility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public unblockAllServicesOnFacility( - facility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling unblockAllServicesOnFacility.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/servicesManager/unblockAllServicesOnFacility`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Free the denial of the Service on this destination. If the Service was banned on this destination, it will be freed. In case the Service was not banned on this destination, nothing will happen. - * @param service id of Service - * @param destination id of Destination - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public unblockServiceOnDestinationById( - service: number, - destination: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public unblockServiceOnDestinationById( - service: number, - destination: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public unblockServiceOnDestinationById( - service: number, - destination: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public unblockServiceOnDestinationById( - service: number, - destination: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling unblockServiceOnDestinationById.' - ); - } - if (destination === null || destination === undefined) { - throw new Error( - 'Required parameter destination was null or undefined when calling unblockServiceOnDestinationById.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (destination !== undefined && destination !== null) { - queryParameters = queryParameters.set('destination', destination); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/servicesManager/unblockServiceOnDestination/s-d`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Free the denial of the Service on this destination. If the Service was banned on this destination, it will be freed. In case the Service was not banned on this destination, nothing will happen. - * @param service id of Service - * @param destination string name of destination - * @param destinationType Destination type (like host, user@host, user@host:port, email, service-specific, ...) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public unblockServiceOnDestinationByName( - service: number, - destination: string, - destinationType: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public unblockServiceOnDestinationByName( - service: number, - destination: string, - destinationType: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public unblockServiceOnDestinationByName( - service: number, - destination: string, - destinationType: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public unblockServiceOnDestinationByName( - service: number, - destination: string, - destinationType: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling unblockServiceOnDestinationByName.' - ); - } - if (destination === null || destination === undefined) { - throw new Error( - 'Required parameter destination was null or undefined when calling unblockServiceOnDestinationByName.' - ); - } - if (destinationType === null || destinationType === undefined) { - throw new Error( - 'Required parameter destinationType was null or undefined when calling unblockServiceOnDestinationByName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (destination !== undefined && destination !== null) { - queryParameters = queryParameters.set('destination', destination); - } - if (destinationType !== undefined && destinationType !== null) { - queryParameters = queryParameters.set('destinationType', destinationType); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/servicesManager/unblockServiceOnDestination/s-dname-dtype`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Free the denial of the Service on this facility. If the Service was banned on this facility, it will be freed. In case the Service was not banned on this facility, nothing will happen. - * @param service id of Service - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public unblockServiceOnFacility( - service: number, - facility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public unblockServiceOnFacility( - service: number, - facility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public unblockServiceOnFacility( - service: number, - facility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public unblockServiceOnFacility( - service: number, - facility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling unblockServiceOnFacility.' - ); - } - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling unblockServiceOnFacility.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/servicesManager/unblockServiceOnFacility`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Updates a service. - * @param inputUpdateService - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateService( - inputUpdateService: InputUpdateService, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public updateService( - inputUpdateService: InputUpdateService, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public updateService( - inputUpdateService: InputUpdateService, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public updateService( - inputUpdateService: InputUpdateService, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputUpdateService === null || inputUpdateService === undefined) { - throw new Error( - 'Required parameter inputUpdateService was null or undefined when calling updateService.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/servicesManager/updateService`, - inputUpdateService, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Updates a service package. - * @param inputUpdateServicesPackage - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateServicesPackage( - inputUpdateServicesPackage: InputUpdateServicesPackage, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public updateServicesPackage( - inputUpdateServicesPackage: InputUpdateServicesPackage, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public updateServicesPackage( - inputUpdateServicesPackage: InputUpdateServicesPackage, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public updateServicesPackage( - inputUpdateServicesPackage: InputUpdateServicesPackage, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputUpdateServicesPackage === null || inputUpdateServicesPackage === undefined) { - throw new Error( - 'Required parameter inputUpdateServicesPackage was null or undefined when calling updateServicesPackage.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + + + /** + * Adds an destination for a facility and service. If destination doesn\'t exist it will be created. + * InvalidDestinationException is thrown when destination value is invalid in given destination type. + * @param service id of Service + * @param facility id of Facility + * @param destination Destination\'s destination, usually a DNS name + * @param type Destination\'s type + * @param propagationType Destination\'s propagationType + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addDestination(service: number, facility: number, destination: string, type: DestinationType, propagationType?: DestinationPropagationType, observe?: 'body', reportProgress?: boolean): Observable; + public addDestination(service: number, facility: number, destination: string, type: DestinationType, propagationType?: DestinationPropagationType, observe?: 'response', reportProgress?: boolean): Observable>; + public addDestination(service: number, facility: number, destination: string, type: DestinationType, propagationType?: DestinationPropagationType, observe?: 'events', reportProgress?: boolean): Observable>; + public addDestination(service: number, facility: number, destination: string, type: DestinationType, propagationType?: DestinationPropagationType, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling addDestination.'); + } + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling addDestination.'); + } + if (destination === null || destination === undefined) { + throw new Error('Required parameter destination was null or undefined when calling addDestination.'); + } + if (type === null || type === undefined) { + throw new Error('Required parameter type was null or undefined when calling addDestination.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (destination !== undefined && destination !== null) { + queryParameters = queryParameters.set('destination', destination); + } + if (type !== undefined && type !== null) { + queryParameters = queryParameters.set('type', type); + } + if (propagationType !== undefined && propagationType !== null) { + queryParameters = queryParameters.set('propagationType', propagationType); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/addDestination`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Adds an destination for a facility and list of services. If destination doesn\'t exist it will be created. InvalidDestinationException is thrown when destination value is invalid in given destination type. + * @param inputAddDestinationToMultipleServices + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addDestinationToMultipleServices(inputAddDestinationToMultipleServices: InputAddDestinationToMultipleServices, observe?: 'body', reportProgress?: boolean): Observable; + public addDestinationToMultipleServices(inputAddDestinationToMultipleServices: InputAddDestinationToMultipleServices, observe?: 'response', reportProgress?: boolean): Observable>; + public addDestinationToMultipleServices(inputAddDestinationToMultipleServices: InputAddDestinationToMultipleServices, observe?: 'events', reportProgress?: boolean): Observable>; + public addDestinationToMultipleServices(inputAddDestinationToMultipleServices: InputAddDestinationToMultipleServices, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputAddDestinationToMultipleServices === null || inputAddDestinationToMultipleServices === undefined) { + throw new Error('Required parameter inputAddDestinationToMultipleServices was null or undefined when calling addDestinationToMultipleServices.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/servicesManager/addDestination`, + inputAddDestinationToMultipleServices, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Add services destinations for one service. Destinations names are taken from all facility\'s host hostnames. + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addDestinationsDefinedByHostsOnFacilityWithFacility(facility: number, observe?: 'body', reportProgress?: boolean): Observable>; + public addDestinationsDefinedByHostsOnFacilityWithFacility(facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public addDestinationsDefinedByHostsOnFacilityWithFacility(facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public addDestinationsDefinedByHostsOnFacilityWithFacility(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling addDestinationsDefinedByHostsOnFacilityWithFacility.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post>(`${this.configuration.basePath}/urlinjsonout/servicesManager/addDestinationsDefinedByHostsOnFacility/f`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Add services destinations for list of services. Destinations names are taken from all facility\'s host hostnames. + * @param inputAddDestinationsDefinedByHostsOnFacility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addDestinationsDefinedByHostsOnFacilityWithListOfServiceAndFacility(inputAddDestinationsDefinedByHostsOnFacility: InputAddDestinationsDefinedByHostsOnFacility, observe?: 'body', reportProgress?: boolean): Observable>; + public addDestinationsDefinedByHostsOnFacilityWithListOfServiceAndFacility(inputAddDestinationsDefinedByHostsOnFacility: InputAddDestinationsDefinedByHostsOnFacility, observe?: 'response', reportProgress?: boolean): Observable>>; + public addDestinationsDefinedByHostsOnFacilityWithListOfServiceAndFacility(inputAddDestinationsDefinedByHostsOnFacility: InputAddDestinationsDefinedByHostsOnFacility, observe?: 'events', reportProgress?: boolean): Observable>>; + public addDestinationsDefinedByHostsOnFacilityWithListOfServiceAndFacility(inputAddDestinationsDefinedByHostsOnFacility: InputAddDestinationsDefinedByHostsOnFacility, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputAddDestinationsDefinedByHostsOnFacility === null || inputAddDestinationsDefinedByHostsOnFacility === undefined) { + throw new Error('Required parameter inputAddDestinationsDefinedByHostsOnFacility was null or undefined when calling addDestinationsDefinedByHostsOnFacilityWithListOfServiceAndFacility.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post>(`${this.configuration.basePath}/json/servicesManager/addDestinationsDefinedByHostsOnFacility/lists-f`, + inputAddDestinationsDefinedByHostsOnFacility, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Add services destinations for all services currently available on facility (assigned to all facility\'s resources). Destinations names are taken from all facility\'s host hostnames. + * @param service id of Service + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addDestinationsDefinedByHostsOnFacilityWithServiceAndFacility(service: number, facility: number, observe?: 'body', reportProgress?: boolean): Observable>; + public addDestinationsDefinedByHostsOnFacilityWithServiceAndFacility(service: number, facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public addDestinationsDefinedByHostsOnFacilityWithServiceAndFacility(service: number, facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public addDestinationsDefinedByHostsOnFacilityWithServiceAndFacility(service: number, facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling addDestinationsDefinedByHostsOnFacilityWithServiceAndFacility.'); + } + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling addDestinationsDefinedByHostsOnFacilityWithServiceAndFacility.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post>(`${this.configuration.basePath}/urlinjsonout/servicesManager/addDestinationsDefinedByHostsOnFacility/s-f`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Adds destination for all services defined on the facility. + * InvalidDestinationException is thrown when destination value is invalid in given destination type. + * @param facility id of Facility + * @param destination string name of destination + * @param type Destination type (host,user@host,user@host:port,url,mail,service-specific) + * @param propagationType propagation type (PARALLEL, DUMMY - doesn\'t send data) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addDestinationsForAllServicesOnFacility(facility: number, destination: string, type: DestinationType, propagationType?: DestinationPropagationType, observe?: 'body', reportProgress?: boolean): Observable>; + public addDestinationsForAllServicesOnFacility(facility: number, destination: string, type: DestinationType, propagationType?: DestinationPropagationType, observe?: 'response', reportProgress?: boolean): Observable>>; + public addDestinationsForAllServicesOnFacility(facility: number, destination: string, type: DestinationType, propagationType?: DestinationPropagationType, observe?: 'events', reportProgress?: boolean): Observable>>; + public addDestinationsForAllServicesOnFacility(facility: number, destination: string, type: DestinationType, propagationType?: DestinationPropagationType, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling addDestinationsForAllServicesOnFacility.'); + } + if (destination === null || destination === undefined) { + throw new Error('Required parameter destination was null or undefined when calling addDestinationsForAllServicesOnFacility.'); + } + if (type === null || type === undefined) { + throw new Error('Required parameter type was null or undefined when calling addDestinationsForAllServicesOnFacility.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (destination !== undefined && destination !== null) { + queryParameters = queryParameters.set('destination', destination); + } + if (type !== undefined && type !== null) { + queryParameters = queryParameters.set('type', type); + } + if (propagationType !== undefined && propagationType !== null) { + queryParameters = queryParameters.set('propagationType', propagationType); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post>(`${this.configuration.basePath}/urlinjsonout/servicesManager/addDestinationsForAllServicesOnFacility`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Mark the attribute as required for the service. Required attributes are requisite for Service to run. If you add attribute which has a default attribute then this default attribute will be automatically add too. + * @param service id of Service + * @param attributeId id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addRequiredAttribute(service: number, attributeId: number, observe?: 'body', reportProgress?: boolean): Observable; + public addRequiredAttribute(service: number, attributeId: number, observe?: 'response', reportProgress?: boolean): Observable>; + public addRequiredAttribute(service: number, attributeId: number, observe?: 'events', reportProgress?: boolean): Observable>; + public addRequiredAttribute(service: number, attributeId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling addRequiredAttribute.'); + } + if (attributeId === null || attributeId === undefined) { + throw new Error('Required parameter attributeId was null or undefined when calling addRequiredAttribute.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (attributeId !== undefined && attributeId !== null) { + queryParameters = queryParameters.set('attributeId', attributeId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/addRequiredAttribute`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Batch version of addRequiredAttribute. + * @param service id of Service + * @param attributes list of attribute ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addRequiredAttributes(service: number, attributes: Array, observe?: 'body', reportProgress?: boolean): Observable; + public addRequiredAttributes(service: number, attributes: Array, observe?: 'response', reportProgress?: boolean): Observable>; + public addRequiredAttributes(service: number, attributes: Array, observe?: 'events', reportProgress?: boolean): Observable>; + public addRequiredAttributes(service: number, attributes: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling addRequiredAttributes.'); + } + if (attributes === null || attributes === undefined) { + throw new Error('Required parameter attributes was null or undefined when calling addRequiredAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/addRequiredAttributes`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Adds a Service to a Services Package. + * @param servicesPackage id of ServicesPackage + * @param service id of Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addServiceToServicesPackage(servicesPackage: number, service: number, observe?: 'body', reportProgress?: boolean): Observable; + public addServiceToServicesPackage(servicesPackage: number, service: number, observe?: 'response', reportProgress?: boolean): Observable>; + public addServiceToServicesPackage(servicesPackage: number, service: number, observe?: 'events', reportProgress?: boolean): Observable>; + public addServiceToServicesPackage(servicesPackage: number, service: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (servicesPackage === null || servicesPackage === undefined) { + throw new Error('Required parameter servicesPackage was null or undefined when calling addServiceToServicesPackage.'); + } + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling addServiceToServicesPackage.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (servicesPackage !== undefined && servicesPackage !== null) { + queryParameters = queryParameters.set('servicesPackage', servicesPackage); + } + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/addServiceToServicesPackage`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Block all services currently assigned on this destination. Newly assigned services are still allowed for propagation. + * @param destination id of Destination + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public blockAllServicesOnDestinationById(destination: number, observe?: 'body', reportProgress?: boolean): Observable; + public blockAllServicesOnDestinationById(destination: number, observe?: 'response', reportProgress?: boolean): Observable>; + public blockAllServicesOnDestinationById(destination: number, observe?: 'events', reportProgress?: boolean): Observable>; + public blockAllServicesOnDestinationById(destination: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (destination === null || destination === undefined) { + throw new Error('Required parameter destination was null or undefined when calling blockAllServicesOnDestinationById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (destination !== undefined && destination !== null) { + queryParameters = queryParameters.set('destination', destination); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/blockAllServicesOnDestination/d`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Block all services currently assigned on this destination. Newly assigned services are still allowed for propagation. + * @param destination string name of destination + * @param destinationType Destination type (like host, user@host, user@host:port, email, service-specific, ...) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public blockAllServicesOnDestinationByName(destination: string, destinationType: string, observe?: 'body', reportProgress?: boolean): Observable; + public blockAllServicesOnDestinationByName(destination: string, destinationType: string, observe?: 'response', reportProgress?: boolean): Observable>; + public blockAllServicesOnDestinationByName(destination: string, destinationType: string, observe?: 'events', reportProgress?: boolean): Observable>; + public blockAllServicesOnDestinationByName(destination: string, destinationType: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (destination === null || destination === undefined) { + throw new Error('Required parameter destination was null or undefined when calling blockAllServicesOnDestinationByName.'); + } + if (destinationType === null || destinationType === undefined) { + throw new Error('Required parameter destinationType was null or undefined when calling blockAllServicesOnDestinationByName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (destination !== undefined && destination !== null) { + queryParameters = queryParameters.set('destination', destination); + } + if (destinationType !== undefined && destinationType !== null) { + queryParameters = queryParameters.set('destinationType', destinationType); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/blockAllServicesOnDestination/dname-dtype`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Block all services currently assigned on this facility. Newly assigned services are still allowed for propagation. + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public blockAllServicesOnFacility(facility: number, observe?: 'body', reportProgress?: boolean): Observable; + public blockAllServicesOnFacility(facility: number, observe?: 'response', reportProgress?: boolean): Observable>; + public blockAllServicesOnFacility(facility: number, observe?: 'events', reportProgress?: boolean): Observable>; + public blockAllServicesOnFacility(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling blockAllServicesOnFacility.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/blockAllServicesOnFacility`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Bans Service on a destination. + * @param service id of Service + * @param destination id of Destination + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public blockServiceOnDestination(service: number, destination: number, observe?: 'body', reportProgress?: boolean): Observable; + public blockServiceOnDestination(service: number, destination: number, observe?: 'response', reportProgress?: boolean): Observable>; + public blockServiceOnDestination(service: number, destination: number, observe?: 'events', reportProgress?: boolean): Observable>; + public blockServiceOnDestination(service: number, destination: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling blockServiceOnDestination.'); + } + if (destination === null || destination === undefined) { + throw new Error('Required parameter destination was null or undefined when calling blockServiceOnDestination.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (destination !== undefined && destination !== null) { + queryParameters = queryParameters.set('destination', destination); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/blockServiceOnDestination/s-d`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Bans Service on a destination. + * @param service id of Service + * @param destination string name of destination + * @param destinationType Destination type (like host, user@host, user@host:port, email, service-specific, ...) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public blockServiceOnDestinationWithNameAndType(service: number, destination: string, destinationType: string, observe?: 'body', reportProgress?: boolean): Observable; + public blockServiceOnDestinationWithNameAndType(service: number, destination: string, destinationType: string, observe?: 'response', reportProgress?: boolean): Observable>; + public blockServiceOnDestinationWithNameAndType(service: number, destination: string, destinationType: string, observe?: 'events', reportProgress?: boolean): Observable>; + public blockServiceOnDestinationWithNameAndType(service: number, destination: string, destinationType: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling blockServiceOnDestinationWithNameAndType.'); + } + if (destination === null || destination === undefined) { + throw new Error('Required parameter destination was null or undefined when calling blockServiceOnDestinationWithNameAndType.'); + } + if (destinationType === null || destinationType === undefined) { + throw new Error('Required parameter destinationType was null or undefined when calling blockServiceOnDestinationWithNameAndType.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (destination !== undefined && destination !== null) { + queryParameters = queryParameters.set('destination', destination); + } + if (destinationType !== undefined && destinationType !== null) { + queryParameters = queryParameters.set('destinationType', destinationType); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/blockServiceOnDestination/s-dname-dtype`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Bans service on a facility. + * @param service id of Service + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public blockServiceOnFacility(service: number, facility: number, observe?: 'body', reportProgress?: boolean): Observable; + public blockServiceOnFacility(service: number, facility: number, observe?: 'response', reportProgress?: boolean): Observable>; + public blockServiceOnFacility(service: number, facility: number, observe?: 'events', reportProgress?: boolean): Observable>; + public blockServiceOnFacility(service: number, facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling blockServiceOnFacility.'); + } + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling blockServiceOnFacility.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/blockServiceOnFacility`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Creates a new service. + * @param name name + * @param description description + * @param script script which should be constructed like ./service_name (where anything else than [a-z,A-Z] is converted to _) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createService(name: string, description: string, script: string, observe?: 'body', reportProgress?: boolean): Observable; + public createService(name: string, description: string, script: string, observe?: 'response', reportProgress?: boolean): Observable>; + public createService(name: string, description: string, script: string, observe?: 'events', reportProgress?: boolean): Observable>; + public createService(name: string, description: string, script: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling createService.'); + } + if (description === null || description === undefined) { + throw new Error('Required parameter description was null or undefined when calling createService.'); + } + if (script === null || script === undefined) { + throw new Error('Required parameter script was null or undefined when calling createService.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (name !== undefined && name !== null) { + queryParameters = queryParameters.set('name', name); + } + if (description !== undefined && description !== null) { + queryParameters = queryParameters.set('description', description); + } + if (script !== undefined && script !== null) { + queryParameters = queryParameters.set('script', script); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/createService`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Creates a new service. Service object must contain name. Parameters desctiption, script, delay, recurrence, enabled are optional. Other parameters ignored. + * @param inputCreateService + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createServiceWithService(inputCreateService: InputCreateService, observe?: 'body', reportProgress?: boolean): Observable; + public createServiceWithService(inputCreateService: InputCreateService, observe?: 'response', reportProgress?: boolean): Observable>; + public createServiceWithService(inputCreateService: InputCreateService, observe?: 'events', reportProgress?: boolean): Observable>; + public createServiceWithService(inputCreateService: InputCreateService, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputCreateService === null || inputCreateService === undefined) { + throw new Error('Required parameter inputCreateService was null or undefined when calling createServiceWithService.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/servicesManager/createService`, + inputCreateService, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Creates a new services package. + * @param inputCreateServicesPackage + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createServicesPackage(inputCreateServicesPackage: InputCreateServicesPackage, observe?: 'body', reportProgress?: boolean): Observable; + public createServicesPackage(inputCreateServicesPackage: InputCreateServicesPackage, observe?: 'response', reportProgress?: boolean): Observable>; + public createServicesPackage(inputCreateServicesPackage: InputCreateServicesPackage, observe?: 'events', reportProgress?: boolean): Observable>; + public createServicesPackage(inputCreateServicesPackage: InputCreateServicesPackage, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputCreateServicesPackage === null || inputCreateServicesPackage === undefined) { + throw new Error('Required parameter inputCreateServicesPackage was null or undefined when calling createServicesPackage.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/servicesManager/createServicesPackage`, + inputCreateServicesPackage, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Creates a new services package. + * @param name name + * @param description description + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createServicesPackageByNameAndDescription(name: string, description: string, observe?: 'body', reportProgress?: boolean): Observable; + public createServicesPackageByNameAndDescription(name: string, description: string, observe?: 'response', reportProgress?: boolean): Observable>; + public createServicesPackageByNameAndDescription(name: string, description: string, observe?: 'events', reportProgress?: boolean): Observable>; + public createServicesPackageByNameAndDescription(name: string, description: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling createServicesPackageByNameAndDescription.'); + } + if (description === null || description === undefined) { + throw new Error('Required parameter description was null or undefined when calling createServicesPackageByNameAndDescription.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (name !== undefined && name !== null) { + queryParameters = queryParameters.set('name', name); + } + if (description !== undefined && description !== null) { + queryParameters = queryParameters.set('description', description); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/createServicesPackage`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Deletes a service. + * @param service id of Service + * @param force If true, delete entity forcefully. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteService(service: number, force?: boolean, observe?: 'body', reportProgress?: boolean): Observable; + public deleteService(service: number, force?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; + public deleteService(service: number, force?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; + public deleteService(service: number, force?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling deleteService.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (force !== undefined && force !== null) { + queryParameters = queryParameters.set('force', force); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/deleteService`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Deletes a services package. + * @param servicesPackage id of ServicesPackage + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteServicesPackage(servicesPackage: number, observe?: 'body', reportProgress?: boolean): Observable; + public deleteServicesPackage(servicesPackage: number, observe?: 'response', reportProgress?: boolean): Observable>; + public deleteServicesPackage(servicesPackage: number, observe?: 'events', reportProgress?: boolean): Observable>; + public deleteServicesPackage(servicesPackage: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (servicesPackage === null || servicesPackage === undefined) { + throw new Error('Required parameter servicesPackage was null or undefined when calling deleteServicesPackage.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (servicesPackage !== undefined && servicesPackage !== null) { + queryParameters = queryParameters.set('servicesPackage', servicesPackage); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/deleteServicesPackage`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Forces service propagation on defined facility. Return int 1 = true if it is possible, 0 = false if not + * @param service id of Service + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public forceServicePropagation(service: number, facility?: number, observe?: 'body', reportProgress?: boolean): Observable; + public forceServicePropagation(service: number, facility?: number, observe?: 'response', reportProgress?: boolean): Observable>; + public forceServicePropagation(service: number, facility?: number, observe?: 'events', reportProgress?: boolean): Observable>; + public forceServicePropagation(service: number, facility?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling forceServicePropagation.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/forceServicePropagation`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get list of all destinations. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllDestinations(observe?: 'body', reportProgress?: boolean): Observable>; + public getAllDestinations(observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllDestinations(observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllDestinations(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/servicesManager/getDestinations/all`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns list of all rich destinations defined for the facility. + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllRichDestinationsForFacility(facility: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAllRichDestinationsForFacility(facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllRichDestinationsForFacility(facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllRichDestinationsForFacility(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getAllRichDestinationsForFacility.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/servicesManager/getAllRichDestinations/f`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns list of all rich destinations defined for the service. + * @param service id of Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllRichDestinationsForService(service: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAllRichDestinationsForService(service: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllRichDestinationsForService(service: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllRichDestinationsForService(service: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling getAllRichDestinationsForService.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/servicesManager/getAllRichDestinations/s`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Lists resources assigned to service. + * @param service id of Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedResources(service: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAssignedResources(service: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAssignedResources(service: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAssignedResources(service: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling getAssignedResources.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/servicesManager/getAssignedResourcesForService`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * List all services associated with the facility (via resource). + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedServices(facility: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAssignedServices(facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAssignedServices(facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAssignedServices(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getAssignedServices.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/servicesManager/getAssignedServices`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Generates the list of attributes per each member associated with the resources and groups. + * @param service id of Service + * @param facility id of Facility + * @param filterExpiredMembers if true the method does not take members expired in groups into account + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDataWithGroups(service: number, facility: number, filterExpiredMembers?: boolean, observe?: 'body', reportProgress?: boolean): Observable; + public getDataWithGroups(service: number, facility: number, filterExpiredMembers?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; + public getDataWithGroups(service: number, facility: number, filterExpiredMembers?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; + public getDataWithGroups(service: number, facility: number, filterExpiredMembers?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling getDataWithGroups.'); + } + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getDataWithGroups.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (filterExpiredMembers !== undefined && filterExpiredMembers !== null) { + queryParameters = queryParameters.set('filterExpiredMembers', filterExpiredMembers); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/servicesManager/getDataWithGroups`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Generates the list of attributes per each member associated with the resources and groups in vos. + * @param service id of Service + * @param facility id of Facility + * @param filterExpiredMembers if true the method does not take members expired in groups into account + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDataWithVos(service: number, facility: number, filterExpiredMembers?: boolean, observe?: 'body', reportProgress?: boolean): Observable; + public getDataWithVos(service: number, facility: number, filterExpiredMembers?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; + public getDataWithVos(service: number, facility: number, filterExpiredMembers?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; + public getDataWithVos(service: number, facility: number, filterExpiredMembers?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling getDataWithVos.'); + } + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getDataWithVos.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (filterExpiredMembers !== undefined && filterExpiredMembers !== null) { + queryParameters = queryParameters.set('filterExpiredMembers', filterExpiredMembers); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/servicesManager/getDataWithVos`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns a destination by its id. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDestinationById(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public getDestinationById(id: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getDestinationById(id: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getDestinationById(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getDestinationById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/servicesManager/getDestinationById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns list of all destinations defined for the service and facility. + * @param service id of Service + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDestinations(service: number, facility: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getDestinations(service: number, facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getDestinations(service: number, facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getDestinations(service: number, facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling getDestinations.'); + } + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getDestinations.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/servicesManager/getDestinations/s-f`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Gets count of all destinations. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDestinationsCount(observe?: 'body', reportProgress?: boolean): Observable; + public getDestinationsCount(observe?: 'response', reportProgress?: boolean): Observable>; + public getDestinationsCount(observe?: 'events', reportProgress?: boolean): Observable>; + public getDestinationsCount(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/servicesManager/getDestinationsCount`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * List all destinations for all facilities which are joined by resources to the VO. + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilitiesDestinations(vo: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getFacilitiesDestinations(vo: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getFacilitiesDestinations(vo: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getFacilitiesDestinations(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getFacilitiesDestinations.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/servicesManager/getFacilitiesDestinations`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Return list of ServiceForGUI assigned on facility, (Service with \"allowedOnFacility\" property filled). 1 - allowed / 0 - service is service is denied. + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityAssignedServicesForGUI(facility: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getFacilityAssignedServicesForGUI(facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getFacilityAssignedServicesForGUI(facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getFacilityAssignedServicesForGUI(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getFacilityAssignedServicesForGUI.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/servicesManager/getFacilityAssignedServicesForGUI`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Generates the list of attributes per each user and per each resource. Never return member or member-resource attribute. + * @param service id of Service + * @param facility id of Facility + * @param filterExpiredMembers if true the method does not take members expired in groups into account + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFlatData(service: number, facility: number, filterExpiredMembers?: boolean, observe?: 'body', reportProgress?: boolean): Observable; + public getFlatData(service: number, facility: number, filterExpiredMembers?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; + public getFlatData(service: number, facility: number, filterExpiredMembers?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; + public getFlatData(service: number, facility: number, filterExpiredMembers?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling getFlatData.'); + } + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getFlatData.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (filterExpiredMembers !== undefined && filterExpiredMembers !== null) { + queryParameters = queryParameters.set('filterExpiredMembers', filterExpiredMembers); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/servicesManager/getFlatData`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Generates hashed group structure data for given service and facility. + * @param service id of Service + * @param facility id of Facility + * @param filterExpiredMembers if true the method does not take members expired in groups into account + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getHashedDataWithGroups(service: number, facility: number, filterExpiredMembers?: boolean, observe?: 'body', reportProgress?: boolean): Observable; + public getHashedDataWithGroups(service: number, facility: number, filterExpiredMembers?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; + public getHashedDataWithGroups(service: number, facility: number, filterExpiredMembers?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; + public getHashedDataWithGroups(service: number, facility: number, filterExpiredMembers?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling getHashedDataWithGroups.'); + } + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getHashedDataWithGroups.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (filterExpiredMembers !== undefined && filterExpiredMembers !== null) { + queryParameters = queryParameters.set('filterExpiredMembers', filterExpiredMembers); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/servicesManager/getHashedDataWithGroups`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Generates hashed hierarchical data structure for given service and facility. + * @param service id of Service + * @param facility id of Facility + * @param filterExpiredMembers if true the method does not take members expired in groups into account + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getHashedHierarchicalData(service: number, facility: number, filterExpiredMembers?: boolean, observe?: 'body', reportProgress?: boolean): Observable; + public getHashedHierarchicalData(service: number, facility: number, filterExpiredMembers?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; + public getHashedHierarchicalData(service: number, facility: number, filterExpiredMembers?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; + public getHashedHierarchicalData(service: number, facility: number, filterExpiredMembers?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling getHashedHierarchicalData.'); + } + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getHashedHierarchicalData.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (filterExpiredMembers !== undefined && filterExpiredMembers !== null) { + queryParameters = queryParameters.set('filterExpiredMembers', filterExpiredMembers); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/servicesManager/getHashedHierarchicalData`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Generates the list of attributes per each member associated with the resource. + * @param service id of Service + * @param facility id of Facility + * @param filterExpiredMembers if true the method does not take members expired in groups into account + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getHierarchicalData(service: number, facility: number, filterExpiredMembers?: boolean, observe?: 'body', reportProgress?: boolean): Observable; + public getHierarchicalData(service: number, facility: number, filterExpiredMembers?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; + public getHierarchicalData(service: number, facility: number, filterExpiredMembers?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; + public getHierarchicalData(service: number, facility: number, filterExpiredMembers?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling getHierarchicalData.'); + } + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getHierarchicalData.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (filterExpiredMembers !== undefined && filterExpiredMembers !== null) { + queryParameters = queryParameters.set('filterExpiredMembers', filterExpiredMembers); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/servicesManager/getHierarchicalData`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns list of all rich destinations defined for the service and facility. + * @param service id of Service + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRichDestinations(service: number, facility: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getRichDestinations(service: number, facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getRichDestinations(service: number, facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getRichDestinations(service: number, facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling getRichDestinations.'); + } + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getRichDestinations.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/servicesManager/getRichDestinations`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns a service by its id. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getServiceById(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public getServiceById(id: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getServiceById(id: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getServiceById(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getServiceById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/servicesManager/getServiceById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns a service by its name. + * @param name name of entity + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getServiceByName(name: string, observe?: 'body', reportProgress?: boolean): Observable; + public getServiceByName(name: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getServiceByName(name: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getServiceByName(name: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling getServiceByName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (name !== undefined && name !== null) { + queryParameters = queryParameters.set('name', name); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/servicesManager/getServiceByName`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns all services. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getServices(observe?: 'body', reportProgress?: boolean): Observable>; + public getServices(observe?: 'response', reportProgress?: boolean): Observable>>; + public getServices(observe?: 'events', reportProgress?: boolean): Observable>>; + public getServices(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/servicesManager/getServices`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns list of denials for a destination. + * @param destination id of Destination + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getServicesBlockedOnDestination(destination: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getServicesBlockedOnDestination(destination: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getServicesBlockedOnDestination(destination: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getServicesBlockedOnDestination(destination: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (destination === null || destination === undefined) { + throw new Error('Required parameter destination was null or undefined when calling getServicesBlockedOnDestination.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (destination !== undefined && destination !== null) { + queryParameters = queryParameters.set('destination', destination); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/servicesManager/getServicesBlockedOnDestination`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns list of denials for a facility. + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getServicesBlockedOnFacility(facility: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getServicesBlockedOnFacility(facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getServicesBlockedOnFacility(facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getServicesBlockedOnFacility(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getServicesBlockedOnFacility.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/servicesManager/getServicesBlockedOnFacility`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all services with given attribute. + * @param attributeDefinition id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getServicesByAttributeDefinition(attributeDefinition: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getServicesByAttributeDefinition(attributeDefinition: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getServicesByAttributeDefinition(attributeDefinition: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getServicesByAttributeDefinition(attributeDefinition: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (attributeDefinition === null || attributeDefinition === undefined) { + throw new Error('Required parameter attributeDefinition was null or undefined when calling getServicesByAttributeDefinition.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (attributeDefinition !== undefined && attributeDefinition !== null) { + queryParameters = queryParameters.set('attributeDefinition', attributeDefinition); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/servicesManager/getServicesByAttributeDefinition`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Lists services stored in a package. + * @param servicesPackage id of ServicesPackage + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getServicesFromServicesPackage(servicesPackage: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getServicesFromServicesPackage(servicesPackage: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getServicesFromServicesPackage(servicesPackage: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getServicesFromServicesPackage(servicesPackage: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (servicesPackage === null || servicesPackage === undefined) { + throw new Error('Required parameter servicesPackage was null or undefined when calling getServicesFromServicesPackage.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (servicesPackage !== undefined && servicesPackage !== null) { + queryParameters = queryParameters.set('servicesPackage', servicesPackage); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/servicesManager/getServicesFromServicesPackage`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Gets package by id. + * @param servicesPackage id of ServicesPackage + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getServicesPackageById(servicesPackage: number, observe?: 'body', reportProgress?: boolean): Observable; + public getServicesPackageById(servicesPackage: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getServicesPackageById(servicesPackage: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getServicesPackageById(servicesPackage: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (servicesPackage === null || servicesPackage === undefined) { + throw new Error('Required parameter servicesPackage was null or undefined when calling getServicesPackageById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (servicesPackage !== undefined && servicesPackage !== null) { + queryParameters = queryParameters.set('servicesPackage', servicesPackage); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/servicesManager/getServicesPackageById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Gets package by name. + * @param name ServicesPackage name + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getServicesPackageByName(name: string, observe?: 'body', reportProgress?: boolean): Observable; + public getServicesPackageByName(name: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getServicesPackageByName(name: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getServicesPackageByName(name: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling getServicesPackageByName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (name !== undefined && name !== null) { + queryParameters = queryParameters.set('name', name); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/servicesManager/getServicesPackageByName`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns packages. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getServicesPackages(observe?: 'body', reportProgress?: boolean): Observable>; + public getServicesPackages(observe?: 'response', reportProgress?: boolean): Observable>>; + public getServicesPackages(observe?: 'events', reportProgress?: boolean): Observable>>; + public getServicesPackages(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/servicesManager/getServicesPackages`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Is this Service denied on the destination? Return int 1 = true - the Service is denied on the destination, 0 = false - the Service is NOT denied on the destination + * @param service id of Service + * @param destination id of Destination + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public isServiceBlockedOnDestination(service: number, destination: number, observe?: 'body', reportProgress?: boolean): Observable; + public isServiceBlockedOnDestination(service: number, destination: number, observe?: 'response', reportProgress?: boolean): Observable>; + public isServiceBlockedOnDestination(service: number, destination: number, observe?: 'events', reportProgress?: boolean): Observable>; + public isServiceBlockedOnDestination(service: number, destination: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling isServiceBlockedOnDestination.'); + } + if (destination === null || destination === undefined) { + throw new Error('Required parameter destination was null or undefined when calling isServiceBlockedOnDestination.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (destination !== undefined && destination !== null) { + queryParameters = queryParameters.set('destination', destination); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/servicesManager/isServiceBlockedOnDestination`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Is this Service denied on the facility? Return int 1 = true - the Service is denied on the facility, 0 = false - the Service is NOT denied on the facility + * @param service id of Service + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public isServiceBlockedOnFacility(service: number, facility: number, observe?: 'body', reportProgress?: boolean): Observable; + public isServiceBlockedOnFacility(service: number, facility: number, observe?: 'response', reportProgress?: boolean): Observable>; + public isServiceBlockedOnFacility(service: number, facility: number, observe?: 'events', reportProgress?: boolean): Observable>; + public isServiceBlockedOnFacility(service: number, facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling isServiceBlockedOnFacility.'); + } + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling isServiceBlockedOnFacility.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/servicesManager/isServiceBlockedOnFacility`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Plans service propagation on defined facility. Return int 1 = true if it is possible, 0 = false if not + * @param service id of Service + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public planServicePropagation(service: number, facility?: number, observe?: 'body', reportProgress?: boolean): Observable; + public planServicePropagation(service: number, facility?: number, observe?: 'response', reportProgress?: boolean): Observable>; + public planServicePropagation(service: number, facility?: number, observe?: 'events', reportProgress?: boolean): Observable>; + public planServicePropagation(service: number, facility?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling planServicePropagation.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/planServicePropagation`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Removes all destinations from a facility and service. + * @param service id of Service + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeAllDestinations(service: number, facility: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeAllDestinations(service: number, facility: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeAllDestinations(service: number, facility: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeAllDestinations(service: number, facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling removeAllDestinations.'); + } + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling removeAllDestinations.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/removeAllDestinations`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove all required attributes from service. + * @param service id of Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeAllRequiredAttributes(service: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeAllRequiredAttributes(service: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeAllRequiredAttributes(service: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeAllRequiredAttributes(service: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling removeAllRequiredAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/removeAllRequiredAttributes`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Removes the specified destination from the facility and service. + * @param service id of Service + * @param facility id of Facility + * @param destination Destination\'s destination + * @param type Destination\'s type + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeDestination(service: number, facility: number, destination: string, type: DestinationType, observe?: 'body', reportProgress?: boolean): Observable; + public removeDestination(service: number, facility: number, destination: string, type: DestinationType, observe?: 'response', reportProgress?: boolean): Observable>; + public removeDestination(service: number, facility: number, destination: string, type: DestinationType, observe?: 'events', reportProgress?: boolean): Observable>; + public removeDestination(service: number, facility: number, destination: string, type: DestinationType, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling removeDestination.'); + } + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling removeDestination.'); + } + if (destination === null || destination === undefined) { + throw new Error('Required parameter destination was null or undefined when calling removeDestination.'); + } + if (type === null || type === undefined) { + throw new Error('Required parameter type was null or undefined when calling removeDestination.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (destination !== undefined && destination !== null) { + queryParameters = queryParameters.set('destination', destination); + } + if (type !== undefined && type !== null) { + queryParameters = queryParameters.set('type', type); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/removeDestination`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove required attribute from service. + * @param service id of Service + * @param attributeId id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeRequiredAttribute(service: number, attributeId: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeRequiredAttribute(service: number, attributeId: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeRequiredAttribute(service: number, attributeId: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeRequiredAttribute(service: number, attributeId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling removeRequiredAttribute.'); + } + if (attributeId === null || attributeId === undefined) { + throw new Error('Required parameter attributeId was null or undefined when calling removeRequiredAttribute.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (attributeId !== undefined && attributeId !== null) { + queryParameters = queryParameters.set('attributeId', attributeId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/removeRequiredAttribute`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove required attributes from service. + * @param service id of Service + * @param attributes list of attribute ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeRequiredAttributes(service: number, attributes: Array, observe?: 'body', reportProgress?: boolean): Observable; + public removeRequiredAttributes(service: number, attributes: Array, observe?: 'response', reportProgress?: boolean): Observable>; + public removeRequiredAttributes(service: number, attributes: Array, observe?: 'events', reportProgress?: boolean): Observable>; + public removeRequiredAttributes(service: number, attributes: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling removeRequiredAttributes.'); + } + if (attributes === null || attributes === undefined) { + throw new Error('Required parameter attributes was null or undefined when calling removeRequiredAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/removeRequiredAttributes`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Removes a Service from a Services Package. + * @param servicesPackage id of ServicesPackage + * @param service id of Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeServiceFromServicesPackage(servicesPackage: number, service: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeServiceFromServicesPackage(servicesPackage: number, service: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeServiceFromServicesPackage(servicesPackage: number, service: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeServiceFromServicesPackage(servicesPackage: number, service: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (servicesPackage === null || servicesPackage === undefined) { + throw new Error('Required parameter servicesPackage was null or undefined when calling removeServiceFromServicesPackage.'); + } + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling removeServiceFromServicesPackage.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (servicesPackage !== undefined && servicesPackage !== null) { + queryParameters = queryParameters.set('servicesPackage', servicesPackage); + } + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/removeServiceFromServicesPackage`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Erase all the possible denials on this destination. + * @param destination id of Destination + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public unblockAllServicesOnDestinationById(destination: number, observe?: 'body', reportProgress?: boolean): Observable; + public unblockAllServicesOnDestinationById(destination: number, observe?: 'response', reportProgress?: boolean): Observable>; + public unblockAllServicesOnDestinationById(destination: number, observe?: 'events', reportProgress?: boolean): Observable>; + public unblockAllServicesOnDestinationById(destination: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (destination === null || destination === undefined) { + throw new Error('Required parameter destination was null or undefined when calling unblockAllServicesOnDestinationById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (destination !== undefined && destination !== null) { + queryParameters = queryParameters.set('destination', destination); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/unblockAllServicesOnDestination/d`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Erase all the possible denials on this destination. + * @param destination string name of destination + * @param destinationType Destination type (like host, user@host, user@host:port, email, service-specific, ...) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public unblockAllServicesOnDestinationByName(destination: string, destinationType: string, observe?: 'body', reportProgress?: boolean): Observable; + public unblockAllServicesOnDestinationByName(destination: string, destinationType: string, observe?: 'response', reportProgress?: boolean): Observable>; + public unblockAllServicesOnDestinationByName(destination: string, destinationType: string, observe?: 'events', reportProgress?: boolean): Observable>; + public unblockAllServicesOnDestinationByName(destination: string, destinationType: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (destination === null || destination === undefined) { + throw new Error('Required parameter destination was null or undefined when calling unblockAllServicesOnDestinationByName.'); + } + if (destinationType === null || destinationType === undefined) { + throw new Error('Required parameter destinationType was null or undefined when calling unblockAllServicesOnDestinationByName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (destination !== undefined && destination !== null) { + queryParameters = queryParameters.set('destination', destination); + } + if (destinationType !== undefined && destinationType !== null) { + queryParameters = queryParameters.set('destinationType', destinationType); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/unblockAllServicesOnDestination/dname-dtype`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Erase all the possible denials on this facility. + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public unblockAllServicesOnFacility(facility: number, observe?: 'body', reportProgress?: boolean): Observable; + public unblockAllServicesOnFacility(facility: number, observe?: 'response', reportProgress?: boolean): Observable>; + public unblockAllServicesOnFacility(facility: number, observe?: 'events', reportProgress?: boolean): Observable>; + public unblockAllServicesOnFacility(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling unblockAllServicesOnFacility.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/unblockAllServicesOnFacility`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Free the denial of the Service on this destination. If the Service was banned on this destination, it will be freed. In case the Service was not banned on this destination, nothing will happen. + * @param service id of Service + * @param destination id of Destination + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public unblockServiceOnDestinationById(service: number, destination: number, observe?: 'body', reportProgress?: boolean): Observable; + public unblockServiceOnDestinationById(service: number, destination: number, observe?: 'response', reportProgress?: boolean): Observable>; + public unblockServiceOnDestinationById(service: number, destination: number, observe?: 'events', reportProgress?: boolean): Observable>; + public unblockServiceOnDestinationById(service: number, destination: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling unblockServiceOnDestinationById.'); + } + if (destination === null || destination === undefined) { + throw new Error('Required parameter destination was null or undefined when calling unblockServiceOnDestinationById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (destination !== undefined && destination !== null) { + queryParameters = queryParameters.set('destination', destination); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/unblockServiceOnDestination/s-d`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Free the denial of the Service on this destination. If the Service was banned on this destination, it will be freed. In case the Service was not banned on this destination, nothing will happen. + * @param service id of Service + * @param destination string name of destination + * @param destinationType Destination type (like host, user@host, user@host:port, email, service-specific, ...) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public unblockServiceOnDestinationByName(service: number, destination: string, destinationType: string, observe?: 'body', reportProgress?: boolean): Observable; + public unblockServiceOnDestinationByName(service: number, destination: string, destinationType: string, observe?: 'response', reportProgress?: boolean): Observable>; + public unblockServiceOnDestinationByName(service: number, destination: string, destinationType: string, observe?: 'events', reportProgress?: boolean): Observable>; + public unblockServiceOnDestinationByName(service: number, destination: string, destinationType: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling unblockServiceOnDestinationByName.'); + } + if (destination === null || destination === undefined) { + throw new Error('Required parameter destination was null or undefined when calling unblockServiceOnDestinationByName.'); + } + if (destinationType === null || destinationType === undefined) { + throw new Error('Required parameter destinationType was null or undefined when calling unblockServiceOnDestinationByName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (destination !== undefined && destination !== null) { + queryParameters = queryParameters.set('destination', destination); + } + if (destinationType !== undefined && destinationType !== null) { + queryParameters = queryParameters.set('destinationType', destinationType); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/unblockServiceOnDestination/s-dname-dtype`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Free the denial of the Service on this facility. If the Service was banned on this facility, it will be freed. In case the Service was not banned on this facility, nothing will happen. + * @param service id of Service + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public unblockServiceOnFacility(service: number, facility: number, observe?: 'body', reportProgress?: boolean): Observable; + public unblockServiceOnFacility(service: number, facility: number, observe?: 'response', reportProgress?: boolean): Observable>; + public unblockServiceOnFacility(service: number, facility: number, observe?: 'events', reportProgress?: boolean): Observable>; + public unblockServiceOnFacility(service: number, facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling unblockServiceOnFacility.'); + } + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling unblockServiceOnFacility.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/unblockServiceOnFacility`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Updates a service. + * @param inputUpdateService + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateService(inputUpdateService: InputUpdateService, observe?: 'body', reportProgress?: boolean): Observable; + public updateService(inputUpdateService: InputUpdateService, observe?: 'response', reportProgress?: boolean): Observable>; + public updateService(inputUpdateService: InputUpdateService, observe?: 'events', reportProgress?: boolean): Observable>; + public updateService(inputUpdateService: InputUpdateService, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputUpdateService === null || inputUpdateService === undefined) { + throw new Error('Required parameter inputUpdateService was null or undefined when calling updateService.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/servicesManager/updateService`, + inputUpdateService, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Updates a service package. + * @param inputUpdateServicesPackage + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateServicesPackage(inputUpdateServicesPackage: InputUpdateServicesPackage, observe?: 'body', reportProgress?: boolean): Observable; + public updateServicesPackage(inputUpdateServicesPackage: InputUpdateServicesPackage, observe?: 'response', reportProgress?: boolean): Observable>; + public updateServicesPackage(inputUpdateServicesPackage: InputUpdateServicesPackage, observe?: 'events', reportProgress?: boolean): Observable>; + public updateServicesPackage(inputUpdateServicesPackage: InputUpdateServicesPackage, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputUpdateServicesPackage === null || inputUpdateServicesPackage === undefined) { + throw new Error('Required parameter inputUpdateServicesPackage was null or undefined when calling updateServicesPackage.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/servicesManager/updateServicesPackage`, + inputUpdateServicesPackage, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } - return this.httpClient.post( - `${this.configuration.basePath}/json/servicesManager/updateServicesPackage`, - inputUpdateServicesPackage, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } } diff --git a/libs/perun/openapi/src/lib/api/tasksManager.service.ts b/libs/perun/openapi/src/lib/api/tasksManager.service.ts index 65c8c89d2..a34ed6ae5 100644 --- a/libs/perun/openapi/src/lib/api/tasksManager.service.ts +++ b/libs/perun/openapi/src/lib/api/tasksManager.service.ts @@ -11,17 +11,11 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { FacilityState } from '../model/facilityState'; import { PerunException } from '../model/perunException'; @@ -34,1733 +28,1317 @@ import { TaskIdObject } from '../model/taskIdObject'; import { TaskResult } from '../model/taskResult'; import { TaskResultIdObject } from '../model/taskResultIdObject'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class TasksManagerService { - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration - ) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - /** - * Returns the count of all tasks. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public countTasks(observe?: 'body', reportProgress?: boolean): Observable; - public countTasks( - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public countTasks(observe?: 'events', reportProgress?: boolean): Observable>; - public countTasks(observe: any = 'body', reportProgress: boolean = false): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/tasksManager/countTasks`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Delete Task and TaskResults. - * @param taskIdObject - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteTask( - taskIdObject: TaskIdObject, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public deleteTask( - taskIdObject: TaskIdObject, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deleteTask( - taskIdObject: TaskIdObject, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deleteTask( - taskIdObject: TaskIdObject, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (taskIdObject === null || taskIdObject === undefined) { - throw new Error( - 'Required parameter taskIdObject was null or undefined when calling deleteTask.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/tasksManager/deleteTask`, - taskIdObject, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Delete TaskResult by its ID. - * @param taskResultIdObject - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteTaskResultById( - taskResultIdObject: TaskResultIdObject, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public deleteTaskResultById( - taskResultIdObject: TaskResultIdObject, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deleteTaskResultById( - taskResultIdObject: TaskResultIdObject, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deleteTaskResultById( - taskResultIdObject: TaskResultIdObject, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (taskResultIdObject === null || taskResultIdObject === undefined) { - throw new Error( - 'Required parameter taskResultIdObject was null or undefined when calling deleteTaskResultById.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/tasksManager/deleteTaskResultById`, - taskResultIdObject, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Delete all TaskResults for specified Task and Destination. - * @param taskAndDestinationIdObject - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteTaskResultsIds( - taskAndDestinationIdObject: TaskAndDestinationIdObject, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public deleteTaskResultsIds( - taskAndDestinationIdObject: TaskAndDestinationIdObject, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deleteTaskResultsIds( - taskAndDestinationIdObject: TaskAndDestinationIdObject, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deleteTaskResultsIds( - taskAndDestinationIdObject: TaskAndDestinationIdObject, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (taskAndDestinationIdObject === null || taskAndDestinationIdObject === undefined) { - throw new Error( - 'Required parameter taskAndDestinationIdObject was null or undefined when calling deleteTaskResultsIds.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/tasksManager/deleteTaskResults/id`, - taskAndDestinationIdObject, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Delete all TaskResults for specified Task and Destination. - * @param taskAndDestinationNameObject - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteTaskResultsNames( - taskAndDestinationNameObject: TaskAndDestinationNameObject, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public deleteTaskResultsNames( - taskAndDestinationNameObject: TaskAndDestinationNameObject, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deleteTaskResultsNames( - taskAndDestinationNameObject: TaskAndDestinationNameObject, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deleteTaskResultsNames( - taskAndDestinationNameObject: TaskAndDestinationNameObject, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (taskAndDestinationNameObject === null || taskAndDestinationNameObject === undefined) { - throw new Error( - 'Required parameter taskAndDestinationNameObject was null or undefined when calling deleteTaskResultsNames.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/tasksManager/deleteTaskResults/name`, - taskAndDestinationNameObject, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Return propagation status of all facilities in Perun/Vo. - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllFacilitiesStates( - vo?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAllFacilitiesStates( - vo?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllFacilitiesStates( - vo?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAllFacilitiesStates( - vo?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/tasksManager/getAllFacilitiesStates`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Return propagation status of all resources related to VO. - * @param voId VO id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllResourcesState( - voId: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAllResourcesState( - voId: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllResourcesState( - voId: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAllResourcesState( - voId: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (voId === null || voId === undefined) { - throw new Error( - 'Required parameter voId was null or undefined when calling getAllResourcesState.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (voId !== undefined && voId !== null) { - queryParameters = queryParameters.set('voId', voId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/tasksManager/getAllResourcesState`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns service states for defined facility. - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityServicesState( - facility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getFacilityServicesState( - facility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getFacilityServicesState( - facility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getFacilityServicesState( - facility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getFacilityServicesState.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/tasksManager/getFacilityServicesState`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Return propagation status of facility. - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityState( - facility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getFacilityState( - facility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getFacilityState( - facility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getFacilityState( - facility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getFacilityState.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/tasksManager/getFacilityState`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns a task. - * @param service id of Service - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getTask( - service: number, - facility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getTask( - service: number, - facility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getTask( - service: number, - facility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getTask( - service: number, - facility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling getTask.'); - } - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getTask.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get(`${this.configuration.basePath}/json/tasksManager/getTask`, { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - }); - } - - /** - * Returns Task by its id - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getTaskById(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public getTaskById( - id: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getTaskById( - id: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getTaskById( - id: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getTaskById.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/tasksManager/getTaskById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns TaskResult by its id. - * @param taskResult TaskResult id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getTaskResultById( - taskResult: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getTaskResultById( - taskResult: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getTaskResultById( - taskResult: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getTaskResultById( - taskResult: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (taskResult === null || taskResult === undefined) { - throw new Error( - 'Required parameter taskResult was null or undefined when calling getTaskResultById.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (taskResult !== undefined && taskResult !== null) { - queryParameters = queryParameters.set('taskResult', taskResult); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/tasksManager/getTaskResultById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns all task results. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getTaskResults(observe?: 'body', reportProgress?: boolean): Observable>; - public getTaskResults( - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getTaskResults( - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getTaskResults(observe: any = 'body', reportProgress: boolean = false): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/tasksManager/getTaskResults`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Return list of TaskResults by a Task. - * @param task Task id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getTaskResultsByTask( - task: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getTaskResultsByTask( - task: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getTaskResultsByTask( - task: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getTaskResultsByTask( - task: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (task === null || task === undefined) { - throw new Error( - 'Required parameter task was null or undefined when calling getTaskResultsByTask.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (task !== undefined && task !== null) { - queryParameters = queryParameters.set('task', task); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/tasksManager/getTaskResultsByTask`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns task results for defined destinations. - * @param destinations List<String> Destinations - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getTaskResultsForDestinations( - destinations: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getTaskResultsForDestinations( - destinations: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getTaskResultsForDestinations( - destinations: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getTaskResultsForDestinations( - destinations: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (destinations === null || destinations === undefined) { - throw new Error( - 'Required parameter destinations was null or undefined when calling getTaskResultsForDestinations.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (destinations) { - destinations.forEach((element) => { - queryParameters = queryParameters.append('destinations[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/tasksManager/getTaskResultsForDestinations`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Return list of TaskResults by a Task for GUI. - * @param task Task id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getTaskResultsForGUIByTask( - task: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getTaskResultsForGUIByTask( - task: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getTaskResultsForGUIByTask( - task: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getTaskResultsForGUIByTask( - task: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (task === null || task === undefined) { - throw new Error( - 'Required parameter task was null or undefined when calling getTaskResultsForGUIByTask.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (task !== undefined && task !== null) { - queryParameters = queryParameters.set('task', task); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/tasksManager/getTaskResultsForGUIByTask`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Return list of TaskResults by a Task and destination for GUI. - * @param task Task id - * @param destination id of Destination - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getTaskResultsForGUIByTaskAndDestination( - task: number, - destination: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getTaskResultsForGUIByTaskAndDestination( - task: number, - destination: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getTaskResultsForGUIByTaskAndDestination( - task: number, - destination: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getTaskResultsForGUIByTaskAndDestination( - task: number, - destination: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (task === null || task === undefined) { - throw new Error( - 'Required parameter task was null or undefined when calling getTaskResultsForGUIByTaskAndDestination.' - ); - } - if (destination === null || destination === undefined) { - throw new Error( - 'Required parameter destination was null or undefined when calling getTaskResultsForGUIByTaskAndDestination.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (task !== undefined && task !== null) { - queryParameters = queryParameters.set('task', task); - } - if (destination !== undefined && destination !== null) { - queryParameters = queryParameters.set('destination', destination); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/tasksManager/getTaskResultsForGUIByTaskAndDestination`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Return list of only newest TaskResults by a Task for GUI. - * @param task Task id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getTaskResultsForGUIByTaskOnlyNewest( - task: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getTaskResultsForGUIByTaskOnlyNewest( - task: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getTaskResultsForGUIByTaskOnlyNewest( - task: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getTaskResultsForGUIByTaskOnlyNewest( - task: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (task === null || task === undefined) { - throw new Error( - 'Required parameter task was null or undefined when calling getTaskResultsForGUIByTaskOnlyNewest.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (task !== undefined && task !== null) { - queryParameters = queryParameters.set('task', task); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/tasksManager/getTaskResultsForGUIByTaskOnlyNewest`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Whether task exists. - * @param service id of Service - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public isThereSuchTask( - service: number, - facility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public isThereSuchTask( - service: number, - facility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public isThereSuchTask( - service: number, - facility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public isThereSuchTask( - service: number, - facility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (service === null || service === undefined) { - throw new Error( - 'Required parameter service was null or undefined when calling isThereSuchTask.' - ); - } - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling isThereSuchTask.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/tasksManager/isThereSuchTask`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns all tasks. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public listAllTasks(observe?: 'body', reportProgress?: boolean): Observable>; - public listAllTasks( - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public listAllTasks( - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public listAllTasks(observe: any = 'body', reportProgress: boolean = false): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/tasksManager/listAllTasks`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns all tasks associated with selected facility. - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public listAllTasksForFacility( - facility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public listAllTasksForFacility( - facility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public listAllTasksForFacility( - facility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public listAllTasksForFacility( - facility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling listAllTasksForFacility.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/tasksManager/listAllTasksForFacility`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Suspends waiting tasks propagation to the engine. Does not affect already propagated tasks. - * @param suspend if true stops propagating waiting tasks to the engine, if false resumes propagation - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public suspendTasksPropagation( - suspend: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public suspendTasksPropagation( - suspend: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public suspendTasksPropagation( - suspend: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public suspendTasksPropagation( - suspend: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (suspend === null || suspend === undefined) { - throw new Error( - 'Required parameter suspend was null or undefined when calling suspendTasksPropagation.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (suspend !== undefined && suspend !== null) { - queryParameters = queryParameters.set('suspend', suspend); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + + + /** + * Returns the count of all tasks. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public countTasks(observe?: 'body', reportProgress?: boolean): Observable; + public countTasks(observe?: 'response', reportProgress?: boolean): Observable>; + public countTasks(observe?: 'events', reportProgress?: boolean): Observable>; + public countTasks(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/tasksManager/countTasks`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Delete Task and TaskResults. + * @param taskIdObject + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteTask(taskIdObject: TaskIdObject, observe?: 'body', reportProgress?: boolean): Observable; + public deleteTask(taskIdObject: TaskIdObject, observe?: 'response', reportProgress?: boolean): Observable>; + public deleteTask(taskIdObject: TaskIdObject, observe?: 'events', reportProgress?: boolean): Observable>; + public deleteTask(taskIdObject: TaskIdObject, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (taskIdObject === null || taskIdObject === undefined) { + throw new Error('Required parameter taskIdObject was null or undefined when calling deleteTask.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/tasksManager/deleteTask`, + taskIdObject, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Delete TaskResult by its ID. + * @param taskResultIdObject + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteTaskResultById(taskResultIdObject: TaskResultIdObject, observe?: 'body', reportProgress?: boolean): Observable; + public deleteTaskResultById(taskResultIdObject: TaskResultIdObject, observe?: 'response', reportProgress?: boolean): Observable>; + public deleteTaskResultById(taskResultIdObject: TaskResultIdObject, observe?: 'events', reportProgress?: boolean): Observable>; + public deleteTaskResultById(taskResultIdObject: TaskResultIdObject, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (taskResultIdObject === null || taskResultIdObject === undefined) { + throw new Error('Required parameter taskResultIdObject was null or undefined when calling deleteTaskResultById.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/tasksManager/deleteTaskResultById`, + taskResultIdObject, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Delete all TaskResults for specified Task and Destination. + * @param taskAndDestinationIdObject + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteTaskResultsIds(taskAndDestinationIdObject: TaskAndDestinationIdObject, observe?: 'body', reportProgress?: boolean): Observable; + public deleteTaskResultsIds(taskAndDestinationIdObject: TaskAndDestinationIdObject, observe?: 'response', reportProgress?: boolean): Observable>; + public deleteTaskResultsIds(taskAndDestinationIdObject: TaskAndDestinationIdObject, observe?: 'events', reportProgress?: boolean): Observable>; + public deleteTaskResultsIds(taskAndDestinationIdObject: TaskAndDestinationIdObject, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (taskAndDestinationIdObject === null || taskAndDestinationIdObject === undefined) { + throw new Error('Required parameter taskAndDestinationIdObject was null or undefined when calling deleteTaskResultsIds.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/tasksManager/deleteTaskResults/id`, + taskAndDestinationIdObject, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Delete all TaskResults for specified Task and Destination. + * @param taskAndDestinationNameObject + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteTaskResultsNames(taskAndDestinationNameObject: TaskAndDestinationNameObject, observe?: 'body', reportProgress?: boolean): Observable; + public deleteTaskResultsNames(taskAndDestinationNameObject: TaskAndDestinationNameObject, observe?: 'response', reportProgress?: boolean): Observable>; + public deleteTaskResultsNames(taskAndDestinationNameObject: TaskAndDestinationNameObject, observe?: 'events', reportProgress?: boolean): Observable>; + public deleteTaskResultsNames(taskAndDestinationNameObject: TaskAndDestinationNameObject, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (taskAndDestinationNameObject === null || taskAndDestinationNameObject === undefined) { + throw new Error('Required parameter taskAndDestinationNameObject was null or undefined when calling deleteTaskResultsNames.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/tasksManager/deleteTaskResults/name`, + taskAndDestinationNameObject, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Return propagation status of all facilities in Perun/Vo. + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllFacilitiesStates(vo?: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAllFacilitiesStates(vo?: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllFacilitiesStates(vo?: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllFacilitiesStates(vo?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/tasksManager/getAllFacilitiesStates`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Return propagation status of all resources related to VO. + * @param voId VO id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllResourcesState(voId: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAllResourcesState(voId: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllResourcesState(voId: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllResourcesState(voId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (voId === null || voId === undefined) { + throw new Error('Required parameter voId was null or undefined when calling getAllResourcesState.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (voId !== undefined && voId !== null) { + queryParameters = queryParameters.set('voId', voId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/tasksManager/getAllResourcesState`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns service states for defined facility. + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityServicesState(facility: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getFacilityServicesState(facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getFacilityServicesState(facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getFacilityServicesState(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getFacilityServicesState.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/tasksManager/getFacilityServicesState`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Return propagation status of facility. + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityState(facility: number, observe?: 'body', reportProgress?: boolean): Observable; + public getFacilityState(facility: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getFacilityState(facility: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getFacilityState(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getFacilityState.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/tasksManager/getFacilityState`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns a task. + * @param service id of Service + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getTask(service: number, facility: number, observe?: 'body', reportProgress?: boolean): Observable; + public getTask(service: number, facility: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getTask(service: number, facility: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getTask(service: number, facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling getTask.'); + } + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getTask.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/tasksManager/getTask`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns Task by its id + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getTaskById(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public getTaskById(id: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getTaskById(id: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getTaskById(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getTaskById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/tasksManager/getTaskById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns TaskResult by its id. + * @param taskResult TaskResult id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getTaskResultById(taskResult: number, observe?: 'body', reportProgress?: boolean): Observable; + public getTaskResultById(taskResult: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getTaskResultById(taskResult: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getTaskResultById(taskResult: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (taskResult === null || taskResult === undefined) { + throw new Error('Required parameter taskResult was null or undefined when calling getTaskResultById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (taskResult !== undefined && taskResult !== null) { + queryParameters = queryParameters.set('taskResult', taskResult); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/tasksManager/getTaskResultById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns all task results. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getTaskResults(observe?: 'body', reportProgress?: boolean): Observable>; + public getTaskResults(observe?: 'response', reportProgress?: boolean): Observable>>; + public getTaskResults(observe?: 'events', reportProgress?: boolean): Observable>>; + public getTaskResults(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/tasksManager/getTaskResults`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Return list of TaskResults by a Task. + * @param task Task id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getTaskResultsByTask(task: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getTaskResultsByTask(task: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getTaskResultsByTask(task: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getTaskResultsByTask(task: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (task === null || task === undefined) { + throw new Error('Required parameter task was null or undefined when calling getTaskResultsByTask.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (task !== undefined && task !== null) { + queryParameters = queryParameters.set('task', task); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/tasksManager/getTaskResultsByTask`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns task results for defined destinations. + * @param destinations List<String> Destinations + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getTaskResultsForDestinations(destinations: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getTaskResultsForDestinations(destinations: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getTaskResultsForDestinations(destinations: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getTaskResultsForDestinations(destinations: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (destinations === null || destinations === undefined) { + throw new Error('Required parameter destinations was null or undefined when calling getTaskResultsForDestinations.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (destinations) { + destinations.forEach((element) => { + queryParameters = queryParameters.append('destinations[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/tasksManager/getTaskResultsForDestinations`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Return list of TaskResults by a Task for GUI. + * @param task Task id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getTaskResultsForGUIByTask(task: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getTaskResultsForGUIByTask(task: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getTaskResultsForGUIByTask(task: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getTaskResultsForGUIByTask(task: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (task === null || task === undefined) { + throw new Error('Required parameter task was null or undefined when calling getTaskResultsForGUIByTask.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (task !== undefined && task !== null) { + queryParameters = queryParameters.set('task', task); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/tasksManager/getTaskResultsForGUIByTask`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Return list of TaskResults by a Task and destination for GUI. + * @param task Task id + * @param destination id of Destination + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getTaskResultsForGUIByTaskAndDestination(task: number, destination: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getTaskResultsForGUIByTaskAndDestination(task: number, destination: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getTaskResultsForGUIByTaskAndDestination(task: number, destination: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getTaskResultsForGUIByTaskAndDestination(task: number, destination: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (task === null || task === undefined) { + throw new Error('Required parameter task was null or undefined when calling getTaskResultsForGUIByTaskAndDestination.'); + } + if (destination === null || destination === undefined) { + throw new Error('Required parameter destination was null or undefined when calling getTaskResultsForGUIByTaskAndDestination.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (task !== undefined && task !== null) { + queryParameters = queryParameters.set('task', task); + } + if (destination !== undefined && destination !== null) { + queryParameters = queryParameters.set('destination', destination); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/tasksManager/getTaskResultsForGUIByTaskAndDestination`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Return list of only newest TaskResults by a Task for GUI. + * @param task Task id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getTaskResultsForGUIByTaskOnlyNewest(task: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getTaskResultsForGUIByTaskOnlyNewest(task: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getTaskResultsForGUIByTaskOnlyNewest(task: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getTaskResultsForGUIByTaskOnlyNewest(task: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (task === null || task === undefined) { + throw new Error('Required parameter task was null or undefined when calling getTaskResultsForGUIByTaskOnlyNewest.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (task !== undefined && task !== null) { + queryParameters = queryParameters.set('task', task); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/tasksManager/getTaskResultsForGUIByTaskOnlyNewest`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Whether task exists. + * @param service id of Service + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public isThereSuchTask(service: number, facility: number, observe?: 'body', reportProgress?: boolean): Observable; + public isThereSuchTask(service: number, facility: number, observe?: 'response', reportProgress?: boolean): Observable>; + public isThereSuchTask(service: number, facility: number, observe?: 'events', reportProgress?: boolean): Observable>; + public isThereSuchTask(service: number, facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling isThereSuchTask.'); + } + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling isThereSuchTask.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/tasksManager/isThereSuchTask`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns all tasks. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public listAllTasks(observe?: 'body', reportProgress?: boolean): Observable>; + public listAllTasks(observe?: 'response', reportProgress?: boolean): Observable>>; + public listAllTasks(observe?: 'events', reportProgress?: boolean): Observable>>; + public listAllTasks(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/tasksManager/listAllTasks`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns all tasks associated with selected facility. + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public listAllTasksForFacility(facility: number, observe?: 'body', reportProgress?: boolean): Observable>; + public listAllTasksForFacility(facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public listAllTasksForFacility(facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public listAllTasksForFacility(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling listAllTasksForFacility.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/tasksManager/listAllTasksForFacility`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Suspends waiting tasks propagation to the engine. Does not affect already propagated tasks. + * @param suspend if true stops propagating waiting tasks to the engine, if false resumes propagation + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public suspendTasksPropagation(suspend: boolean, observe?: 'body', reportProgress?: boolean): Observable; + public suspendTasksPropagation(suspend: boolean, observe?: 'response', reportProgress?: boolean): Observable>; + public suspendTasksPropagation(suspend: boolean, observe?: 'events', reportProgress?: boolean): Observable>; + public suspendTasksPropagation(suspend: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (suspend === null || suspend === undefined) { + throw new Error('Required parameter suspend was null or undefined when calling suspendTasksPropagation.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (suspend !== undefined && suspend !== null) { + queryParameters = queryParameters.set('suspend', suspend); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/json/tasksManager/suspendTasksPropagation`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } - return this.httpClient.post( - `${this.configuration.basePath}/json/tasksManager/suspendTasksPropagation`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } } diff --git a/libs/perun/openapi/src/lib/api/usersManager.service.ts b/libs/perun/openapi/src/lib/api/usersManager.service.ts index 4294a1b78..94eefd767 100644 --- a/libs/perun/openapi/src/lib/api/usersManager.service.ts +++ b/libs/perun/openapi/src/lib/api/usersManager.service.ts @@ -11,17 +11,11 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { AddUserExtSourceInput } from '../model/addUserExtSourceInput'; import { Group } from '../model/group'; @@ -38,5200 +32,3755 @@ import { User } from '../model/user'; import { UserExtSource } from '../model/userExtSource'; import { Vo } from '../model/vo'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class UsersManagerService { - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration - ) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - /** - * Add specific user owner. - * @param user id of User - * @param specificUser id of specific User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addSpecificUserOwner( - user: number, - specificUser: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public addSpecificUserOwner( - user: number, - specificUser: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public addSpecificUserOwner( - user: number, - specificUser: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public addSpecificUserOwner( - user: number, - specificUser: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling addSpecificUserOwner.' - ); - } - if (specificUser === null || specificUser === undefined) { - throw new Error( - 'Required parameter specificUser was null or undefined when calling addSpecificUserOwner.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (specificUser !== undefined && specificUser !== null) { - queryParameters = queryParameters.set('specificUser', specificUser); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/usersManager/addSpecificUserOwner`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Adds user\'s external sources. - * @param addUserExtSourceInput - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addUserExtSource( - addUserExtSourceInput: AddUserExtSourceInput, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public addUserExtSource( - addUserExtSourceInput: AddUserExtSourceInput, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public addUserExtSource( - addUserExtSourceInput: AddUserExtSourceInput, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public addUserExtSource( - addUserExtSourceInput: AddUserExtSourceInput, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (addUserExtSourceInput === null || addUserExtSourceInput === undefined) { - throw new Error( - 'Required parameter addUserExtSourceInput was null or undefined when calling addUserExtSource.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/usersManager/addUserExtSource`, - addUserExtSourceInput, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Anonymizes user - according to configuration, each of user\'s attributes is either anonymized, kept untouched or deleted. Also deletes other user\'s related data, e.g. authorships of users publications, mail change and password reset requests, bans... - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public anonymizeUser(user: number, observe?: 'body', reportProgress?: boolean): Observable; - public anonymizeUser( - user: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public anonymizeUser( - user: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public anonymizeUser( - user: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling anonymizeUser.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/usersManager/anonymizeUser`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Changes user password in defined login-namespace based on token parameter. - * This method throws PasswordResetLinkExpiredException when the password reset request expired. This method throws PasswordResetLinkNotValidException when the password reset request was already used or has never existed. - * @param token token for the password reset request - * @param password password - * @param lang language to get notifications in (optional) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public changeNonAuthzPasswordByToken( - token: string, - password: string, - lang?: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public changeNonAuthzPasswordByToken( - token: string, - password: string, - lang?: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public changeNonAuthzPasswordByToken( - token: string, - password: string, - lang?: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public changeNonAuthzPasswordByToken( - token: string, - password: string, - lang?: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (token === null || token === undefined) { - throw new Error( - 'Required parameter token was null or undefined when calling changeNonAuthzPasswordByToken.' - ); - } - if (password === null || password === undefined) { - throw new Error( - 'Required parameter password was null or undefined when calling changeNonAuthzPasswordByToken.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (token !== undefined && token !== null) { - queryParameters = queryParameters.set('token', token); - } - if (password !== undefined && password !== null) { - queryParameters = queryParameters.set('password', password); - } - if (lang !== undefined && lang !== null) { - queryParameters = queryParameters.set('lang', lang); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/usersManager/changeNonAuthzPassword/token`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Changes password for a user in specified login-namespace. - * @param login login - * @param namespace namespace - * @param newPassword - * @param oldPassword - * @param checkOldPassword True if the oldPassword has to be checked. When omitted it defaults to false. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public changePasswordForLogin( - login: string, - namespace: string, - newPassword: string, - oldPassword?: string, - checkOldPassword?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public changePasswordForLogin( - login: string, - namespace: string, - newPassword: string, - oldPassword?: string, - checkOldPassword?: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public changePasswordForLogin( - login: string, - namespace: string, - newPassword: string, - oldPassword?: string, - checkOldPassword?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public changePasswordForLogin( - login: string, - namespace: string, - newPassword: string, - oldPassword?: string, - checkOldPassword?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (login === null || login === undefined) { - throw new Error( - 'Required parameter login was null or undefined when calling changePasswordForLogin.' - ); - } - if (namespace === null || namespace === undefined) { - throw new Error( - 'Required parameter namespace was null or undefined when calling changePasswordForLogin.' - ); - } - if (newPassword === null || newPassword === undefined) { - throw new Error( - 'Required parameter newPassword was null or undefined when calling changePasswordForLogin.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (login !== undefined && login !== null) { - queryParameters = queryParameters.set('login', login); - } - if (namespace !== undefined && namespace !== null) { - queryParameters = queryParameters.set('namespace', namespace); - } - if (newPassword !== undefined && newPassword !== null) { - queryParameters = queryParameters.set('newPassword', newPassword); - } - if (oldPassword !== undefined && oldPassword !== null) { - queryParameters = queryParameters.set('oldPassword', oldPassword); - } - if (checkOldPassword !== undefined && checkOldPassword !== null) { - queryParameters = queryParameters.set('checkOldPassword', checkOldPassword); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/usersManager/changePassword/login`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Changes password for a user in specified login-namespace. - * @param user id of User - * @param namespace namespace - * @param newPassword - * @param oldPassword - * @param checkOldPassword True if the oldPassword has to be checked. When omitted it defaults to false. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public changePasswordForUser( - user: number, - namespace: string, - newPassword: string, - oldPassword?: string, - checkOldPassword?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public changePasswordForUser( - user: number, - namespace: string, - newPassword: string, - oldPassword?: string, - checkOldPassword?: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public changePasswordForUser( - user: number, - namespace: string, - newPassword: string, - oldPassword?: string, - checkOldPassword?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public changePasswordForUser( - user: number, - namespace: string, - newPassword: string, - oldPassword?: string, - checkOldPassword?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling changePasswordForUser.' - ); - } - if (namespace === null || namespace === undefined) { - throw new Error( - 'Required parameter namespace was null or undefined when calling changePasswordForUser.' - ); - } - if (newPassword === null || newPassword === undefined) { - throw new Error( - 'Required parameter newPassword was null or undefined when calling changePasswordForUser.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (namespace !== undefined && namespace !== null) { - queryParameters = queryParameters.set('namespace', namespace); - } - if (newPassword !== undefined && newPassword !== null) { - queryParameters = queryParameters.set('newPassword', newPassword); - } - if (oldPassword !== undefined && oldPassword !== null) { - queryParameters = queryParameters.set('oldPassword', oldPassword); - } - if (checkOldPassword !== undefined && checkOldPassword !== null) { - queryParameters = queryParameters.set('checkOldPassword', checkOldPassword); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/usersManager/changePassword/user`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Checks if the password reset request is valid. - * This method throws PasswordResetLinkExpiredException when the password reset request expired. This method throws PasswordResetLinkNotValidException when the password reset request was already used or has never existed. - * @param token token for the password reset request - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public checkPasswordResetRequestByTokenIsValid( - token: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public checkPasswordResetRequestByTokenIsValid( - token: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public checkPasswordResetRequestByTokenIsValid( - token: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public checkPasswordResetRequestByTokenIsValid( - token: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (token === null || token === undefined) { - throw new Error( - 'Required parameter token was null or undefined when calling checkPasswordResetRequestByTokenIsValid.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (token !== undefined && token !== null) { - queryParameters = queryParameters.set('token', token); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/usersManager/checkPasswordResetRequestIsValid/token`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Check password strength for the given namespace. - * If the check fails, the PasswordStrengthException error is returned. - * @param password password - * @param namespace namespace - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public checkPasswordStrength( - password: string, - namespace: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public checkPasswordStrength( - password: string, - namespace: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public checkPasswordStrength( - password: string, - namespace: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public checkPasswordStrength( - password: string, - namespace: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (password === null || password === undefined) { - throw new Error( - 'Required parameter password was null or undefined when calling checkPasswordStrength.' - ); - } - if (namespace === null || namespace === undefined) { - throw new Error( - 'Required parameter namespace was null or undefined when calling checkPasswordStrength.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (password !== undefined && password !== null) { - queryParameters = queryParameters.set('password', password); - } - if (namespace !== undefined && namespace !== null) { - queryParameters = queryParameters.set('namespace', namespace); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/usersManager/checkPasswordStrength`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Creates alternative password in external system. - * @param user id of User - * @param description - * @param loginNamespace - * @param password - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createAlternativePassword( - user: number, - description: string, - loginNamespace: string, - password: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public createAlternativePassword( - user: number, - description: string, - loginNamespace: string, - password: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public createAlternativePassword( - user: number, - description: string, - loginNamespace: string, - password: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public createAlternativePassword( - user: number, - description: string, - loginNamespace: string, - password: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling createAlternativePassword.' - ); - } - if (description === null || description === undefined) { - throw new Error( - 'Required parameter description was null or undefined when calling createAlternativePassword.' - ); - } - if (loginNamespace === null || loginNamespace === undefined) { - throw new Error( - 'Required parameter loginNamespace was null or undefined when calling createAlternativePassword.' - ); - } - if (password === null || password === undefined) { - throw new Error( - 'Required parameter password was null or undefined when calling createAlternativePassword.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (description !== undefined && description !== null) { - queryParameters = queryParameters.set('description', description); - } - if (loginNamespace !== undefined && loginNamespace !== null) { - queryParameters = queryParameters.set('loginNamespace', loginNamespace); - } - if (password !== undefined && password !== null) { - queryParameters = queryParameters.set('password', password); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/usersManager/createAlternativePassword`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * From given candidate, creates a service user and assign given owners to him. - * This method also checks if some of given userExtSources do exist. If so, this method throws a UserExtSourceExistsException. This method can also set only user-def and user-opt attributes for the given candidate. - * @param inputCreateServiceUser - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createServiceUser( - inputCreateServiceUser: InputCreateServiceUser, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public createServiceUser( - inputCreateServiceUser: InputCreateServiceUser, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public createServiceUser( - inputCreateServiceUser: InputCreateServiceUser, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public createServiceUser( - inputCreateServiceUser: InputCreateServiceUser, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputCreateServiceUser === null || inputCreateServiceUser === undefined) { - throw new Error( - 'Required parameter inputCreateServiceUser was null or undefined when calling createServiceUser.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/usersManager/createServiceUser`, - inputCreateServiceUser, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Deletes alternative password in external system. - * @param user id of User - * @param loginNamespace - * @param passwordId - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteAlternativePassword( - user: number, - loginNamespace: string, - passwordId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public deleteAlternativePassword( - user: number, - loginNamespace: string, - passwordId: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deleteAlternativePassword( - user: number, - loginNamespace: string, - passwordId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deleteAlternativePassword( - user: number, - loginNamespace: string, - passwordId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling deleteAlternativePassword.' - ); - } - if (loginNamespace === null || loginNamespace === undefined) { - throw new Error( - 'Required parameter loginNamespace was null or undefined when calling deleteAlternativePassword.' - ); - } - if (passwordId === null || passwordId === undefined) { - throw new Error( - 'Required parameter passwordId was null or undefined when calling deleteAlternativePassword.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (loginNamespace !== undefined && loginNamespace !== null) { - queryParameters = queryParameters.set('loginNamespace', loginNamespace); - } - if (passwordId !== undefined && passwordId !== null) { - queryParameters = queryParameters.set('passwordId', passwordId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/usersManager/deleteAlternativePassword`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Delete password for a user in specified login-namespace. - * @param login login - * @param namespace namespace - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deletePasswordForLogin( - login: string, - namespace: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public deletePasswordForLogin( - login: string, - namespace: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deletePasswordForLogin( - login: string, - namespace: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deletePasswordForLogin( - login: string, - namespace: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (login === null || login === undefined) { - throw new Error( - 'Required parameter login was null or undefined when calling deletePasswordForLogin.' - ); - } - if (namespace === null || namespace === undefined) { - throw new Error( - 'Required parameter namespace was null or undefined when calling deletePasswordForLogin.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (login !== undefined && login !== null) { - queryParameters = queryParameters.set('login', login); - } - if (namespace !== undefined && namespace !== null) { - queryParameters = queryParameters.set('namespace', namespace); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/usersManager/deletePassword/login`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Delete password for a user in specified login-namespace. - * @param user id of User - * @param namespace namespace - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deletePasswordForUser( - user: number, - namespace: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public deletePasswordForUser( - user: number, - namespace: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deletePasswordForUser( - user: number, - namespace: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deletePasswordForUser( - user: number, - namespace: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling deletePasswordForUser.' - ); - } - if (namespace === null || namespace === undefined) { - throw new Error( - 'Required parameter namespace was null or undefined when calling deletePasswordForUser.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (namespace !== undefined && namespace !== null) { - queryParameters = queryParameters.set('namespace', namespace); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/usersManager/deletePassword/user`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Deletes a user. - * @param user id of User - * @param force If true, delete entity forcefully. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteUser( - user: number, - force?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public deleteUser( - user: number, - force?: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deleteUser( - user: number, - force?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deleteUser( - user: number, - force?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling deleteUser.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (force !== undefined && force !== null) { - queryParameters = queryParameters.set('force', force); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/usersManager/deleteUser`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns list of RichUsers with attributes who matches the searchString, searching name, email, logins. - * @param searchString Text to search by - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findRichUsers( - searchString: string, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public findRichUsers( - searchString: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public findRichUsers( - searchString: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public findRichUsers( - searchString: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (searchString === null || searchString === undefined) { - throw new Error( - 'Required parameter searchString was null or undefined when calling findRichUsers.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (searchString !== undefined && searchString !== null) { - queryParameters = queryParameters.set('searchString', searchString); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/usersManager/findRichUsers`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns list of RichUsers with attributes who matches the searchString. - * @param searchString Text to search by - * @param attrsNames list of attribute names List<String> or null - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findRichUsersWithAttributes( - searchString: string, - attrsNames?: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public findRichUsersWithAttributes( - searchString: string, - attrsNames?: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public findRichUsersWithAttributes( - searchString: string, - attrsNames?: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public findRichUsersWithAttributes( - searchString: string, - attrsNames?: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (searchString === null || searchString === undefined) { - throw new Error( - 'Required parameter searchString was null or undefined when calling findRichUsersWithAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (searchString !== undefined && searchString !== null) { - queryParameters = queryParameters.set('searchString', searchString); - } - if (attrsNames) { - attrsNames.forEach((element) => { - queryParameters = queryParameters.append('attrsNames[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/usersManager/findRichUsersWithAttributes`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns list of Users with attributes who matches the searchString, searching name, email, logins. - * @param searchString Text to search by - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findUsers( - searchString: string, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public findUsers( - searchString: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public findUsers( - searchString: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public findUsers( - searchString: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (searchString === null || searchString === undefined) { - throw new Error( - 'Required parameter searchString was null or undefined when calling findUsers.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (searchString !== undefined && searchString !== null) { - queryParameters = queryParameters.set('searchString', searchString); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/usersManager/findUsers`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Generates user account in a backend system associated with login-namespace in Perun. Parameters are implementation-dependent for each login-namespace. Returns map with 1) key=login-namespace attribute urn, value=generated login 2) rest of opt response attributes. - * @param namespace namespace - * @param name - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public generateAccountForName( - namespace: string, - name?: string, - observe?: 'body', - reportProgress?: boolean - ): Observable<{ [key: string]: string }>; - public generateAccountForName( - namespace: string, - name?: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public generateAccountForName( - namespace: string, - name?: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public generateAccountForName( - namespace: string, - name?: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (namespace === null || namespace === undefined) { - throw new Error( - 'Required parameter namespace was null or undefined when calling generateAccountForName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (namespace !== undefined && namespace !== null) { - queryParameters = queryParameters.set('namespace', namespace); - } - if (name !== undefined && name !== null) { - queryParameters = queryParameters.set('name', name); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post<{ [key: string]: string }>( - `${this.configuration.basePath}/urlinjsonout/usersManager/generateAccount/name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns users with attributes - * Returns list of objects representing the User with attributes - * @param includedSpecificUsers if you want to or don\'t want to get specificUsers too - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllRichUsersWithAttributes( - includedSpecificUsers: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAllRichUsersWithAttributes( - includedSpecificUsers: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllRichUsersWithAttributes( - includedSpecificUsers: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAllRichUsersWithAttributes( - includedSpecificUsers: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (includedSpecificUsers === null || includedSpecificUsers === undefined) { - throw new Error( - 'Required parameter includedSpecificUsers was null or undefined when calling getAllRichUsersWithAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (includedSpecificUsers !== undefined && includedSpecificUsers !== null) { - queryParameters = queryParameters.set('includedSpecificUsers', includedSpecificUsers); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - return this.httpClient.get>( - `${this.configuration.basePath}/json/usersManager/getAllRichUsersWithAttributes`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all rich resources which have the user assigned. - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedRichResourcesForUser( - user: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getAssignedRichResourcesForUser( - user: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAssignedRichResourcesForUser( - user: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getAssignedRichResourcesForUser( - user: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling getAssignedRichResourcesForUser.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/usersManager/getAssignedRichResources`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get list of groups of user on specified facility where use is active. - * That means User is a VALID in the VO and the Group and groups are assigned to the facility. - * @param user id of User - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupsForFacilityWhereUserIsActive( - user: number, - facility: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getGroupsForFacilityWhereUserIsActive( - user: number, - facility: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getGroupsForFacilityWhereUserIsActive( - user: number, - facility: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getGroupsForFacilityWhereUserIsActive( - user: number, - facility: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling getGroupsForFacilityWhereUserIsActive.' - ); - } - if (facility === null || facility === undefined) { - throw new Error( - 'Required parameter facility was null or undefined when calling getGroupsForFacilityWhereUserIsActive.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/usersManager/getGroupsWhereUserIsActive/facility`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get list of groups of user on specified resource where use is active. - * That means User is a VALID in the VO and the Group and groups are assigned to the resource. - * @param user id of User - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupsForResourceWhereUserIsActive( - user: number, - resource: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getGroupsForResourceWhereUserIsActive( - user: number, - resource: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getGroupsForResourceWhereUserIsActive( - user: number, - resource: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getGroupsForResourceWhereUserIsActive( - user: number, - resource: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling getGroupsForResourceWhereUserIsActive.' - ); - } - if (resource === null || resource === undefined) { - throw new Error( - 'Required parameter resource was null or undefined when calling getGroupsForResourceWhereUserIsActive.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/usersManager/getGroupsWhereUserIsActive/resource`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns list of Groups in selected Vo, where the User is a direct Administrator or he is a member of any group which is Administrator of some of these Groups. - * @param user id of User - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupsInVoWhereUserIsAdmin( - user: number, - vo: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getGroupsInVoWhereUserIsAdmin( - user: number, - vo: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getGroupsInVoWhereUserIsAdmin( - user: number, - vo: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getGroupsInVoWhereUserIsAdmin( - user: number, - vo: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling getGroupsInVoWhereUserIsAdmin.' - ); - } - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling getGroupsInVoWhereUserIsAdmin.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/usersManager/getGroupsWhereUserIsAdmin/u-v`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns list of Groups in Perun, where the User is a direct Administrator or he is a member of any group which is Administrator of some of these Groups. - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupsWhereUserIsAdmin( - user: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getGroupsWhereUserIsAdmin( - user: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getGroupsWhereUserIsAdmin( - user: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getGroupsWhereUserIsAdmin( - user: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling getGroupsWhereUserIsAdmin.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/usersManager/getGroupsWhereUserIsAdmin/u`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Return list of email addresses of user, which are awaiting validation and are inside time window for validation. If there is no preferred email change request pending or requests are outside time window for validation, returns empty list. - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getPendingPreferredEmailChanges( - user: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getPendingPreferredEmailChanges( - user: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getPendingPreferredEmailChanges( - user: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getPendingPreferredEmailChanges( - user: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling getPendingPreferredEmailChanges.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/usersManager/getPendingPreferredEmailChanges`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets list of all user\'s external sources with attributes. - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRichUserExtSources( - user: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getRichUserExtSources( - user: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getRichUserExtSources( - user: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getRichUserExtSources( - user: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling getRichUserExtSources.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/usersManager/getRichUserExtSources/u`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns user with attributes - * Returns object representing the User with attributes - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRichUserWithAttributes( - user: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getRichUserWithAttributes( - user: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getRichUserWithAttributes( - user: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getRichUserWithAttributes( - user: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling getRichUserWithAttributes.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/usersManager/getRichUserWithAttributes`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns rich users without attributes by their IDs. - * @param ids list of ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRichUsersByIds( - ids: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getRichUsersByIds( - ids: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getRichUsersByIds( - ids: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getRichUsersByIds( - ids: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (ids === null || ids === undefined) { - throw new Error( - 'Required parameter ids was null or undefined when calling getRichUsersByIds.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (ids) { - ids.forEach((element) => { - queryParameters = queryParameters.append('ids[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/usersManager/getRichUsersByIds`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns rich users with attributes by their IDs. - * @param ids list of ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRichUsersWithAttributesByIds( - ids: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getRichUsersWithAttributesByIds( - ids: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getRichUsersWithAttributesByIds( - ids: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getRichUsersWithAttributesByIds( - ids: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (ids === null || ids === undefined) { - throw new Error( - 'Required parameter ids was null or undefined when calling getRichUsersWithAttributesByIds.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (ids) { - ids.forEach((element) => { - queryParameters = queryParameters.append('ids[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/usersManager/getRichUsersWithAttributesByIds`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns list of RichUsers which are not members of any VO with attributes. - * @param attrsNames list of attribute names List<String> or null - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRichUsersWithoutVoWithAttributes( - attrsNames?: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getRichUsersWithoutVoWithAttributes( - attrsNames?: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getRichUsersWithoutVoWithAttributes( - attrsNames?: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getRichUsersWithoutVoWithAttributes( - attrsNames?: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (attrsNames) { - attrsNames.forEach((element) => { - queryParameters = queryParameters.append('attrsNames[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/usersManager/getRichUsersWithoutVoWithAttributes`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get all specific users who are owned by the user. - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getSpecificUsersByUser( - user: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getSpecificUsersByUser( - user: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getSpecificUsersByUser( - user: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getSpecificUsersByUser( - user: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling getSpecificUsersByUser.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/usersManager/getSpecificUsersByUser`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets sponsors for given member with optional attribute names. - * @param member id of Member - * @param attrNames list of attribute names List<String> or null - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getSponsorsForMember( - member: number, - attrNames?: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getSponsorsForMember( - member: number, - attrNames?: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getSponsorsForMember( - member: number, - attrNames?: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getSponsorsForMember( - member: number, - attrNames?: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getSponsorsForMember.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/usersManager/getSponsorsForMember/member`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets sponsors for member specified by VO, extSourceName and extLogin with optional attribute names. - * @param vo id of Vo - * @param extSourceName external source name, e.g. IdP entityId - * @param extLogin external login of user, e.g. john - * @param attrNames list of attribute names List<String> or null - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getSponsorsForMemberByVoAndLogin( - vo: number, - extSourceName: string, - extLogin: string, - attrNames?: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getSponsorsForMemberByVoAndLogin( - vo: number, - extSourceName: string, - extLogin: string, - attrNames?: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getSponsorsForMemberByVoAndLogin( - vo: number, - extSourceName: string, - extLogin: string, - attrNames?: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getSponsorsForMemberByVoAndLogin( - vo: number, - extSourceName: string, - extLogin: string, - attrNames?: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling getSponsorsForMemberByVoAndLogin.' - ); - } - if (extSourceName === null || extSourceName === undefined) { - throw new Error( - 'Required parameter extSourceName was null or undefined when calling getSponsorsForMemberByVoAndLogin.' - ); - } - if (extLogin === null || extLogin === undefined) { - throw new Error( - 'Required parameter extLogin was null or undefined when calling getSponsorsForMemberByVoAndLogin.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (extSourceName !== undefined && extSourceName !== null) { - queryParameters = queryParameters.set('extSourceName', extSourceName); - } - if (extLogin !== undefined && extLogin !== null) { - queryParameters = queryParameters.set('extLogin', extLogin); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/usersManager/getSponsorsForMember/vo`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns user by its ExtSourceName and ExtLogin. - * Returns User found by its authentication data - * @param extLogin external login of user, e.g. john - * @param extSourceName external source name, e.g. IdP entityId - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserByExtSourceNameAndExtLogin( - extLogin: string, - extSourceName: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getUserByExtSourceNameAndExtLogin( - extLogin: string, - extSourceName: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getUserByExtSourceNameAndExtLogin( - extLogin: string, - extSourceName: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getUserByExtSourceNameAndExtLogin( - extLogin: string, - extSourceName: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (extLogin === null || extLogin === undefined) { - throw new Error( - 'Required parameter extLogin was null or undefined when calling getUserByExtSourceNameAndExtLogin.' - ); - } - if (extSourceName === null || extSourceName === undefined) { - throw new Error( - 'Required parameter extSourceName was null or undefined when calling getUserByExtSourceNameAndExtLogin.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (extLogin !== undefined && extLogin !== null) { - queryParameters = queryParameters.set('extLogin', extLogin); - } - if (extSourceName !== undefined && extSourceName !== null) { - queryParameters = queryParameters.set('extSourceName', extSourceName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/usersManager/getUserByExtSourceNameAndExtLogin`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns user by its id - * Returns object representing the User - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserById(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public getUserById( - id: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getUserById( - id: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getUserById( - id: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getUserById.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/usersManager/getUserById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns user ext source by its id. - * @param userExtSource id of UserExtSource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserExtSourceById( - userExtSource: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getUserExtSourceById( - userExtSource: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getUserExtSourceById( - userExtSource: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getUserExtSourceById( - userExtSource: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (userExtSource === null || userExtSource === undefined) { - throw new Error( - 'Required parameter userExtSource was null or undefined when calling getUserExtSourceById.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (userExtSource !== undefined && userExtSource !== null) { - queryParameters = queryParameters.set('userExtSource', userExtSource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/usersManager/getUserExtSourceById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Return userExtSource for specific attribute definition (specified by id) and unique value. - * @param attributeId id of AttributeDefinition - * @param attributeValue string value of Attribute - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserExtSourceByUniqueAttributeValueAndAttributeId( - attributeId: number, - attributeValue: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getUserExtSourceByUniqueAttributeValueAndAttributeId( - attributeId: number, - attributeValue: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getUserExtSourceByUniqueAttributeValueAndAttributeId( - attributeId: number, - attributeValue: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getUserExtSourceByUniqueAttributeValueAndAttributeId( - attributeId: number, - attributeValue: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (attributeId === null || attributeId === undefined) { - throw new Error( - 'Required parameter attributeId was null or undefined when calling getUserExtSourceByUniqueAttributeValueAndAttributeId.' - ); - } - if (attributeValue === null || attributeValue === undefined) { - throw new Error( - 'Required parameter attributeValue was null or undefined when calling getUserExtSourceByUniqueAttributeValueAndAttributeId.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (attributeId !== undefined && attributeId !== null) { - queryParameters = queryParameters.set('attributeId', attributeId); - } - if (attributeValue !== undefined && attributeValue !== null) { - queryParameters = queryParameters.set('attributeValue', attributeValue); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/usersManager/getUserExtSourceByUniqueAttributeValue/id`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Return userExtSource for specific attribute definition (specified by name) and unique value. - * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) - * @param attributeValue string value of Attribute - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserExtSourceByUniqueAttributeValueAndAttributeName( - attributeName: string, - attributeValue: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getUserExtSourceByUniqueAttributeValueAndAttributeName( - attributeName: string, - attributeValue: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getUserExtSourceByUniqueAttributeValueAndAttributeName( - attributeName: string, - attributeValue: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getUserExtSourceByUniqueAttributeValueAndAttributeName( - attributeName: string, - attributeValue: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (attributeName === null || attributeName === undefined) { - throw new Error( - 'Required parameter attributeName was null or undefined when calling getUserExtSourceByUniqueAttributeValueAndAttributeName.' - ); - } - if (attributeValue === null || attributeValue === undefined) { - throw new Error( - 'Required parameter attributeValue was null or undefined when calling getUserExtSourceByUniqueAttributeValueAndAttributeName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (attributeName !== undefined && attributeName !== null) { - queryParameters = queryParameters.set('attributeName', attributeName); - } - if (attributeValue !== undefined && attributeValue !== null) { - queryParameters = queryParameters.set('attributeValue', attributeValue); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/usersManager/getUserExtSourceByUniqueAttributeValue/name`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets list of all user\'s external sources. - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserExtSources( - user: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getUserExtSources( - user: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getUserExtSources( - user: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getUserExtSources( - user: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling getUserExtSources.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/usersManager/getUserExtSources`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns list of user ext sources by their ids. - * @param ids list of ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserExtSourcesByIds( - ids: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getUserExtSourcesByIds( - ids: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getUserExtSourcesByIds( - ids: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getUserExtSourcesByIds( - ids: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (ids === null || ids === undefined) { - throw new Error( - 'Required parameter ids was null or undefined when calling getUserExtSourcesByIds.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (ids) { - ids.forEach((element) => { - queryParameters = queryParameters.append('ids[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/usersManager/getUserExtSourcesByIds`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns all users - * Returns list of objects representing the User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUsers(observe?: 'body', reportProgress?: boolean): Observable>; - public getUsers( - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getUsers(observe?: 'events', reportProgress?: boolean): Observable>>; - public getUsers(observe: any = 'body', reportProgress: boolean = false): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/usersManager/getUsers`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns list of Users by their ids. - * @param ids list of ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUsersByIds( - ids: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getUsersByIds( - ids: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getUsersByIds( - ids: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getUsersByIds( - ids: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (ids === null || ids === undefined) { - throw new Error('Required parameter ids was null or undefined when calling getUsersByIds.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (ids) { - ids.forEach((element) => { - queryParameters = queryParameters.append('ids[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/usersManager/getUsersByIds`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Return all users who owns the specific user. - * @param specificUser id of specific User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUsersBySpecificUser( - specificUser: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getUsersBySpecificUser( - specificUser: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getUsersBySpecificUser( - specificUser: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getUsersBySpecificUser( - specificUser: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (specificUser === null || specificUser === undefined) { - throw new Error( - 'Required parameter specificUser was null or undefined when calling getUsersBySpecificUser.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (specificUser !== undefined && specificUser !== null) { - queryParameters = queryParameters.set('specificUser', specificUser); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/usersManager/getUsersBySpecificUser`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get page of users with the given attributes. - * @param inputGetPaginatedUsers - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUsersPage( - inputGetPaginatedUsers: InputGetPaginatedUsers, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getUsersPage( - inputGetPaginatedUsers: InputGetPaginatedUsers, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getUsersPage( - inputGetPaginatedUsers: InputGetPaginatedUsers, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getUsersPage( - inputGetPaginatedUsers: InputGetPaginatedUsers, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputGetPaginatedUsers === null || inputGetPaginatedUsers === undefined) { - throw new Error( - 'Required parameter inputGetPaginatedUsers was null or undefined when calling getUsersPage.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/usersManager/getUsersPage`, - inputGetPaginatedUsers, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns list of VOs, where the user is an Administrator. - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVosWhereUserIsAdmin( - user: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getVosWhereUserIsAdmin( - user: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getVosWhereUserIsAdmin( - user: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getVosWhereUserIsAdmin( - user: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling getVosWhereUserIsAdmin.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/usersManager/getVosWhereUserIsAdmin`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns list of VOs, where the user is a Member. - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVosWhereUserIsMember( - user: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getVosWhereUserIsMember( - user: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getVosWhereUserIsMember( - user: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getVosWhereUserIsMember( - user: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling getVosWhereUserIsMember.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/usersManager/getVosWhereUserIsMember`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Checks if the login is available in the namespace. Return 1 if yes, 0 if no. - * @param loginNamespace - * @param login login - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public isLoginAvailable( - loginNamespace: string, - login: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public isLoginAvailable( - loginNamespace: string, - login: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public isLoginAvailable( - loginNamespace: string, - login: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public isLoginAvailable( - loginNamespace: string, - login: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (loginNamespace === null || loginNamespace === undefined) { - throw new Error( - 'Required parameter loginNamespace was null or undefined when calling isLoginAvailable.' - ); - } - if (login === null || login === undefined) { - throw new Error( - 'Required parameter login was null or undefined when calling isLoginAvailable.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (loginNamespace !== undefined && loginNamespace !== null) { - queryParameters = queryParameters.set('loginNamespace', loginNamespace); - } - if (login !== undefined && login !== null) { - queryParameters = queryParameters.set('login', login); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/usersManager/isLoginAvailable`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Check wheter login exists in specified login-namespace. Only available for some namespaces. - * @param user id of User - * @param namespace namespace - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public loginExist( - user: number, - namespace: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public loginExist( - user: number, - namespace: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public loginExist( - user: number, - namespace: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public loginExist( - user: number, - namespace: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling loginExist.'); - } - if (namespace === null || namespace === undefined) { - throw new Error( - 'Required parameter namespace was null or undefined when calling loginExist.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (namespace !== undefined && namespace !== null) { - queryParameters = queryParameters.set('namespace', namespace); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/usersManager/loginExist`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove specific user owner. - * @param user id of User - * @param specificUser id of specific User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeSpecificUserOwner( - user: number, - specificUser: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeSpecificUserOwner( - user: number, - specificUser: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeSpecificUserOwner( - user: number, - specificUser: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeSpecificUserOwner( - user: number, - specificUser: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling removeSpecificUserOwner.' - ); - } - if (specificUser === null || specificUser === undefined) { - throw new Error( - 'Required parameter specificUser was null or undefined when calling removeSpecificUserOwner.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (specificUser !== undefined && specificUser !== null) { - queryParameters = queryParameters.set('specificUser', specificUser); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/usersManager/removeSpecificUserOwner`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove user\'s external source. Persistent UserExtSources are not removed unless force param is present and set to true. - * @param user id of User - * @param userExtSource id of UserExtSource - * @param force If true, delete entity forcefully. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeUserExtSource( - user: number, - userExtSource: number, - force?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeUserExtSource( - user: number, - userExtSource: number, - force?: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeUserExtSource( - user: number, - userExtSource: number, - force?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeUserExtSource( - user: number, - userExtSource: number, - force?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling removeUserExtSource.' - ); - } - if (userExtSource === null || userExtSource === undefined) { - throw new Error( - 'Required parameter userExtSource was null or undefined when calling removeUserExtSource.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (userExtSource !== undefined && userExtSource !== null) { - queryParameters = queryParameters.set('userExtSource', userExtSource); - } - if (force !== undefined && force !== null) { - queryParameters = queryParameters.set('force', force); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/usersManager/removeUserExtSource`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Request to change preferred email address of user. Validation mail is sent on new address. Change is not saved until user validate new email address by calling validatePreferredEmailChange() method with proper set of parameters (sent in validation mail). Provide eiher linkPath (appended to referer) or whole custom url. Combination of linkPath and customUrl is not supported. - * @param user id of User - * @param email new email address to set - * @param lang language to get confirmation mail in (optional) - * @param linkPath path that is appended to the referer and creates the verification link (optional) - * @param customUrl url to verification link containing path (optional) - * @param idpFilter authentication method appended to query parameters of verification link (optional) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public requestPreferredEmailChange( - user: number, - email: string, - lang?: string, - linkPath?: string, - customUrl?: string, - idpFilter?: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public requestPreferredEmailChange( - user: number, - email: string, - lang?: string, - linkPath?: string, - customUrl?: string, - idpFilter?: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public requestPreferredEmailChange( - user: number, - email: string, - lang?: string, - linkPath?: string, - customUrl?: string, - idpFilter?: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public requestPreferredEmailChange( - user: number, - email: string, - lang?: string, - linkPath?: string, - customUrl?: string, - idpFilter?: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling requestPreferredEmailChange.' - ); - } - if (email === null || email === undefined) { - throw new Error( - 'Required parameter email was null or undefined when calling requestPreferredEmailChange.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (email !== undefined && email !== null) { - queryParameters = queryParameters.set('email', email); - } - if (lang !== undefined && lang !== null) { - queryParameters = queryParameters.set('lang', lang); - } - if (linkPath !== undefined && linkPath !== null) { - queryParameters = queryParameters.set('linkPath', linkPath); - } - if (customUrl !== undefined && customUrl !== null) { - queryParameters = queryParameters.set('customUrl', customUrl); - } - if (idpFilter !== undefined && idpFilter !== null) { - queryParameters = queryParameters.set('idpFilter', idpFilter); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/usersManager/requestPreferredEmailChange`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Reserves password for a user in specified login-namespace. - * @param login login - * @param namespace namespace - * @param password password - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public reservePasswordForLogin( - login: string, - namespace: string, - password: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public reservePasswordForLogin( - login: string, - namespace: string, - password: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public reservePasswordForLogin( - login: string, - namespace: string, - password: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public reservePasswordForLogin( - login: string, - namespace: string, - password: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (login === null || login === undefined) { - throw new Error( - 'Required parameter login was null or undefined when calling reservePasswordForLogin.' - ); - } - if (namespace === null || namespace === undefined) { - throw new Error( - 'Required parameter namespace was null or undefined when calling reservePasswordForLogin.' - ); - } - if (password === null || password === undefined) { - throw new Error( - 'Required parameter password was null or undefined when calling reservePasswordForLogin.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (login !== undefined && login !== null) { - queryParameters = queryParameters.set('login', login); - } - if (namespace !== undefined && namespace !== null) { - queryParameters = queryParameters.set('namespace', namespace); - } - if (password !== undefined && password !== null) { - queryParameters = queryParameters.set('password', password); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/usersManager/reservePassword/login`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Reserves password for a user in specified login-namespace. - * @param user id of User - * @param namespace namespace - * @param password password - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public reservePasswordForUser( - user: number, - namespace: string, - password: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public reservePasswordForUser( - user: number, - namespace: string, - password: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public reservePasswordForUser( - user: number, - namespace: string, - password: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public reservePasswordForUser( - user: number, - namespace: string, - password: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling reservePasswordForUser.' - ); - } - if (namespace === null || namespace === undefined) { - throw new Error( - 'Required parameter namespace was null or undefined when calling reservePasswordForUser.' - ); - } - if (password === null || password === undefined) { - throw new Error( - 'Required parameter password was null or undefined when calling reservePasswordForUser.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (namespace !== undefined && namespace !== null) { - queryParameters = queryParameters.set('namespace', namespace); - } - if (password !== undefined && password !== null) { - queryParameters = queryParameters.set('password', password); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/usersManager/reservePassword/user`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Reserves a random password in external authz system. User shouldn\'t be able to log-in (account disabled, password unknown to him). This is usefull when manager create account for others and later send them password reset request. - * @param user id of User - * @param namespace namespace - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public reserveRandomPassword( - user: number, - namespace: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public reserveRandomPassword( - user: number, - namespace: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public reserveRandomPassword( - user: number, - namespace: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public reserveRandomPassword( - user: number, - namespace: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling reserveRandomPassword.' - ); - } - if (namespace === null || namespace === undefined) { - throw new Error( - 'Required parameter namespace was null or undefined when calling reserveRandomPassword.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (namespace !== undefined && namespace !== null) { - queryParameters = queryParameters.set('namespace', namespace); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/usersManager/reserveRandomPassword`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Updates user - * @param inputUpdateUser - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateUser( - inputUpdateUser: InputUpdateUser, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public updateUser( - inputUpdateUser: InputUpdateUser, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public updateUser( - inputUpdateUser: InputUpdateUser, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public updateUser( - inputUpdateUser: InputUpdateUser, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputUpdateUser === null || inputUpdateUser === undefined) { - throw new Error( - 'Required parameter inputUpdateUser was null or undefined when calling updateUser.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/usersManager/updateUser`, - inputUpdateUser, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Validate password for a user in specified login-namespace. - * @param login login - * @param namespace namespace - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public validatePasswordForLogin( - login: string, - namespace: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public validatePasswordForLogin( - login: string, - namespace: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public validatePasswordForLogin( - login: string, - namespace: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public validatePasswordForLogin( - login: string, - namespace: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (login === null || login === undefined) { - throw new Error( - 'Required parameter login was null or undefined when calling validatePasswordForLogin.' - ); - } - if (namespace === null || namespace === undefined) { - throw new Error( - 'Required parameter namespace was null or undefined when calling validatePasswordForLogin.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (login !== undefined && login !== null) { - queryParameters = queryParameters.set('login', login); - } - if (namespace !== undefined && namespace !== null) { - queryParameters = queryParameters.set('namespace', namespace); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/usersManager/validatePassword/login`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Validate password for a user in specified login-namespace. - * @param user id of User - * @param namespace namespace - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public validatePasswordForUser( - user: number, - namespace: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public validatePasswordForUser( - user: number, - namespace: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public validatePasswordForUser( - user: number, - namespace: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public validatePasswordForUser( - user: number, - namespace: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling validatePasswordForUser.' - ); - } - if (namespace === null || namespace === undefined) { - throw new Error( - 'Required parameter namespace was null or undefined when calling validatePasswordForUser.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (namespace !== undefined && namespace !== null) { - queryParameters = queryParameters.set('namespace', namespace); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/usersManager/validatePassword/user`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Validate new preferred email address. Request to validate is determined based on token parameter sent in email notice by requestPreferredEmailChange() method. - * @param token token for the email change request - * @param u id of user you want to validate preferred email request - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public validatePreferredEmailChangeWithToken( - token: string, - u: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public validatePreferredEmailChangeWithToken( - token: string, - u: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public validatePreferredEmailChangeWithToken( - token: string, - u: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public validatePreferredEmailChangeWithToken( - token: string, - u: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (token === null || token === undefined) { - throw new Error( - 'Required parameter token was null or undefined when calling validatePreferredEmailChangeWithToken.' - ); - } - if (u === null || u === undefined) { - throw new Error( - 'Required parameter u was null or undefined when calling validatePreferredEmailChangeWithToken.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (token !== undefined && token !== null) { - queryParameters = queryParameters.set('token', token); - } - if (u !== undefined && u !== null) { - queryParameters = queryParameters.set('u', u); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + + + /** + * Add specific user owner. + * @param user id of User + * @param specificUser id of specific User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addSpecificUserOwner(user: number, specificUser: number, observe?: 'body', reportProgress?: boolean): Observable; + public addSpecificUserOwner(user: number, specificUser: number, observe?: 'response', reportProgress?: boolean): Observable>; + public addSpecificUserOwner(user: number, specificUser: number, observe?: 'events', reportProgress?: boolean): Observable>; + public addSpecificUserOwner(user: number, specificUser: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling addSpecificUserOwner.'); + } + if (specificUser === null || specificUser === undefined) { + throw new Error('Required parameter specificUser was null or undefined when calling addSpecificUserOwner.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (specificUser !== undefined && specificUser !== null) { + queryParameters = queryParameters.set('specificUser', specificUser); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/addSpecificUserOwner`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Adds user\'s external sources. + * @param addUserExtSourceInput + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addUserExtSource(addUserExtSourceInput: AddUserExtSourceInput, observe?: 'body', reportProgress?: boolean): Observable; + public addUserExtSource(addUserExtSourceInput: AddUserExtSourceInput, observe?: 'response', reportProgress?: boolean): Observable>; + public addUserExtSource(addUserExtSourceInput: AddUserExtSourceInput, observe?: 'events', reportProgress?: boolean): Observable>; + public addUserExtSource(addUserExtSourceInput: AddUserExtSourceInput, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (addUserExtSourceInput === null || addUserExtSourceInput === undefined) { + throw new Error('Required parameter addUserExtSourceInput was null or undefined when calling addUserExtSource.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/usersManager/addUserExtSource`, + addUserExtSourceInput, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Anonymizes user - according to configuration, each of user\'s attributes is either anonymized, kept untouched or deleted. Also deletes other user\'s related data, e.g. authorships of users publications, mail change and password reset requests, bans... + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public anonymizeUser(user: number, observe?: 'body', reportProgress?: boolean): Observable; + public anonymizeUser(user: number, observe?: 'response', reportProgress?: boolean): Observable>; + public anonymizeUser(user: number, observe?: 'events', reportProgress?: boolean): Observable>; + public anonymizeUser(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling anonymizeUser.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/anonymizeUser`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Changes user password in defined login-namespace based on token parameter. + * This method throws PasswordResetLinkExpiredException when the password reset request expired. This method throws PasswordResetLinkNotValidException when the password reset request was already used or has never existed. + * @param token token for the password reset request + * @param password password + * @param lang language to get notifications in (optional) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public changeNonAuthzPasswordByToken(token: string, password: string, lang?: string, observe?: 'body', reportProgress?: boolean): Observable; + public changeNonAuthzPasswordByToken(token: string, password: string, lang?: string, observe?: 'response', reportProgress?: boolean): Observable>; + public changeNonAuthzPasswordByToken(token: string, password: string, lang?: string, observe?: 'events', reportProgress?: boolean): Observable>; + public changeNonAuthzPasswordByToken(token: string, password: string, lang?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (token === null || token === undefined) { + throw new Error('Required parameter token was null or undefined when calling changeNonAuthzPasswordByToken.'); + } + if (password === null || password === undefined) { + throw new Error('Required parameter password was null or undefined when calling changeNonAuthzPasswordByToken.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (token !== undefined && token !== null) { + queryParameters = queryParameters.set('token', token); + } + if (password !== undefined && password !== null) { + queryParameters = queryParameters.set('password', password); + } + if (lang !== undefined && lang !== null) { + queryParameters = queryParameters.set('lang', lang); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/changeNonAuthzPassword/token`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Changes password for a user in specified login-namespace. + * @param login login + * @param namespace namespace + * @param newPassword + * @param oldPassword + * @param checkOldPassword True if the oldPassword has to be checked. When omitted it defaults to false. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public changePasswordForLogin(login: string, namespace: string, newPassword: string, oldPassword?: string, checkOldPassword?: boolean, observe?: 'body', reportProgress?: boolean): Observable; + public changePasswordForLogin(login: string, namespace: string, newPassword: string, oldPassword?: string, checkOldPassword?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; + public changePasswordForLogin(login: string, namespace: string, newPassword: string, oldPassword?: string, checkOldPassword?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; + public changePasswordForLogin(login: string, namespace: string, newPassword: string, oldPassword?: string, checkOldPassword?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (login === null || login === undefined) { + throw new Error('Required parameter login was null or undefined when calling changePasswordForLogin.'); + } + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling changePasswordForLogin.'); + } + if (newPassword === null || newPassword === undefined) { + throw new Error('Required parameter newPassword was null or undefined when calling changePasswordForLogin.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (login !== undefined && login !== null) { + queryParameters = queryParameters.set('login', login); + } + if (namespace !== undefined && namespace !== null) { + queryParameters = queryParameters.set('namespace', namespace); + } + if (newPassword !== undefined && newPassword !== null) { + queryParameters = queryParameters.set('newPassword', newPassword); + } + if (oldPassword !== undefined && oldPassword !== null) { + queryParameters = queryParameters.set('oldPassword', oldPassword); + } + if (checkOldPassword !== undefined && checkOldPassword !== null) { + queryParameters = queryParameters.set('checkOldPassword', checkOldPassword); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/changePassword/login`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Changes password for a user in specified login-namespace. + * @param user id of User + * @param namespace namespace + * @param newPassword + * @param oldPassword + * @param checkOldPassword True if the oldPassword has to be checked. When omitted it defaults to false. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public changePasswordForUser(user: number, namespace: string, newPassword: string, oldPassword?: string, checkOldPassword?: boolean, observe?: 'body', reportProgress?: boolean): Observable; + public changePasswordForUser(user: number, namespace: string, newPassword: string, oldPassword?: string, checkOldPassword?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; + public changePasswordForUser(user: number, namespace: string, newPassword: string, oldPassword?: string, checkOldPassword?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; + public changePasswordForUser(user: number, namespace: string, newPassword: string, oldPassword?: string, checkOldPassword?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling changePasswordForUser.'); + } + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling changePasswordForUser.'); + } + if (newPassword === null || newPassword === undefined) { + throw new Error('Required parameter newPassword was null or undefined when calling changePasswordForUser.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (namespace !== undefined && namespace !== null) { + queryParameters = queryParameters.set('namespace', namespace); + } + if (newPassword !== undefined && newPassword !== null) { + queryParameters = queryParameters.set('newPassword', newPassword); + } + if (oldPassword !== undefined && oldPassword !== null) { + queryParameters = queryParameters.set('oldPassword', oldPassword); + } + if (checkOldPassword !== undefined && checkOldPassword !== null) { + queryParameters = queryParameters.set('checkOldPassword', checkOldPassword); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/changePassword/user`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Checks if the password reset request is valid. + * This method throws PasswordResetLinkExpiredException when the password reset request expired. This method throws PasswordResetLinkNotValidException when the password reset request was already used or has never existed. + * @param token token for the password reset request + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public checkPasswordResetRequestByTokenIsValid(token: string, observe?: 'body', reportProgress?: boolean): Observable; + public checkPasswordResetRequestByTokenIsValid(token: string, observe?: 'response', reportProgress?: boolean): Observable>; + public checkPasswordResetRequestByTokenIsValid(token: string, observe?: 'events', reportProgress?: boolean): Observable>; + public checkPasswordResetRequestByTokenIsValid(token: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (token === null || token === undefined) { + throw new Error('Required parameter token was null or undefined when calling checkPasswordResetRequestByTokenIsValid.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (token !== undefined && token !== null) { + queryParameters = queryParameters.set('token', token); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/usersManager/checkPasswordResetRequestIsValid/token`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Check password strength for the given namespace. + * If the check fails, the PasswordStrengthException error is returned. + * @param password password + * @param namespace namespace + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public checkPasswordStrength(password: string, namespace: string, observe?: 'body', reportProgress?: boolean): Observable; + public checkPasswordStrength(password: string, namespace: string, observe?: 'response', reportProgress?: boolean): Observable>; + public checkPasswordStrength(password: string, namespace: string, observe?: 'events', reportProgress?: boolean): Observable>; + public checkPasswordStrength(password: string, namespace: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (password === null || password === undefined) { + throw new Error('Required parameter password was null or undefined when calling checkPasswordStrength.'); + } + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling checkPasswordStrength.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (password !== undefined && password !== null) { + queryParameters = queryParameters.set('password', password); + } + if (namespace !== undefined && namespace !== null) { + queryParameters = queryParameters.set('namespace', namespace); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/usersManager/checkPasswordStrength`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Creates alternative password in external system. + * @param user id of User + * @param description + * @param loginNamespace + * @param password + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createAlternativePassword(user: number, description: string, loginNamespace: string, password: string, observe?: 'body', reportProgress?: boolean): Observable; + public createAlternativePassword(user: number, description: string, loginNamespace: string, password: string, observe?: 'response', reportProgress?: boolean): Observable>; + public createAlternativePassword(user: number, description: string, loginNamespace: string, password: string, observe?: 'events', reportProgress?: boolean): Observable>; + public createAlternativePassword(user: number, description: string, loginNamespace: string, password: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling createAlternativePassword.'); + } + if (description === null || description === undefined) { + throw new Error('Required parameter description was null or undefined when calling createAlternativePassword.'); + } + if (loginNamespace === null || loginNamespace === undefined) { + throw new Error('Required parameter loginNamespace was null or undefined when calling createAlternativePassword.'); + } + if (password === null || password === undefined) { + throw new Error('Required parameter password was null or undefined when calling createAlternativePassword.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (description !== undefined && description !== null) { + queryParameters = queryParameters.set('description', description); + } + if (loginNamespace !== undefined && loginNamespace !== null) { + queryParameters = queryParameters.set('loginNamespace', loginNamespace); + } + if (password !== undefined && password !== null) { + queryParameters = queryParameters.set('password', password); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/createAlternativePassword`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * From given candidate, creates a service user and assign given owners to him. + * This method also checks if some of given userExtSources do exist. If so, this method throws a UserExtSourceExistsException. This method can also set only user-def and user-opt attributes for the given candidate. + * @param inputCreateServiceUser + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createServiceUser(inputCreateServiceUser: InputCreateServiceUser, observe?: 'body', reportProgress?: boolean): Observable; + public createServiceUser(inputCreateServiceUser: InputCreateServiceUser, observe?: 'response', reportProgress?: boolean): Observable>; + public createServiceUser(inputCreateServiceUser: InputCreateServiceUser, observe?: 'events', reportProgress?: boolean): Observable>; + public createServiceUser(inputCreateServiceUser: InputCreateServiceUser, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputCreateServiceUser === null || inputCreateServiceUser === undefined) { + throw new Error('Required parameter inputCreateServiceUser was null or undefined when calling createServiceUser.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/usersManager/createServiceUser`, + inputCreateServiceUser, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Deletes alternative password in external system. + * @param user id of User + * @param loginNamespace + * @param passwordId + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteAlternativePassword(user: number, loginNamespace: string, passwordId: string, observe?: 'body', reportProgress?: boolean): Observable; + public deleteAlternativePassword(user: number, loginNamespace: string, passwordId: string, observe?: 'response', reportProgress?: boolean): Observable>; + public deleteAlternativePassword(user: number, loginNamespace: string, passwordId: string, observe?: 'events', reportProgress?: boolean): Observable>; + public deleteAlternativePassword(user: number, loginNamespace: string, passwordId: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling deleteAlternativePassword.'); + } + if (loginNamespace === null || loginNamespace === undefined) { + throw new Error('Required parameter loginNamespace was null or undefined when calling deleteAlternativePassword.'); + } + if (passwordId === null || passwordId === undefined) { + throw new Error('Required parameter passwordId was null or undefined when calling deleteAlternativePassword.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (loginNamespace !== undefined && loginNamespace !== null) { + queryParameters = queryParameters.set('loginNamespace', loginNamespace); + } + if (passwordId !== undefined && passwordId !== null) { + queryParameters = queryParameters.set('passwordId', passwordId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/deleteAlternativePassword`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Delete password for a user in specified login-namespace. + * @param login login + * @param namespace namespace + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deletePasswordForLogin(login: string, namespace: string, observe?: 'body', reportProgress?: boolean): Observable; + public deletePasswordForLogin(login: string, namespace: string, observe?: 'response', reportProgress?: boolean): Observable>; + public deletePasswordForLogin(login: string, namespace: string, observe?: 'events', reportProgress?: boolean): Observable>; + public deletePasswordForLogin(login: string, namespace: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (login === null || login === undefined) { + throw new Error('Required parameter login was null or undefined when calling deletePasswordForLogin.'); + } + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deletePasswordForLogin.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (login !== undefined && login !== null) { + queryParameters = queryParameters.set('login', login); + } + if (namespace !== undefined && namespace !== null) { + queryParameters = queryParameters.set('namespace', namespace); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/deletePassword/login`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Delete password for a user in specified login-namespace. + * @param user id of User + * @param namespace namespace + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deletePasswordForUser(user: number, namespace: string, observe?: 'body', reportProgress?: boolean): Observable; + public deletePasswordForUser(user: number, namespace: string, observe?: 'response', reportProgress?: boolean): Observable>; + public deletePasswordForUser(user: number, namespace: string, observe?: 'events', reportProgress?: boolean): Observable>; + public deletePasswordForUser(user: number, namespace: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling deletePasswordForUser.'); + } + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling deletePasswordForUser.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (namespace !== undefined && namespace !== null) { + queryParameters = queryParameters.set('namespace', namespace); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/deletePassword/user`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Deletes a user. + * @param user id of User + * @param force If true, delete entity forcefully. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteUser(user: number, force?: boolean, observe?: 'body', reportProgress?: boolean): Observable; + public deleteUser(user: number, force?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; + public deleteUser(user: number, force?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; + public deleteUser(user: number, force?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling deleteUser.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (force !== undefined && force !== null) { + queryParameters = queryParameters.set('force', force); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/deleteUser`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns list of RichUsers with attributes who matches the searchString, searching name, email, logins. + * @param searchString Text to search by + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findRichUsers(searchString: string, observe?: 'body', reportProgress?: boolean): Observable>; + public findRichUsers(searchString: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public findRichUsers(searchString: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public findRichUsers(searchString: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (searchString === null || searchString === undefined) { + throw new Error('Required parameter searchString was null or undefined when calling findRichUsers.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (searchString !== undefined && searchString !== null) { + queryParameters = queryParameters.set('searchString', searchString); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/findRichUsers`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns list of RichUsers with attributes who matches the searchString. + * @param searchString Text to search by + * @param attrsNames list of attribute names List<String> or null + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findRichUsersWithAttributes(searchString: string, attrsNames?: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public findRichUsersWithAttributes(searchString: string, attrsNames?: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public findRichUsersWithAttributes(searchString: string, attrsNames?: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public findRichUsersWithAttributes(searchString: string, attrsNames?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (searchString === null || searchString === undefined) { + throw new Error('Required parameter searchString was null or undefined when calling findRichUsersWithAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (searchString !== undefined && searchString !== null) { + queryParameters = queryParameters.set('searchString', searchString); + } + if (attrsNames) { + attrsNames.forEach((element) => { + queryParameters = queryParameters.append('attrsNames[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/findRichUsersWithAttributes`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns list of Users with attributes who matches the searchString, searching name, email, logins. + * @param searchString Text to search by + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findUsers(searchString: string, observe?: 'body', reportProgress?: boolean): Observable>; + public findUsers(searchString: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public findUsers(searchString: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public findUsers(searchString: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (searchString === null || searchString === undefined) { + throw new Error('Required parameter searchString was null or undefined when calling findUsers.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (searchString !== undefined && searchString !== null) { + queryParameters = queryParameters.set('searchString', searchString); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/findUsers`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Generates user account in a backend system associated with login-namespace in Perun. Parameters are implementation-dependent for each login-namespace. Returns map with 1) key=login-namespace attribute urn, value=generated login 2) rest of opt response attributes. + * @param namespace namespace + * @param name + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public generateAccountForName(namespace: string, name?: string, observe?: 'body', reportProgress?: boolean): Observable<{ [key: string]: string; }>; + public generateAccountForName(namespace: string, name?: string, observe?: 'response', reportProgress?: boolean): Observable>; + public generateAccountForName(namespace: string, name?: string, observe?: 'events', reportProgress?: boolean): Observable>; + public generateAccountForName(namespace: string, name?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling generateAccountForName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (namespace !== undefined && namespace !== null) { + queryParameters = queryParameters.set('namespace', namespace); + } + if (name !== undefined && name !== null) { + queryParameters = queryParameters.set('name', name); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post<{ [key: string]: string; }>(`${this.configuration.basePath}/urlinjsonout/usersManager/generateAccount/name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns users with attributes + * Returns list of objects representing the User with attributes + * @param includedSpecificUsers if you want to or don\'t want to get specificUsers too + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllRichUsersWithAttributes(includedSpecificUsers: boolean, observe?: 'body', reportProgress?: boolean): Observable>; + public getAllRichUsersWithAttributes(includedSpecificUsers: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllRichUsersWithAttributes(includedSpecificUsers: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllRichUsersWithAttributes(includedSpecificUsers: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (includedSpecificUsers === null || includedSpecificUsers === undefined) { + throw new Error('Required parameter includedSpecificUsers was null or undefined when calling getAllRichUsersWithAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (includedSpecificUsers !== undefined && includedSpecificUsers !== null) { + queryParameters = queryParameters.set('includedSpecificUsers', includedSpecificUsers); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getAllRichUsersWithAttributes`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all rich resources which have the user assigned. + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedRichResourcesForUser(user: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getAssignedRichResourcesForUser(user: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getAssignedRichResourcesForUser(user: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getAssignedRichResourcesForUser(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getAssignedRichResourcesForUser.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getAssignedRichResources`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get list of groups of user on specified facility where use is active. + * That means User is a VALID in the VO and the Group and groups are assigned to the facility. + * @param user id of User + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupsForFacilityWhereUserIsActive(user: number, facility: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getGroupsForFacilityWhereUserIsActive(user: number, facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getGroupsForFacilityWhereUserIsActive(user: number, facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getGroupsForFacilityWhereUserIsActive(user: number, facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getGroupsForFacilityWhereUserIsActive.'); + } + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getGroupsForFacilityWhereUserIsActive.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getGroupsWhereUserIsActive/facility`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get list of groups of user on specified resource where use is active. + * That means User is a VALID in the VO and the Group and groups are assigned to the resource. + * @param user id of User + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupsForResourceWhereUserIsActive(user: number, resource: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getGroupsForResourceWhereUserIsActive(user: number, resource: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getGroupsForResourceWhereUserIsActive(user: number, resource: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getGroupsForResourceWhereUserIsActive(user: number, resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getGroupsForResourceWhereUserIsActive.'); + } + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getGroupsForResourceWhereUserIsActive.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getGroupsWhereUserIsActive/resource`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns list of Groups in selected Vo, where the User is a direct Administrator or he is a VALID member of any group which is Administrator of some of these Groups. + * @param user id of User + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupsInVoWhereUserIsAdmin(user: number, vo: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getGroupsInVoWhereUserIsAdmin(user: number, vo: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getGroupsInVoWhereUserIsAdmin(user: number, vo: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getGroupsInVoWhereUserIsAdmin(user: number, vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getGroupsInVoWhereUserIsAdmin.'); + } + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getGroupsInVoWhereUserIsAdmin.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getGroupsWhereUserIsAdmin/u-v`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns list of Groups in Perun, where the User is a direct Administrator or he is a VALID member of any group which is Administrator of some of these Groups. + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupsWhereUserIsAdmin(user: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getGroupsWhereUserIsAdmin(user: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getGroupsWhereUserIsAdmin(user: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getGroupsWhereUserIsAdmin(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getGroupsWhereUserIsAdmin.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getGroupsWhereUserIsAdmin/u`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Return list of email addresses of user, which are awaiting validation and are inside time window for validation. If there is no preferred email change request pending or requests are outside time window for validation, returns empty list. + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getPendingPreferredEmailChanges(user: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getPendingPreferredEmailChanges(user: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getPendingPreferredEmailChanges(user: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getPendingPreferredEmailChanges(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getPendingPreferredEmailChanges.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getPendingPreferredEmailChanges`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Gets list of all user\'s external sources with attributes. + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRichUserExtSources(user: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getRichUserExtSources(user: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getRichUserExtSources(user: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getRichUserExtSources(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getRichUserExtSources.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getRichUserExtSources/u`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns user with attributes + * Returns object representing the User with attributes + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRichUserWithAttributes(user: number, observe?: 'body', reportProgress?: boolean): Observable; + public getRichUserWithAttributes(user: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getRichUserWithAttributes(user: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getRichUserWithAttributes(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getRichUserWithAttributes.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/usersManager/getRichUserWithAttributes`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns rich users without attributes by their IDs. + * @param ids list of ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRichUsersByIds(ids: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getRichUsersByIds(ids: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getRichUsersByIds(ids: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getRichUsersByIds(ids: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (ids === null || ids === undefined) { + throw new Error('Required parameter ids was null or undefined when calling getRichUsersByIds.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (ids) { + ids.forEach((element) => { + queryParameters = queryParameters.append('ids[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getRichUsersByIds`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns rich users with attributes by their IDs. + * @param ids list of ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRichUsersWithAttributesByIds(ids: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getRichUsersWithAttributesByIds(ids: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getRichUsersWithAttributesByIds(ids: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getRichUsersWithAttributesByIds(ids: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (ids === null || ids === undefined) { + throw new Error('Required parameter ids was null or undefined when calling getRichUsersWithAttributesByIds.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (ids) { + ids.forEach((element) => { + queryParameters = queryParameters.append('ids[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getRichUsersWithAttributesByIds`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns list of RichUsers which are not members of any VO with attributes. + * @param attrsNames list of attribute names List<String> or null + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRichUsersWithoutVoWithAttributes(attrsNames?: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getRichUsersWithoutVoWithAttributes(attrsNames?: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getRichUsersWithoutVoWithAttributes(attrsNames?: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getRichUsersWithoutVoWithAttributes(attrsNames?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (attrsNames) { + attrsNames.forEach((element) => { + queryParameters = queryParameters.append('attrsNames[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getRichUsersWithoutVoWithAttributes`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get all specific users who are owned by the user. + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getSpecificUsersByUser(user: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getSpecificUsersByUser(user: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getSpecificUsersByUser(user: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getSpecificUsersByUser(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getSpecificUsersByUser.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getSpecificUsersByUser`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Gets sponsors for given member with optional attribute names. + * @param member id of Member + * @param attrNames list of attribute names List<String> or null + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getSponsorsForMember(member: number, attrNames?: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getSponsorsForMember(member: number, attrNames?: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getSponsorsForMember(member: number, attrNames?: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getSponsorsForMember(member: number, attrNames?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getSponsorsForMember.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getSponsorsForMember/member`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Gets sponsors for member specified by VO, extSourceName and extLogin with optional attribute names. + * @param vo id of Vo + * @param extSourceName external source name, e.g. IdP entityId + * @param extLogin external login of user, e.g. john + * @param attrNames list of attribute names List<String> or null + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getSponsorsForMemberByVoAndLogin(vo: number, extSourceName: string, extLogin: string, attrNames?: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getSponsorsForMemberByVoAndLogin(vo: number, extSourceName: string, extLogin: string, attrNames?: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getSponsorsForMemberByVoAndLogin(vo: number, extSourceName: string, extLogin: string, attrNames?: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getSponsorsForMemberByVoAndLogin(vo: number, extSourceName: string, extLogin: string, attrNames?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getSponsorsForMemberByVoAndLogin.'); + } + if (extSourceName === null || extSourceName === undefined) { + throw new Error('Required parameter extSourceName was null or undefined when calling getSponsorsForMemberByVoAndLogin.'); + } + if (extLogin === null || extLogin === undefined) { + throw new Error('Required parameter extLogin was null or undefined when calling getSponsorsForMemberByVoAndLogin.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (extSourceName !== undefined && extSourceName !== null) { + queryParameters = queryParameters.set('extSourceName', extSourceName); + } + if (extLogin !== undefined && extLogin !== null) { + queryParameters = queryParameters.set('extLogin', extLogin); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getSponsorsForMember/vo`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns user by its ExtSourceName and ExtLogin. + * Returns User found by its authentication data + * @param extLogin external login of user, e.g. john + * @param extSourceName external source name, e.g. IdP entityId + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserByExtSourceNameAndExtLogin(extLogin: string, extSourceName: string, observe?: 'body', reportProgress?: boolean): Observable; + public getUserByExtSourceNameAndExtLogin(extLogin: string, extSourceName: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getUserByExtSourceNameAndExtLogin(extLogin: string, extSourceName: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getUserByExtSourceNameAndExtLogin(extLogin: string, extSourceName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (extLogin === null || extLogin === undefined) { + throw new Error('Required parameter extLogin was null or undefined when calling getUserByExtSourceNameAndExtLogin.'); + } + if (extSourceName === null || extSourceName === undefined) { + throw new Error('Required parameter extSourceName was null or undefined when calling getUserByExtSourceNameAndExtLogin.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (extLogin !== undefined && extLogin !== null) { + queryParameters = queryParameters.set('extLogin', extLogin); + } + if (extSourceName !== undefined && extSourceName !== null) { + queryParameters = queryParameters.set('extSourceName', extSourceName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/usersManager/getUserByExtSourceNameAndExtLogin`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns user by its id + * Returns object representing the User + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserById(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public getUserById(id: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getUserById(id: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getUserById(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getUserById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/usersManager/getUserById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns user ext source by its id. + * @param userExtSource id of UserExtSource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserExtSourceById(userExtSource: number, observe?: 'body', reportProgress?: boolean): Observable; + public getUserExtSourceById(userExtSource: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getUserExtSourceById(userExtSource: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getUserExtSourceById(userExtSource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (userExtSource === null || userExtSource === undefined) { + throw new Error('Required parameter userExtSource was null or undefined when calling getUserExtSourceById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (userExtSource !== undefined && userExtSource !== null) { + queryParameters = queryParameters.set('userExtSource', userExtSource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/usersManager/getUserExtSourceById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Return userExtSource for specific attribute definition (specified by id) and unique value. + * @param attributeId id of AttributeDefinition + * @param attributeValue string value of Attribute + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserExtSourceByUniqueAttributeValueAndAttributeId(attributeId: number, attributeValue: string, observe?: 'body', reportProgress?: boolean): Observable; + public getUserExtSourceByUniqueAttributeValueAndAttributeId(attributeId: number, attributeValue: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getUserExtSourceByUniqueAttributeValueAndAttributeId(attributeId: number, attributeValue: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getUserExtSourceByUniqueAttributeValueAndAttributeId(attributeId: number, attributeValue: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (attributeId === null || attributeId === undefined) { + throw new Error('Required parameter attributeId was null or undefined when calling getUserExtSourceByUniqueAttributeValueAndAttributeId.'); + } + if (attributeValue === null || attributeValue === undefined) { + throw new Error('Required parameter attributeValue was null or undefined when calling getUserExtSourceByUniqueAttributeValueAndAttributeId.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (attributeId !== undefined && attributeId !== null) { + queryParameters = queryParameters.set('attributeId', attributeId); + } + if (attributeValue !== undefined && attributeValue !== null) { + queryParameters = queryParameters.set('attributeValue', attributeValue); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/usersManager/getUserExtSourceByUniqueAttributeValue/id`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Return userExtSource for specific attribute definition (specified by name) and unique value. + * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) + * @param attributeValue string value of Attribute + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserExtSourceByUniqueAttributeValueAndAttributeName(attributeName: string, attributeValue: string, observe?: 'body', reportProgress?: boolean): Observable; + public getUserExtSourceByUniqueAttributeValueAndAttributeName(attributeName: string, attributeValue: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getUserExtSourceByUniqueAttributeValueAndAttributeName(attributeName: string, attributeValue: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getUserExtSourceByUniqueAttributeValueAndAttributeName(attributeName: string, attributeValue: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (attributeName === null || attributeName === undefined) { + throw new Error('Required parameter attributeName was null or undefined when calling getUserExtSourceByUniqueAttributeValueAndAttributeName.'); + } + if (attributeValue === null || attributeValue === undefined) { + throw new Error('Required parameter attributeValue was null or undefined when calling getUserExtSourceByUniqueAttributeValueAndAttributeName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (attributeName !== undefined && attributeName !== null) { + queryParameters = queryParameters.set('attributeName', attributeName); + } + if (attributeValue !== undefined && attributeValue !== null) { + queryParameters = queryParameters.set('attributeValue', attributeValue); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/usersManager/getUserExtSourceByUniqueAttributeValue/name`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Gets list of all user\'s external sources. + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserExtSources(user: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getUserExtSources(user: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getUserExtSources(user: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getUserExtSources(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getUserExtSources.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getUserExtSources`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns list of user ext sources by their ids. + * @param ids list of ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserExtSourcesByIds(ids: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getUserExtSourcesByIds(ids: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getUserExtSourcesByIds(ids: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getUserExtSourcesByIds(ids: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (ids === null || ids === undefined) { + throw new Error('Required parameter ids was null or undefined when calling getUserExtSourcesByIds.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (ids) { + ids.forEach((element) => { + queryParameters = queryParameters.append('ids[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getUserExtSourcesByIds`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns all users + * Returns list of objects representing the User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUsers(observe?: 'body', reportProgress?: boolean): Observable>; + public getUsers(observe?: 'response', reportProgress?: boolean): Observable>>; + public getUsers(observe?: 'events', reportProgress?: boolean): Observable>>; + public getUsers(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getUsers`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns list of Users by their ids. + * @param ids list of ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUsersByIds(ids: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getUsersByIds(ids: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getUsersByIds(ids: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getUsersByIds(ids: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (ids === null || ids === undefined) { + throw new Error('Required parameter ids was null or undefined when calling getUsersByIds.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (ids) { + ids.forEach((element) => { + queryParameters = queryParameters.append('ids[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getUsersByIds`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Return all users who owns the specific user. + * @param specificUser id of specific User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUsersBySpecificUser(specificUser: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getUsersBySpecificUser(specificUser: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getUsersBySpecificUser(specificUser: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getUsersBySpecificUser(specificUser: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (specificUser === null || specificUser === undefined) { + throw new Error('Required parameter specificUser was null or undefined when calling getUsersBySpecificUser.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (specificUser !== undefined && specificUser !== null) { + queryParameters = queryParameters.set('specificUser', specificUser); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getUsersBySpecificUser`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get page of users with the given attributes. + * @param inputGetPaginatedUsers + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUsersPage(inputGetPaginatedUsers: InputGetPaginatedUsers, observe?: 'body', reportProgress?: boolean): Observable; + public getUsersPage(inputGetPaginatedUsers: InputGetPaginatedUsers, observe?: 'response', reportProgress?: boolean): Observable>; + public getUsersPage(inputGetPaginatedUsers: InputGetPaginatedUsers, observe?: 'events', reportProgress?: boolean): Observable>; + public getUsersPage(inputGetPaginatedUsers: InputGetPaginatedUsers, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputGetPaginatedUsers === null || inputGetPaginatedUsers === undefined) { + throw new Error('Required parameter inputGetPaginatedUsers was null or undefined when calling getUsersPage.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/usersManager/getUsersPage`, + inputGetPaginatedUsers, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns list of VOs, where the user is an Administrator. If a group, of which the user is a valid member, is an administrator of a VO, include that VO as well. + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVosWhereUserIsAdmin(user: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getVosWhereUserIsAdmin(user: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getVosWhereUserIsAdmin(user: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getVosWhereUserIsAdmin(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getVosWhereUserIsAdmin.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getVosWhereUserIsAdmin`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns list of VOs, where the user is a Member. + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVosWhereUserIsMember(user: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getVosWhereUserIsMember(user: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getVosWhereUserIsMember(user: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getVosWhereUserIsMember(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getVosWhereUserIsMember.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getVosWhereUserIsMember`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Checks if the login is available in the namespace. Return 1 if yes, 0 if no. + * @param loginNamespace + * @param login login + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public isLoginAvailable(loginNamespace: string, login: string, observe?: 'body', reportProgress?: boolean): Observable; + public isLoginAvailable(loginNamespace: string, login: string, observe?: 'response', reportProgress?: boolean): Observable>; + public isLoginAvailable(loginNamespace: string, login: string, observe?: 'events', reportProgress?: boolean): Observable>; + public isLoginAvailable(loginNamespace: string, login: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (loginNamespace === null || loginNamespace === undefined) { + throw new Error('Required parameter loginNamespace was null or undefined when calling isLoginAvailable.'); + } + if (login === null || login === undefined) { + throw new Error('Required parameter login was null or undefined when calling isLoginAvailable.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (loginNamespace !== undefined && loginNamespace !== null) { + queryParameters = queryParameters.set('loginNamespace', loginNamespace); + } + if (login !== undefined && login !== null) { + queryParameters = queryParameters.set('login', login); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/isLoginAvailable`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Check wheter login exists in specified login-namespace. Only available for some namespaces. + * @param user id of User + * @param namespace namespace + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public loginExist(user: number, namespace: string, observe?: 'body', reportProgress?: boolean): Observable; + public loginExist(user: number, namespace: string, observe?: 'response', reportProgress?: boolean): Observable>; + public loginExist(user: number, namespace: string, observe?: 'events', reportProgress?: boolean): Observable>; + public loginExist(user: number, namespace: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling loginExist.'); + } + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling loginExist.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (namespace !== undefined && namespace !== null) { + queryParameters = queryParameters.set('namespace', namespace); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/loginExist`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove specific user owner. + * @param user id of User + * @param specificUser id of specific User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeSpecificUserOwner(user: number, specificUser: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeSpecificUserOwner(user: number, specificUser: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeSpecificUserOwner(user: number, specificUser: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeSpecificUserOwner(user: number, specificUser: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling removeSpecificUserOwner.'); + } + if (specificUser === null || specificUser === undefined) { + throw new Error('Required parameter specificUser was null or undefined when calling removeSpecificUserOwner.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (specificUser !== undefined && specificUser !== null) { + queryParameters = queryParameters.set('specificUser', specificUser); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/removeSpecificUserOwner`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove user\'s external source. Persistent UserExtSources are not removed unless force param is present and set to true. + * @param user id of User + * @param userExtSource id of UserExtSource + * @param force If true, delete entity forcefully. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeUserExtSource(user: number, userExtSource: number, force?: boolean, observe?: 'body', reportProgress?: boolean): Observable; + public removeUserExtSource(user: number, userExtSource: number, force?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; + public removeUserExtSource(user: number, userExtSource: number, force?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; + public removeUserExtSource(user: number, userExtSource: number, force?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling removeUserExtSource.'); + } + if (userExtSource === null || userExtSource === undefined) { + throw new Error('Required parameter userExtSource was null or undefined when calling removeUserExtSource.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (userExtSource !== undefined && userExtSource !== null) { + queryParameters = queryParameters.set('userExtSource', userExtSource); + } + if (force !== undefined && force !== null) { + queryParameters = queryParameters.set('force', force); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/removeUserExtSource`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Request to change preferred email address of user. Validation mail is sent on new address. Change is not saved until user validate new email address by calling validatePreferredEmailChange() method with proper set of parameters (sent in validation mail). Provide eiher linkPath (appended to referer) or whole custom url. Combination of linkPath and customUrl is not supported. + * @param user id of User + * @param email new email address to set + * @param lang language to get confirmation mail in (optional) + * @param linkPath path that is appended to the referer and creates the verification link (optional) + * @param customUrl url to verification link containing path (optional) + * @param idpFilter authentication method appended to query parameters of verification link (optional) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public requestPreferredEmailChange(user: number, email: string, lang?: string, linkPath?: string, customUrl?: string, idpFilter?: string, observe?: 'body', reportProgress?: boolean): Observable; + public requestPreferredEmailChange(user: number, email: string, lang?: string, linkPath?: string, customUrl?: string, idpFilter?: string, observe?: 'response', reportProgress?: boolean): Observable>; + public requestPreferredEmailChange(user: number, email: string, lang?: string, linkPath?: string, customUrl?: string, idpFilter?: string, observe?: 'events', reportProgress?: boolean): Observable>; + public requestPreferredEmailChange(user: number, email: string, lang?: string, linkPath?: string, customUrl?: string, idpFilter?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling requestPreferredEmailChange.'); + } + if (email === null || email === undefined) { + throw new Error('Required parameter email was null or undefined when calling requestPreferredEmailChange.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (email !== undefined && email !== null) { + queryParameters = queryParameters.set('email', email); + } + if (lang !== undefined && lang !== null) { + queryParameters = queryParameters.set('lang', lang); + } + if (linkPath !== undefined && linkPath !== null) { + queryParameters = queryParameters.set('linkPath', linkPath); + } + if (customUrl !== undefined && customUrl !== null) { + queryParameters = queryParameters.set('customUrl', customUrl); + } + if (idpFilter !== undefined && idpFilter !== null) { + queryParameters = queryParameters.set('idpFilter', idpFilter); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/requestPreferredEmailChange`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Reserves password for a user in specified login-namespace. + * @param login login + * @param namespace namespace + * @param password password + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public reservePasswordForLogin(login: string, namespace: string, password: string, observe?: 'body', reportProgress?: boolean): Observable; + public reservePasswordForLogin(login: string, namespace: string, password: string, observe?: 'response', reportProgress?: boolean): Observable>; + public reservePasswordForLogin(login: string, namespace: string, password: string, observe?: 'events', reportProgress?: boolean): Observable>; + public reservePasswordForLogin(login: string, namespace: string, password: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (login === null || login === undefined) { + throw new Error('Required parameter login was null or undefined when calling reservePasswordForLogin.'); + } + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling reservePasswordForLogin.'); + } + if (password === null || password === undefined) { + throw new Error('Required parameter password was null or undefined when calling reservePasswordForLogin.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (login !== undefined && login !== null) { + queryParameters = queryParameters.set('login', login); + } + if (namespace !== undefined && namespace !== null) { + queryParameters = queryParameters.set('namespace', namespace); + } + if (password !== undefined && password !== null) { + queryParameters = queryParameters.set('password', password); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/reservePassword/login`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Reserves password for a user in specified login-namespace. + * @param user id of User + * @param namespace namespace + * @param password password + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public reservePasswordForUser(user: number, namespace: string, password: string, observe?: 'body', reportProgress?: boolean): Observable; + public reservePasswordForUser(user: number, namespace: string, password: string, observe?: 'response', reportProgress?: boolean): Observable>; + public reservePasswordForUser(user: number, namespace: string, password: string, observe?: 'events', reportProgress?: boolean): Observable>; + public reservePasswordForUser(user: number, namespace: string, password: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling reservePasswordForUser.'); + } + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling reservePasswordForUser.'); + } + if (password === null || password === undefined) { + throw new Error('Required parameter password was null or undefined when calling reservePasswordForUser.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (namespace !== undefined && namespace !== null) { + queryParameters = queryParameters.set('namespace', namespace); + } + if (password !== undefined && password !== null) { + queryParameters = queryParameters.set('password', password); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/reservePassword/user`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Reserves a random password in external authz system. User shouldn\'t be able to log-in (account disabled, password unknown to him). This is usefull when manager create account for others and later send them password reset request. + * @param user id of User + * @param namespace namespace + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public reserveRandomPassword(user: number, namespace: string, observe?: 'body', reportProgress?: boolean): Observable; + public reserveRandomPassword(user: number, namespace: string, observe?: 'response', reportProgress?: boolean): Observable>; + public reserveRandomPassword(user: number, namespace: string, observe?: 'events', reportProgress?: boolean): Observable>; + public reserveRandomPassword(user: number, namespace: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling reserveRandomPassword.'); + } + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling reserveRandomPassword.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (namespace !== undefined && namespace !== null) { + queryParameters = queryParameters.set('namespace', namespace); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/reserveRandomPassword`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Updates user + * @param inputUpdateUser + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateUser(inputUpdateUser: InputUpdateUser, observe?: 'body', reportProgress?: boolean): Observable; + public updateUser(inputUpdateUser: InputUpdateUser, observe?: 'response', reportProgress?: boolean): Observable>; + public updateUser(inputUpdateUser: InputUpdateUser, observe?: 'events', reportProgress?: boolean): Observable>; + public updateUser(inputUpdateUser: InputUpdateUser, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputUpdateUser === null || inputUpdateUser === undefined) { + throw new Error('Required parameter inputUpdateUser was null or undefined when calling updateUser.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/usersManager/updateUser`, + inputUpdateUser, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Validate password for a user in specified login-namespace. + * @param login login + * @param namespace namespace + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public validatePasswordForLogin(login: string, namespace: string, observe?: 'body', reportProgress?: boolean): Observable; + public validatePasswordForLogin(login: string, namespace: string, observe?: 'response', reportProgress?: boolean): Observable>; + public validatePasswordForLogin(login: string, namespace: string, observe?: 'events', reportProgress?: boolean): Observable>; + public validatePasswordForLogin(login: string, namespace: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (login === null || login === undefined) { + throw new Error('Required parameter login was null or undefined when calling validatePasswordForLogin.'); + } + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling validatePasswordForLogin.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (login !== undefined && login !== null) { + queryParameters = queryParameters.set('login', login); + } + if (namespace !== undefined && namespace !== null) { + queryParameters = queryParameters.set('namespace', namespace); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/validatePassword/login`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Validate password for a user in specified login-namespace. + * @param user id of User + * @param namespace namespace + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public validatePasswordForUser(user: number, namespace: string, observe?: 'body', reportProgress?: boolean): Observable; + public validatePasswordForUser(user: number, namespace: string, observe?: 'response', reportProgress?: boolean): Observable>; + public validatePasswordForUser(user: number, namespace: string, observe?: 'events', reportProgress?: boolean): Observable>; + public validatePasswordForUser(user: number, namespace: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling validatePasswordForUser.'); + } + if (namespace === null || namespace === undefined) { + throw new Error('Required parameter namespace was null or undefined when calling validatePasswordForUser.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (namespace !== undefined && namespace !== null) { + queryParameters = queryParameters.set('namespace', namespace); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/validatePassword/user`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Validate new preferred email address. Request to validate is determined based on token parameter sent in email notice by requestPreferredEmailChange() method. + * @param token token for the email change request + * @param u id of user you want to validate preferred email request + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public validatePreferredEmailChangeWithToken(token: string, u: number, observe?: 'body', reportProgress?: boolean): Observable; + public validatePreferredEmailChangeWithToken(token: string, u: number, observe?: 'response', reportProgress?: boolean): Observable>; + public validatePreferredEmailChangeWithToken(token: string, u: number, observe?: 'events', reportProgress?: boolean): Observable>; + public validatePreferredEmailChangeWithToken(token: string, u: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (token === null || token === undefined) { + throw new Error('Required parameter token was null or undefined when calling validatePreferredEmailChangeWithToken.'); + } + if (u === null || u === undefined) { + throw new Error('Required parameter u was null or undefined when calling validatePreferredEmailChangeWithToken.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (token !== undefined && token !== null) { + queryParameters = queryParameters.set('token', token); + } + if (u !== undefined && u !== null) { + queryParameters = queryParameters.set('u', u); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/validatePreferredEmailChange`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/usersManager/validatePreferredEmailChange`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } } diff --git a/libs/perun/openapi/src/lib/api/utils.service.ts b/libs/perun/openapi/src/lib/api/utils.service.ts index 7921c9489..f04bbc71c 100644 --- a/libs/perun/openapi/src/lib/api/utils.service.ts +++ b/libs/perun/openapi/src/lib/api/utils.service.ts @@ -11,398 +11,334 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { PerunAppsConfig } from '../model/perunAppsConfig'; import { PerunException } from '../model/perunException'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class UtilsService { - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration - ) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - /** - * Gets configuration of perun apps brandings and apps\' domains - * Returns object of type PerunAppsConfig - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAppsConfig(observe?: 'body', reportProgress?: boolean): Observable; - public getAppsConfig( - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getAppsConfig( - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getAppsConfig(observe: any = 'body', reportProgress: boolean = false): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; - return this.httpClient.get( - `${this.configuration.basePath}/json/utils/getAppsConfig`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets perun-web-gui.properties as Map<String,String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGuiConfiguration( - observe?: 'body', - reportProgress?: boolean - ): Observable<{ [key: string]: string }>; - public getGuiConfiguration( - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getGuiConfiguration( - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getGuiConfiguration( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); } - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - return this.httpClient.get<{ [key: string]: string }>( - `${this.configuration.basePath}/json/utils/getGuiConfiguration`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets Perun runtime status - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getPerunRPCVersion(observe?: 'body', reportProgress?: boolean): Observable; - public getPerunRPCVersion( - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getPerunRPCVersion( - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getPerunRPCVersion( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['text/plain']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } + /** + * Gets configuration of perun apps brandings and apps\' domains + * Returns object of type PerunAppsConfig + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAppsConfig(observe?: 'body', reportProgress?: boolean): Observable; + public getAppsConfig(observe?: 'response', reportProgress?: boolean): Observable>; + public getAppsConfig(observe?: 'events', reportProgress?: boolean): Observable>; + public getAppsConfig(observe: any = 'body', reportProgress: boolean = false ): Observable { - return this.httpClient.get(`${this.configuration.basePath}/`, { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - }); - } - - /** - * Gets Perun runtime statistics - * Returns list of strings which looks like this \"Timestamp: \'2019-11-14 10:46:39.613\'\", \"USERS: \'39927\'\", \"FACILITIES: \'552\'\", \"DESTINATIONS: \'2568\'\", \"VOS: \'341\'\", \"RESOURCES: \'2560\'\", \"GROUPS: \'2300\'\", \"AUDITMESSAGES: \'7333237\'\" - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getPerunStatistics(observe?: 'body', reportProgress?: boolean): Observable>; - public getPerunStatistics( - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getPerunStatistics( - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getPerunStatistics( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } + let headers = this.defaultHeaders; - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } - return this.httpClient.get>( - `${this.configuration.basePath}/json/utils/getPerunStatistics`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets Perun runtime status - * Returns list of strings which looks like this \"Version of Perun: 3.8.6\", \"Version of PerunDB: 3.1.55\", \"Version of Servlet: Apache Tomcat/9.0.16 (Debian)\", \"Version of DB-driver: PostgreSQL JDBC Driver-42.2.8\", \"Version of DB: PostgreSQL-12.0 (Debian 12.0-2.pgdg100+1)\", \"Version of Java platform: 11.0.5\", \"AuditerConsumer: \'127.0.0.1:6071\' with last processed id=\'23463958\'\", \"AuditerConsumer: \'ldapcConsumer\' with last processed id=\'23463958\'\", \"AuditerConsumer: \'notifications\' with last processed id=\'23463952\'\", \"LastMessageId: 23463958\", \"Timestamp: 2019-11-14 10:12:30.99\" - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getPerunStatus(observe?: 'body', reportProgress?: boolean): Observable>; - public getPerunStatus( - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getPerunStatus( - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getPerunStatus(observe: any = 'body', reportProgress: boolean = false): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); + + return this.httpClient.get(`${this.configuration.basePath}/json/utils/getAppsConfig`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); + + /** + * Gets perun-web-gui.properties as Map<String,String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGuiConfiguration(observe?: 'body', reportProgress?: boolean): Observable<{ [key: string]: string; }>; + public getGuiConfiguration(observe?: 'response', reportProgress?: boolean): Observable>; + public getGuiConfiguration(observe?: 'events', reportProgress?: boolean): Observable>; + public getGuiConfiguration(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get<{ [key: string]: string; }>(`${this.configuration.basePath}/json/utils/getGuiConfiguration`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } - return this.httpClient.get>( - `${this.configuration.basePath}/json/utils/getPerunStatus`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets Perun system time in milliseconds since the epoch - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getPerunSystemTimeInMillis(observe?: 'body', reportProgress?: boolean): Observable; - public getPerunSystemTimeInMillis( - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getPerunSystemTimeInMillis( - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getPerunSystemTimeInMillis( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + /** + * Gets Perun runtime status + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getPerunRPCVersion(observe?: 'body', reportProgress?: boolean): Observable; + public getPerunRPCVersion(observe?: 'response', reportProgress?: boolean): Observable>; + public getPerunRPCVersion(observe?: 'events', reportProgress?: boolean): Observable>; + public getPerunRPCVersion(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'text/plain' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); + /** + * Gets Perun runtime statistics + * Returns list of strings which looks like this \"Timestamp: \'2019-11-14 10:46:39.613\'\", \"USERS: \'39927\'\", \"FACILITIES: \'552\'\", \"DESTINATIONS: \'2568\'\", \"VOS: \'341\'\", \"RESOURCES: \'2560\'\", \"GROUPS: \'2300\'\", \"AUDITMESSAGES: \'7333237\'\" + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getPerunStatistics(observe?: 'body', reportProgress?: boolean): Observable>; + public getPerunStatistics(observe?: 'response', reportProgress?: boolean): Observable>>; + public getPerunStatistics(observe?: 'events', reportProgress?: boolean): Observable>>; + public getPerunStatistics(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/utils/getPerunStatistics`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); + + /** + * Gets Perun runtime status + * Returns list of strings which looks like this \"Version of Perun: 3.8.6\", \"Version of PerunDB: 3.1.55\", \"Version of Servlet: Apache Tomcat/9.0.16 (Debian)\", \"Version of DB-driver: PostgreSQL JDBC Driver-42.2.8\", \"Version of DB: PostgreSQL-12.0 (Debian 12.0-2.pgdg100+1)\", \"Version of Java platform: 11.0.5\", \"AuditerConsumer: \'127.0.0.1:6071\' with last processed id=\'23463958\'\", \"AuditerConsumer: \'ldapcConsumer\' with last processed id=\'23463958\'\", \"AuditerConsumer: \'notifications\' with last processed id=\'23463952\'\", \"LastMessageId: 23463958\", \"Timestamp: 2019-11-14 10:12:30.99\" + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getPerunStatus(observe?: 'body', reportProgress?: boolean): Observable>; + public getPerunStatus(observe?: 'response', reportProgress?: boolean): Observable>>; + public getPerunStatus(observe?: 'events', reportProgress?: boolean): Observable>>; + public getPerunStatus(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/utils/getPerunStatus`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); + + /** + * Gets Perun system time in milliseconds since the epoch + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getPerunSystemTimeInMillis(observe?: 'body', reportProgress?: boolean): Observable; + public getPerunSystemTimeInMillis(observe?: 'response', reportProgress?: boolean): Observable>; + public getPerunSystemTimeInMillis(observe?: 'events', reportProgress?: boolean): Observable>; + public getPerunSystemTimeInMillis(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/utils/getPerunSystemTimeInMillis`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } - return this.httpClient.get( - `${this.configuration.basePath}/json/utils/getPerunSystemTimeInMillis`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } } diff --git a/libs/perun/openapi/src/lib/api/vosManager.service.ts b/libs/perun/openapi/src/lib/api/vosManager.service.ts index 81a2e0c58..cfb51b810 100644 --- a/libs/perun/openapi/src/lib/api/vosManager.service.ts +++ b/libs/perun/openapi/src/lib/api/vosManager.service.ts @@ -11,17 +11,11 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { BanOnVo } from '../model/banOnVo'; import { Candidate } from '../model/candidate'; @@ -36,2769 +30,2054 @@ import { User } from '../model/user'; import { Vo } from '../model/vo'; import { VoAdminRoles } from '../model/voAdminRoles'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class VosManagerService { - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string, - @Optional() configuration: Configuration - ) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - /** - * Add group as a sponsor of guest members of VO. All members of group will become sponsors. - * @param vo id of Vo - * @param authorizedGroup Group id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addSponsorRoleToGroup( - vo: number, - authorizedGroup: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public addSponsorRoleToGroup( - vo: number, - authorizedGroup: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public addSponsorRoleToGroup( - vo: number, - authorizedGroup: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public addSponsorRoleToGroup( - vo: number, - authorizedGroup: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling addSponsorRoleToGroup.' - ); - } - if (authorizedGroup === null || authorizedGroup === undefined) { - throw new Error( - 'Required parameter authorizedGroup was null or undefined when calling addSponsorRoleToGroup.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (authorizedGroup !== undefined && authorizedGroup !== null) { - queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/vosManager/addSponsorRole/group`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Add user as a sponsor for guest members of VO. - * @param vo id of Vo - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addSponsorRoleToUser( - vo: number, - user: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public addSponsorRoleToUser( - vo: number, - user: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public addSponsorRoleToUser( - vo: number, - user: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public addSponsorRoleToUser( - vo: number, - user: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling addSponsorRoleToUser.' - ); - } - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling addSponsorRoleToUser.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/vosManager/addSponsorRole/user`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Adds a group as a Vo admin. - * @param vo id of Vo - * @param authorizedGroup Group id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addVoAdminGroup( - vo: number, - authorizedGroup: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public addVoAdminGroup( - vo: number, - authorizedGroup: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public addVoAdminGroup( - vo: number, - authorizedGroup: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public addVoAdminGroup( - vo: number, - authorizedGroup: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling addVoAdminGroup.'); - } - if (authorizedGroup === null || authorizedGroup === undefined) { - throw new Error( - 'Required parameter authorizedGroup was null or undefined when calling addVoAdminGroup.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (authorizedGroup !== undefined && authorizedGroup !== null) { - queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/vosManager/addAdmin/group`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Adds a user as a Vo admin. - * @param vo id of Vo - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addVoAdminUser( - vo: number, - user: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public addVoAdminUser( - vo: number, - user: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public addVoAdminUser( - vo: number, - user: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public addVoAdminUser( - vo: number, - user: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling addVoAdminUser.'); - } - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling addVoAdminUser.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/vosManager/addAdmin/user`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Creates new VO. Caller is automatically set as VO manager. - * @param name name - length can be no more than 128 characters - * @param shortName shortName - can contain only a-z, A-Z, 0-9, \'.\', \'-\', \'_\' and cannot be longer than 32 characters - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createVoWithName( - name: string, - shortName: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public createVoWithName( - name: string, - shortName: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public createVoWithName( - name: string, - shortName: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public createVoWithName( - name: string, - shortName: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (name === null || name === undefined) { - throw new Error( - 'Required parameter name was null or undefined when calling createVoWithName.' - ); - } - if (shortName === null || shortName === undefined) { - throw new Error( - 'Required parameter shortName was null or undefined when calling createVoWithName.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (name !== undefined && name !== null) { - queryParameters = queryParameters.set('name', name); - } - if (shortName !== undefined && shortName !== null) { - queryParameters = queryParameters.set('shortName', shortName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/vosManager/createVo/withName`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Creates new VO. Caller is automatically set as VO manager. Vo Object must contain: name - lenght can be no more than 128 characters shortName - can contain only a-z, A-Z, 0-9, \'.\', \'-\', \'_\' and cannot be longer than 32 characters. Other parameters are ignored. @exampleParam vo { \"name\" : \"My testing VO\" , \"shortName\" : \"test_vo\" } - * @param inputCreateVoWithVo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createVoWithVo( - inputCreateVoWithVo: InputCreateVoWithVo, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public createVoWithVo( - inputCreateVoWithVo: InputCreateVoWithVo, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public createVoWithVo( - inputCreateVoWithVo: InputCreateVoWithVo, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public createVoWithVo( - inputCreateVoWithVo: InputCreateVoWithVo, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputCreateVoWithVo === null || inputCreateVoWithVo === undefined) { - throw new Error( - 'Required parameter inputCreateVoWithVo was null or undefined when calling createVoWithVo.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/vosManager/createVo/withVo`, - inputCreateVoWithVo, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Deletes a VO. If force == true then VO is deleted including members, groups and resources. If force == false or null only empty VO is deleted or exception is thrown. - * @param vo id of Vo - * @param force If true, delete entity forcefully. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteVo( - vo: number, - force?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public deleteVo( - vo: number, - force?: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deleteVo( - vo: number, - force?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deleteVo( - vo: number, - force?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling deleteVo.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (force !== undefined && force !== null) { - queryParameters = queryParameters.set('force', force); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/vosManager/deleteVo`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Find candidates for VO. Candidates can be used to create new members. Candidates are searched in VOs external sources (if available). Candidates, which are already members of VO are never returned even if they match searchString. You can also specify maximum number of results. - * @param id numeric id - * @param searchString Text to search by - * @param maxNumOfResults Number of maximum results - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findCandidates( - id: number, - searchString: string, - maxNumOfResults?: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public findCandidates( - id: number, - searchString: string, - maxNumOfResults?: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public findCandidates( - id: number, - searchString: string, - maxNumOfResults?: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public findCandidates( - id: number, - searchString: string, - maxNumOfResults?: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling findCandidates.'); - } - if (searchString === null || searchString === undefined) { - throw new Error( - 'Required parameter searchString was null or undefined when calling findCandidates.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - if (searchString !== undefined && searchString !== null) { - queryParameters = queryParameters.set('searchString', searchString); - } - if (maxNumOfResults !== undefined && maxNumOfResults !== null) { - queryParameters = queryParameters.set('maxNumOfResults', maxNumOfResults); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/vosManager/findCandidates`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Find candidates for Group. Candidates can be used to create new VO and Group members. Candidates are searched in Groups external sources (if available). Candidates, which are already members of VO are never returned even if they match searchString. - * @param group id of Group - * @param searchString Text to search by - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findCandidatesForGroup( - group: number, - searchString: string, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public findCandidatesForGroup( - group: number, - searchString: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public findCandidatesForGroup( - group: number, - searchString: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public findCandidatesForGroup( - group: number, - searchString: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling findCandidatesForGroup.' - ); - } - if (searchString === null || searchString === undefined) { - throw new Error( - 'Required parameter searchString was null or undefined when calling findCandidatesForGroup.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (searchString !== undefined && searchString !== null) { - queryParameters = queryParameters.set('searchString', searchString); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/vosManager/findCandidates/forGroup`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Return list of all VOs in Perun. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllVos(observe?: 'body', reportProgress?: boolean): Observable>; - public getAllVos( - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getAllVos(observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllVos(observe: any = 'body', reportProgress: boolean = false): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/vosManager/getAllVos`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Find MemberCandidates for GROUP. MemberCandidates can be used to create new members. They are made of Candidate, RichUser and Member objects. Candidates are searched in VO\'s or GROUP\'s (depends on privileges) external sources (if available). RichUsers are searched in given VO and are associated with appropriate candidate and member. RichUsers for appropriate Candidate are also searched in the whole Perun. - * @param group id of Group - * @param attrNames list of attribute names List<String> - * @param searchString Text to search by - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getCompleteCandidatesForGroup( - group: number, - attrNames: Array, - searchString: string, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getCompleteCandidatesForGroup( - group: number, - attrNames: Array, - searchString: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getCompleteCandidatesForGroup( - group: number, - attrNames: Array, - searchString: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getCompleteCandidatesForGroup( - group: number, - attrNames: Array, - searchString: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (group === null || group === undefined) { - throw new Error( - 'Required parameter group was null or undefined when calling getCompleteCandidatesForGroup.' - ); - } - if (attrNames === null || attrNames === undefined) { - throw new Error( - 'Required parameter attrNames was null or undefined when calling getCompleteCandidatesForGroup.' - ); - } - if (searchString === null || searchString === undefined) { - throw new Error( - 'Required parameter searchString was null or undefined when calling getCompleteCandidatesForGroup.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - if (searchString !== undefined && searchString !== null) { - queryParameters = queryParameters.set('searchString', searchString); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/vosManager/getCompleteCandidates/forGroup`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Find MemberCandidates for VO. MemberCandidates can be used to create new members. They are made of Candidate, RichUser and Member objects. Candidates are searched in VO\'s external sources (if available). RichUsers are searched in given VO and are associated with appropriate candidate and member. RichUsers for MemberCandidates may also be searched in the whole Perun. - * @param vo id of Vo - * @param attrNames list of attribute names List<String> - * @param searchString Text to search by - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getCompleteCandidatesForVo( - vo: number, - attrNames: Array, - searchString: string, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getCompleteCandidatesForVo( - vo: number, - attrNames: Array, - searchString: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getCompleteCandidatesForVo( - vo: number, - attrNames: Array, - searchString: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getCompleteCandidatesForVo( - vo: number, - attrNames: Array, - searchString: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling getCompleteCandidatesForVo.' - ); - } - if (attrNames === null || attrNames === undefined) { - throw new Error( - 'Required parameter attrNames was null or undefined when calling getCompleteCandidatesForVo.' - ); - } - if (searchString === null || searchString === undefined) { - throw new Error( - 'Required parameter searchString was null or undefined when calling getCompleteCandidatesForVo.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }); - } - if (searchString !== undefined && searchString !== null) { - queryParameters = queryParameters.set('searchString', searchString); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/vosManager/getCompleteCandidates/forVo`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Return list of all VOs the caller is associated with. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMyVos(observe?: 'body', reportProgress?: boolean): Observable>; - public getMyVos( - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getMyVos(observe?: 'events', reportProgress?: boolean): Observable>>; - public getMyVos(observe: any = 'body', reportProgress: boolean = false): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>(`${this.configuration.basePath}/json/vosManager/getVos`, { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - }); - } - - /** - * Get list of all richUser administrators for the vo and supported role with specific attributes. Supported roles: VOOBSERVER, TOPGROUPCREATOR, VOADMIN If \"onlyDirectAdmins\" is == true, return only direct admins of the vo for supported role with specific attributes. If \"allUserAttributes\" is == true, do not specify attributes through list and return them all in objects richUser. Ignoring list of specific attributes. - * @param vo id of Vo - * @param role role name - * @param specificAttributes list of specified attributes which are needed in object richUser - * @param allUserAttributes if == true, get all possible user attributes and ignore list of specificAttributes (if false, get only specific attributes) - * @param onlyDirectAdmins if == true, get only direct vo administrators (if false, get both direct and indirect) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRichAdminsForVo( - vo: number, - role: VoAdminRoles, - specificAttributes: Array, - allUserAttributes: boolean, - onlyDirectAdmins: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getRichAdminsForVo( - vo: number, - role: VoAdminRoles, - specificAttributes: Array, - allUserAttributes: boolean, - onlyDirectAdmins: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getRichAdminsForVo( - vo: number, - role: VoAdminRoles, - specificAttributes: Array, - allUserAttributes: boolean, - onlyDirectAdmins: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getRichAdminsForVo( - vo: number, - role: VoAdminRoles, - specificAttributes: Array, - allUserAttributes: boolean, - onlyDirectAdmins: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling getRichAdminsForVo.' - ); - } - if (role === null || role === undefined) { - throw new Error( - 'Required parameter role was null or undefined when calling getRichAdminsForVo.' - ); - } - if (specificAttributes === null || specificAttributes === undefined) { - throw new Error( - 'Required parameter specificAttributes was null or undefined when calling getRichAdminsForVo.' - ); - } - if (allUserAttributes === null || allUserAttributes === undefined) { - throw new Error( - 'Required parameter allUserAttributes was null or undefined when calling getRichAdminsForVo.' - ); - } - if (onlyDirectAdmins === null || onlyDirectAdmins === undefined) { - throw new Error( - 'Required parameter onlyDirectAdmins was null or undefined when calling getRichAdminsForVo.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (role !== undefined && role !== null) { - queryParameters = queryParameters.set('role', role); - } - if (specificAttributes) { - specificAttributes.forEach((element) => { - queryParameters = queryParameters.append('specificAttributes', element); - }); - } - if (allUserAttributes !== undefined && allUserAttributes !== null) { - queryParameters = queryParameters.set('allUserAttributes', allUserAttributes); - } - if (onlyDirectAdmins !== undefined && onlyDirectAdmins !== null) { - queryParameters = queryParameters.set('onlyDirectAdmins', onlyDirectAdmins); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/vosManager/getRichAdmins`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get list of administrator groups of the given VO. Supported roles: VOOBSERVER, TOPGROUPCREATOR, VOADMIN - * @param vo id of Vo - * @param role supported role name - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVoAdminGroups( - vo: number, - role: VoAdminRoles, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getVoAdminGroups( - vo: number, - role: VoAdminRoles, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getVoAdminGroups( - vo: number, - role: VoAdminRoles, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getVoAdminGroups( - vo: number, - role: VoAdminRoles, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getVoAdminGroups.'); - } - if (role === null || role === undefined) { - throw new Error( - 'Required parameter role was null or undefined when calling getVoAdminGroups.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (role !== undefined && role !== null) { - queryParameters = queryParameters.set('role', role); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/vosManager/getAdminGroups`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get list of all vo administrators for supported role and specific vo. If onlyDirectAdmins is true, return only direct admins of the vo for supported role. Supported roles: VOOBSERVER, TOPGROUPCREATOR, VOADMIN - * @param vo id of Vo - * @param role supported role name - * @param onlyDirectAdmins get only direct administrators (if false, get both direct and indirect) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVoAdminUsers( - vo: number, - role: VoAdminRoles, - onlyDirectAdmins: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getVoAdminUsers( - vo: number, - role: VoAdminRoles, - onlyDirectAdmins: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getVoAdminUsers( - vo: number, - role: VoAdminRoles, - onlyDirectAdmins: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getVoAdminUsers( - vo: number, - role: VoAdminRoles, - onlyDirectAdmins: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getVoAdminUsers.'); - } - if (role === null || role === undefined) { - throw new Error( - 'Required parameter role was null or undefined when calling getVoAdminUsers.' - ); - } - if (onlyDirectAdmins === null || onlyDirectAdmins === undefined) { - throw new Error( - 'Required parameter onlyDirectAdmins was null or undefined when calling getVoAdminUsers.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (role !== undefined && role !== null) { - queryParameters = queryParameters.set('role', role); - } - if (onlyDirectAdmins !== undefined && onlyDirectAdmins !== null) { - queryParameters = queryParameters.set('onlyDirectAdmins', onlyDirectAdmins); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/vosManager/getAdmins`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get vo ban with given id. - * @param banId id of a ban - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVoBanById( - banId: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getVoBanById( - banId: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getVoBanById( - banId: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getVoBanById( - banId: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (banId === null || banId === undefined) { - throw new Error('Required parameter banId was null or undefined when calling getVoBanById.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (banId !== undefined && banId !== null) { - queryParameters = queryParameters.set('banId', banId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/vosManager/getBanById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get ban for given member, or null if he is not banned. - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVoBanForMember( - member: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getVoBanForMember( - member: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getVoBanForMember( - member: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getVoBanForMember( - member: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling getVoBanForMember.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/vosManager/getBanForMember`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Get list of all bans for vo with given id. - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVoBansForVo( - vo: number, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getVoBansForVo( - vo: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getVoBansForVo( - vo: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getVoBansForVo( - vo: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getVoBansForVo.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/vosManager/getBansForVo`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns a virtual organization by id. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVoById(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public getVoById( - id: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getVoById( - id: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getVoById( - id: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getVoById.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get(`${this.configuration.basePath}/json/vosManager/getVoById`, { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - }); - } - - /** - * Returns a VO by its short name. - * @param shortName short name of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVoByShortName( - shortName?: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getVoByShortName( - shortName?: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getVoByShortName( - shortName?: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getVoByShortName( - shortName?: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (shortName !== undefined && shortName !== null) { - queryParameters = queryParameters.set('shortName', shortName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/vosManager/getVoByShortName`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Returns number of vo members by their status. - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVoMembersCountsByStatus( - vo: number, - observe?: 'body', - reportProgress?: boolean - ): Observable<{ [key: string]: number }>; - public getVoMembersCountsByStatus( - vo: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getVoMembersCountsByStatus( - vo: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getVoMembersCountsByStatus( - vo: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling getVoMembersCountsByStatus.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get<{ [key: string]: number }>( - `${this.configuration.basePath}/json/vosManager/getVoMembersCountsByStatus`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Return list of VOs by their ids. - * @param ids list of ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVosByIds( - ids: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getVosByIds( - ids: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getVosByIds( - ids: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getVosByIds( - ids: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (ids === null || ids === undefined) { - throw new Error('Required parameter ids was null or undefined when calling getVosByIds.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (ids) { - ids.forEach((element) => { - queryParameters = queryParameters.append('ids[]', element); - }); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get>( - `${this.configuration.basePath}/json/vosManager/getVosByIds`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Gets count of all vos. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVosCount(observe?: 'body', reportProgress?: boolean): Observable; - public getVosCount( - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getVosCount(observe?: 'events', reportProgress?: boolean): Observable>; - public getVosCount(observe: any = 'body', reportProgress: boolean = false): Observable { - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.get( - `${this.configuration.basePath}/json/vosManager/getVosCount`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Removes group as a sponsor. All group members will cease to be sponsors, and their sponsored members will be set as expired if the group member was their last sponsor. - * @param vo id of Vo - * @param authorizedGroup Group id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeSponsorRoleFromGroup( - vo: number, - authorizedGroup: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeSponsorRoleFromGroup( - vo: number, - authorizedGroup: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeSponsorRoleFromGroup( - vo: number, - authorizedGroup: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeSponsorRoleFromGroup( - vo: number, - authorizedGroup: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling removeSponsorRoleFromGroup.' - ); - } - if (authorizedGroup === null || authorizedGroup === undefined) { - throw new Error( - 'Required parameter authorizedGroup was null or undefined when calling removeSponsorRoleFromGroup.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (authorizedGroup !== undefined && authorizedGroup !== null) { - queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/vosManager/removeSponsorRole/group`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Removes user as a sponsor. His or her sponsored members will be set as expired if the user was their last sponsor. - * @param vo id of Vo - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeSponsorRoleFromUser( - vo: number, - user: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeSponsorRoleFromUser( - vo: number, - user: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeSponsorRoleFromUser( - vo: number, - user: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeSponsorRoleFromUser( - vo: number, - user: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling removeSponsorRoleFromUser.' - ); - } - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling removeSponsorRoleFromUser.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/vosManager/removeSponsorRole/user`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Removes a group as a Vo admin. - * @param vo id of Vo - * @param authorizedGroup Group id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeVoAdminGroup( - vo: number, - authorizedGroup: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeVoAdminGroup( - vo: number, - authorizedGroup: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeVoAdminGroup( - vo: number, - authorizedGroup: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeVoAdminGroup( - vo: number, - authorizedGroup: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling removeVoAdminGroup.' - ); - } - if (authorizedGroup === null || authorizedGroup === undefined) { - throw new Error( - 'Required parameter authorizedGroup was null or undefined when calling removeVoAdminGroup.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (authorizedGroup !== undefined && authorizedGroup !== null) { - queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/vosManager/removeAdmin/group`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Removes a user as a Vo admin. - * @param vo id of Vo - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeVoAdminUser( - vo: number, - user: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeVoAdminUser( - vo: number, - user: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeVoAdminUser( - vo: number, - user: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeVoAdminUser( - vo: number, - user: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (vo === null || vo === undefined) { - throw new Error( - 'Required parameter vo was null or undefined when calling removeVoAdminUser.' - ); - } - if (user === null || user === undefined) { - throw new Error( - 'Required parameter user was null or undefined when calling removeVoAdminUser.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/vosManager/removeAdmin/user`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove vo ban with given id. - * @param banId id of a ban - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeVoBan(banId: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeVoBan( - banId: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeVoBan( - banId: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeVoBan( - banId: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (banId === null || banId === undefined) { - throw new Error('Required parameter banId was null or undefined when calling removeVoBan.'); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (banId !== undefined && banId !== null) { - queryParameters = queryParameters.set('banId', banId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/vosManager/removeBan`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Remove vo ban for member with given id. - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeVoBanForMember( - member: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public removeVoBanForMember( - member: number, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public removeVoBanForMember( - member: number, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public removeVoBanForMember( - member: number, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (member === null || member === undefined) { - throw new Error( - 'Required parameter member was null or undefined when calling removeVoBanForMember.' - ); - } - - let queryParameters = new HttpParams({ encoder: this.encoder }); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/urlinjsonout/vosManager/removeBanForMember`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Set ban for member on his vo. The member id is required, validityTo and description are optional. voId is ignored. - * @param inputSetVoBan - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setVoBan( - inputSetVoBan: InputSetVoBan, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public setVoBan( - inputSetVoBan: InputSetVoBan, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public setVoBan( - inputSetVoBan: InputSetVoBan, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public setVoBan( - inputSetVoBan: InputSetVoBan, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputSetVoBan === null || inputSetVoBan === undefined) { - throw new Error( - 'Required parameter inputSetVoBan was null or undefined when calling setVoBan.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post( - `${this.configuration.basePath}/json/vosManager/setBan`, - inputSetVoBan, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } - - /** - * Updates a VO. Only name parameter is updated. VO to updated is determined by id parameter of passed VO object. - * @param inputUpdateVo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateVo( - inputUpdateVo: InputUpdateVo, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public updateVo( - inputUpdateVo: InputUpdateVo, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public updateVo( - inputUpdateVo: InputUpdateVo, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public updateVo( - inputUpdateVo: InputUpdateVo, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (inputUpdateVo === null || inputUpdateVo === undefined) { - throw new Error( - 'Required parameter inputUpdateVo was null or undefined when calling updateVo.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { - headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set( - 'Authorization', - 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) - ); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + + + /** + * Add group as a sponsor of guest members of VO. All members of group will become sponsors. + * @param vo id of Vo + * @param authorizedGroup Group id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addSponsorRoleToGroup(vo: number, authorizedGroup: number, observe?: 'body', reportProgress?: boolean): Observable; + public addSponsorRoleToGroup(vo: number, authorizedGroup: number, observe?: 'response', reportProgress?: boolean): Observable>; + public addSponsorRoleToGroup(vo: number, authorizedGroup: number, observe?: 'events', reportProgress?: boolean): Observable>; + public addSponsorRoleToGroup(vo: number, authorizedGroup: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling addSponsorRoleToGroup.'); + } + if (authorizedGroup === null || authorizedGroup === undefined) { + throw new Error('Required parameter authorizedGroup was null or undefined when calling addSponsorRoleToGroup.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (authorizedGroup !== undefined && authorizedGroup !== null) { + queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/vosManager/addSponsorRole/group`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Add user as a sponsor for guest members of VO. + * @param vo id of Vo + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addSponsorRoleToUser(vo: number, user: number, observe?: 'body', reportProgress?: boolean): Observable; + public addSponsorRoleToUser(vo: number, user: number, observe?: 'response', reportProgress?: boolean): Observable>; + public addSponsorRoleToUser(vo: number, user: number, observe?: 'events', reportProgress?: boolean): Observable>; + public addSponsorRoleToUser(vo: number, user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling addSponsorRoleToUser.'); + } + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling addSponsorRoleToUser.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/vosManager/addSponsorRole/user`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Adds a group as a Vo admin. + * @param vo id of Vo + * @param authorizedGroup Group id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addVoAdminGroup(vo: number, authorizedGroup: number, observe?: 'body', reportProgress?: boolean): Observable; + public addVoAdminGroup(vo: number, authorizedGroup: number, observe?: 'response', reportProgress?: boolean): Observable>; + public addVoAdminGroup(vo: number, authorizedGroup: number, observe?: 'events', reportProgress?: boolean): Observable>; + public addVoAdminGroup(vo: number, authorizedGroup: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling addVoAdminGroup.'); + } + if (authorizedGroup === null || authorizedGroup === undefined) { + throw new Error('Required parameter authorizedGroup was null or undefined when calling addVoAdminGroup.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (authorizedGroup !== undefined && authorizedGroup !== null) { + queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/vosManager/addAdmin/group`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Adds a user as a Vo admin. + * @param vo id of Vo + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addVoAdminUser(vo: number, user: number, observe?: 'body', reportProgress?: boolean): Observable; + public addVoAdminUser(vo: number, user: number, observe?: 'response', reportProgress?: boolean): Observable>; + public addVoAdminUser(vo: number, user: number, observe?: 'events', reportProgress?: boolean): Observable>; + public addVoAdminUser(vo: number, user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling addVoAdminUser.'); + } + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling addVoAdminUser.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/vosManager/addAdmin/user`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Creates new VO. Caller is automatically set as VO manager. + * @param name name - length can be no more than 128 characters + * @param shortName shortName - can contain only a-z, A-Z, 0-9, \'.\', \'-\', \'_\' and cannot be longer than 32 characters + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createVoWithName(name: string, shortName: string, observe?: 'body', reportProgress?: boolean): Observable; + public createVoWithName(name: string, shortName: string, observe?: 'response', reportProgress?: boolean): Observable>; + public createVoWithName(name: string, shortName: string, observe?: 'events', reportProgress?: boolean): Observable>; + public createVoWithName(name: string, shortName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling createVoWithName.'); + } + if (shortName === null || shortName === undefined) { + throw new Error('Required parameter shortName was null or undefined when calling createVoWithName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (name !== undefined && name !== null) { + queryParameters = queryParameters.set('name', name); + } + if (shortName !== undefined && shortName !== null) { + queryParameters = queryParameters.set('shortName', shortName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/vosManager/createVo/withName`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Creates new VO. Caller is automatically set as VO manager. Vo Object must contain: name - lenght can be no more than 128 characters shortName - can contain only a-z, A-Z, 0-9, \'.\', \'-\', \'_\' and cannot be longer than 32 characters. Other parameters are ignored. @exampleParam vo { \"name\" : \"My testing VO\" , \"shortName\" : \"test_vo\" } + * @param inputCreateVoWithVo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createVoWithVo(inputCreateVoWithVo: InputCreateVoWithVo, observe?: 'body', reportProgress?: boolean): Observable; + public createVoWithVo(inputCreateVoWithVo: InputCreateVoWithVo, observe?: 'response', reportProgress?: boolean): Observable>; + public createVoWithVo(inputCreateVoWithVo: InputCreateVoWithVo, observe?: 'events', reportProgress?: boolean): Observable>; + public createVoWithVo(inputCreateVoWithVo: InputCreateVoWithVo, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputCreateVoWithVo === null || inputCreateVoWithVo === undefined) { + throw new Error('Required parameter inputCreateVoWithVo was null or undefined when calling createVoWithVo.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/vosManager/createVo/withVo`, + inputCreateVoWithVo, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Deletes a VO. If force == true then VO is deleted including members, groups and resources. If force == false or null only empty VO is deleted or exception is thrown. + * @param vo id of Vo + * @param force If true, delete entity forcefully. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteVo(vo: number, force?: boolean, observe?: 'body', reportProgress?: boolean): Observable; + public deleteVo(vo: number, force?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; + public deleteVo(vo: number, force?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; + public deleteVo(vo: number, force?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling deleteVo.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (force !== undefined && force !== null) { + queryParameters = queryParameters.set('force', force); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/vosManager/deleteVo`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Find candidates for VO. Candidates can be used to create new members. Candidates are searched in VOs external sources (if available). Candidates, which are already members of VO are never returned even if they match searchString. You can also specify maximum number of results. + * @param id numeric id + * @param searchString Text to search by + * @param maxNumOfResults Number of maximum results + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findCandidates(id: number, searchString: string, maxNumOfResults?: number, observe?: 'body', reportProgress?: boolean): Observable>; + public findCandidates(id: number, searchString: string, maxNumOfResults?: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public findCandidates(id: number, searchString: string, maxNumOfResults?: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public findCandidates(id: number, searchString: string, maxNumOfResults?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling findCandidates.'); + } + if (searchString === null || searchString === undefined) { + throw new Error('Required parameter searchString was null or undefined when calling findCandidates.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + if (searchString !== undefined && searchString !== null) { + queryParameters = queryParameters.set('searchString', searchString); + } + if (maxNumOfResults !== undefined && maxNumOfResults !== null) { + queryParameters = queryParameters.set('maxNumOfResults', maxNumOfResults); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/vosManager/findCandidates`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Find candidates for Group. Candidates can be used to create new VO and Group members. Candidates are searched in Groups external sources (if available). Candidates, which are already members of VO are never returned even if they match searchString. + * @param group id of Group + * @param searchString Text to search by + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findCandidatesForGroup(group: number, searchString: string, observe?: 'body', reportProgress?: boolean): Observable>; + public findCandidatesForGroup(group: number, searchString: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public findCandidatesForGroup(group: number, searchString: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public findCandidatesForGroup(group: number, searchString: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling findCandidatesForGroup.'); + } + if (searchString === null || searchString === undefined) { + throw new Error('Required parameter searchString was null or undefined when calling findCandidatesForGroup.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (searchString !== undefined && searchString !== null) { + queryParameters = queryParameters.set('searchString', searchString); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/vosManager/findCandidates/forGroup`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Return list of all VOs in Perun. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllVos(observe?: 'body', reportProgress?: boolean): Observable>; + public getAllVos(observe?: 'response', reportProgress?: boolean): Observable>>; + public getAllVos(observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllVos(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/vosManager/getAllVos`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Find MemberCandidates for GROUP. MemberCandidates can be used to create new members. They are made of Candidate, RichUser and Member objects. Candidates are searched in VO\'s or GROUP\'s (depends on privileges) external sources (if available). RichUsers are searched in given VO and are associated with appropriate candidate and member. RichUsers for appropriate Candidate are also searched in the whole Perun. + * @param group id of Group + * @param attrNames list of attribute names List<String> + * @param searchString Text to search by + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getCompleteCandidatesForGroup(group: number, attrNames: Array, searchString: string, observe?: 'body', reportProgress?: boolean): Observable>; + public getCompleteCandidatesForGroup(group: number, attrNames: Array, searchString: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public getCompleteCandidatesForGroup(group: number, attrNames: Array, searchString: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public getCompleteCandidatesForGroup(group: number, attrNames: Array, searchString: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling getCompleteCandidatesForGroup.'); + } + if (attrNames === null || attrNames === undefined) { + throw new Error('Required parameter attrNames was null or undefined when calling getCompleteCandidatesForGroup.'); + } + if (searchString === null || searchString === undefined) { + throw new Error('Required parameter searchString was null or undefined when calling getCompleteCandidatesForGroup.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + if (searchString !== undefined && searchString !== null) { + queryParameters = queryParameters.set('searchString', searchString); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/vosManager/getCompleteCandidates/forGroup`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Find MemberCandidates for VO. MemberCandidates can be used to create new members. They are made of Candidate, RichUser and Member objects. Candidates are searched in VO\'s external sources (if available). RichUsers are searched in given VO and are associated with appropriate candidate and member. RichUsers for MemberCandidates may also be searched in the whole Perun. + * @param vo id of Vo + * @param attrNames list of attribute names List<String> + * @param searchString Text to search by + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getCompleteCandidatesForVo(vo: number, attrNames: Array, searchString: string, observe?: 'body', reportProgress?: boolean): Observable>; + public getCompleteCandidatesForVo(vo: number, attrNames: Array, searchString: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public getCompleteCandidatesForVo(vo: number, attrNames: Array, searchString: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public getCompleteCandidatesForVo(vo: number, attrNames: Array, searchString: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getCompleteCandidatesForVo.'); + } + if (attrNames === null || attrNames === undefined) { + throw new Error('Required parameter attrNames was null or undefined when calling getCompleteCandidatesForVo.'); + } + if (searchString === null || searchString === undefined) { + throw new Error('Required parameter searchString was null or undefined when calling getCompleteCandidatesForVo.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }) + } + if (searchString !== undefined && searchString !== null) { + queryParameters = queryParameters.set('searchString', searchString); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/vosManager/getCompleteCandidates/forVo`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Return list of all VOs the caller is associated with. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMyVos(observe?: 'body', reportProgress?: boolean): Observable>; + public getMyVos(observe?: 'response', reportProgress?: boolean): Observable>>; + public getMyVos(observe?: 'events', reportProgress?: boolean): Observable>>; + public getMyVos(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/vosManager/getVos`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get list of all richUser administrators for the vo and supported role with specific attributes. If some group is administrator of the given group, all VALID members are included in the list. Supported roles: VOOBSERVER, TOPGROUPCREATOR, VOADMIN If \"onlyDirectAdmins\" is == true, return only direct admins of the vo for supported role with specific attributes. If \"allUserAttributes\" is == true, do not specify attributes through list and return them all in objects richUser. Ignoring list of specific attributes. + * @param vo id of Vo + * @param role role name + * @param specificAttributes list of specified attributes which are needed in object richUser + * @param allUserAttributes if == true, get all possible user attributes and ignore list of specificAttributes (if false, get only specific attributes) + * @param onlyDirectAdmins if == true, get only direct vo administrators (if false, get both direct and indirect) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRichAdminsForVo(vo: number, role: VoAdminRoles, specificAttributes: Array, allUserAttributes: boolean, onlyDirectAdmins: boolean, observe?: 'body', reportProgress?: boolean): Observable>; + public getRichAdminsForVo(vo: number, role: VoAdminRoles, specificAttributes: Array, allUserAttributes: boolean, onlyDirectAdmins: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; + public getRichAdminsForVo(vo: number, role: VoAdminRoles, specificAttributes: Array, allUserAttributes: boolean, onlyDirectAdmins: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; + public getRichAdminsForVo(vo: number, role: VoAdminRoles, specificAttributes: Array, allUserAttributes: boolean, onlyDirectAdmins: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getRichAdminsForVo.'); + } + if (role === null || role === undefined) { + throw new Error('Required parameter role was null or undefined when calling getRichAdminsForVo.'); + } + if (specificAttributes === null || specificAttributes === undefined) { + throw new Error('Required parameter specificAttributes was null or undefined when calling getRichAdminsForVo.'); + } + if (allUserAttributes === null || allUserAttributes === undefined) { + throw new Error('Required parameter allUserAttributes was null or undefined when calling getRichAdminsForVo.'); + } + if (onlyDirectAdmins === null || onlyDirectAdmins === undefined) { + throw new Error('Required parameter onlyDirectAdmins was null or undefined when calling getRichAdminsForVo.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (role !== undefined && role !== null) { + queryParameters = queryParameters.set('role', role); + } + if (specificAttributes) { + specificAttributes.forEach((element) => { + queryParameters = queryParameters.append('specificAttributes', element); + }) + } + if (allUserAttributes !== undefined && allUserAttributes !== null) { + queryParameters = queryParameters.set('allUserAttributes', allUserAttributes); + } + if (onlyDirectAdmins !== undefined && onlyDirectAdmins !== null) { + queryParameters = queryParameters.set('onlyDirectAdmins', onlyDirectAdmins); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/vosManager/getRichAdmins`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get list of administrator groups of the given VO. Supported roles: VOOBSERVER, TOPGROUPCREATOR, VOADMIN + * @param vo id of Vo + * @param role supported role name + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVoAdminGroups(vo: number, role: VoAdminRoles, observe?: 'body', reportProgress?: boolean): Observable>; + public getVoAdminGroups(vo: number, role: VoAdminRoles, observe?: 'response', reportProgress?: boolean): Observable>>; + public getVoAdminGroups(vo: number, role: VoAdminRoles, observe?: 'events', reportProgress?: boolean): Observable>>; + public getVoAdminGroups(vo: number, role: VoAdminRoles, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getVoAdminGroups.'); + } + if (role === null || role === undefined) { + throw new Error('Required parameter role was null or undefined when calling getVoAdminGroups.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (role !== undefined && role !== null) { + queryParameters = queryParameters.set('role', role); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/vosManager/getAdminGroups`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get list of all vo administrators for supported role and specific vo. If onlyDirectAdmins is true, return only direct admins of the vo for supported role. Otherwise return direct admins and users who are VALID members of administrator groups Supported roles: VOOBSERVER, TOPGROUPCREATOR, VOADMIN + * @param vo id of Vo + * @param role supported role name + * @param onlyDirectAdmins get only direct administrators (if false, get both direct and indirect) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVoAdminUsers(vo: number, role: VoAdminRoles, onlyDirectAdmins: boolean, observe?: 'body', reportProgress?: boolean): Observable>; + public getVoAdminUsers(vo: number, role: VoAdminRoles, onlyDirectAdmins: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; + public getVoAdminUsers(vo: number, role: VoAdminRoles, onlyDirectAdmins: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; + public getVoAdminUsers(vo: number, role: VoAdminRoles, onlyDirectAdmins: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getVoAdminUsers.'); + } + if (role === null || role === undefined) { + throw new Error('Required parameter role was null or undefined when calling getVoAdminUsers.'); + } + if (onlyDirectAdmins === null || onlyDirectAdmins === undefined) { + throw new Error('Required parameter onlyDirectAdmins was null or undefined when calling getVoAdminUsers.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (role !== undefined && role !== null) { + queryParameters = queryParameters.set('role', role); + } + if (onlyDirectAdmins !== undefined && onlyDirectAdmins !== null) { + queryParameters = queryParameters.set('onlyDirectAdmins', onlyDirectAdmins); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/vosManager/getAdmins`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get vo ban with given id. + * @param banId id of a ban + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVoBanById(banId: number, observe?: 'body', reportProgress?: boolean): Observable; + public getVoBanById(banId: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getVoBanById(banId: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getVoBanById(banId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (banId === null || banId === undefined) { + throw new Error('Required parameter banId was null or undefined when calling getVoBanById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (banId !== undefined && banId !== null) { + queryParameters = queryParameters.set('banId', banId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/vosManager/getBanById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get ban for given member, or null if he is not banned. + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVoBanForMember(member: number, observe?: 'body', reportProgress?: boolean): Observable; + public getVoBanForMember(member: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getVoBanForMember(member: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getVoBanForMember(member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling getVoBanForMember.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/vosManager/getBanForMember`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get list of all bans for vo with given id. + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVoBansForVo(vo: number, observe?: 'body', reportProgress?: boolean): Observable>; + public getVoBansForVo(vo: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public getVoBansForVo(vo: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public getVoBansForVo(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getVoBansForVo.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/vosManager/getBansForVo`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns a virtual organization by id. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVoById(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public getVoById(id: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getVoById(id: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getVoById(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getVoById.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/vosManager/getVoById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns a VO by its short name. + * @param shortName short name of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVoByShortName(shortName: string, observe?: 'body', reportProgress?: boolean): Observable; + public getVoByShortName(shortName: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getVoByShortName(shortName: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getVoByShortName(shortName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (shortName === null || shortName === undefined) { + throw new Error('Required parameter shortName was null or undefined when calling getVoByShortName.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (shortName !== undefined && shortName !== null) { + queryParameters = queryParameters.set('shortName', shortName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/vosManager/getVoByShortName`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns number of vo members by their status. + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVoMembersCountsByStatus(vo: number, observe?: 'body', reportProgress?: boolean): Observable<{ [key: string]: number; }>; + public getVoMembersCountsByStatus(vo: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getVoMembersCountsByStatus(vo: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getVoMembersCountsByStatus(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getVoMembersCountsByStatus.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}/json/vosManager/getVoMembersCountsByStatus`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Return list of VOs by their ids. + * @param ids list of ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVosByIds(ids: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getVosByIds(ids: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getVosByIds(ids: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getVosByIds(ids: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (ids === null || ids === undefined) { + throw new Error('Required parameter ids was null or undefined when calling getVosByIds.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (ids) { + ids.forEach((element) => { + queryParameters = queryParameters.append('ids[]', element); + }) + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get>(`${this.configuration.basePath}/json/vosManager/getVosByIds`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Gets count of all vos. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVosCount(observe?: 'body', reportProgress?: boolean): Observable; + public getVosCount(observe?: 'response', reportProgress?: boolean): Observable>; + public getVosCount(observe?: 'events', reportProgress?: boolean): Observable>; + public getVosCount(observe: any = 'body', reportProgress: boolean = false ): Observable { + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.get(`${this.configuration.basePath}/json/vosManager/getVosCount`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Removes group as a sponsor. All group members will cease to be sponsors, and their sponsored members will be set as expired if the group member was their last sponsor. + * @param vo id of Vo + * @param authorizedGroup Group id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeSponsorRoleFromGroup(vo: number, authorizedGroup: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeSponsorRoleFromGroup(vo: number, authorizedGroup: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeSponsorRoleFromGroup(vo: number, authorizedGroup: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeSponsorRoleFromGroup(vo: number, authorizedGroup: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling removeSponsorRoleFromGroup.'); + } + if (authorizedGroup === null || authorizedGroup === undefined) { + throw new Error('Required parameter authorizedGroup was null or undefined when calling removeSponsorRoleFromGroup.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (authorizedGroup !== undefined && authorizedGroup !== null) { + queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/vosManager/removeSponsorRole/group`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Removes user as a sponsor. His or her sponsored members will be set as expired if the user was their last sponsor. + * @param vo id of Vo + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeSponsorRoleFromUser(vo: number, user: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeSponsorRoleFromUser(vo: number, user: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeSponsorRoleFromUser(vo: number, user: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeSponsorRoleFromUser(vo: number, user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling removeSponsorRoleFromUser.'); + } + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling removeSponsorRoleFromUser.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/vosManager/removeSponsorRole/user`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Removes a group as a Vo admin. + * @param vo id of Vo + * @param authorizedGroup Group id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeVoAdminGroup(vo: number, authorizedGroup: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeVoAdminGroup(vo: number, authorizedGroup: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeVoAdminGroup(vo: number, authorizedGroup: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeVoAdminGroup(vo: number, authorizedGroup: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling removeVoAdminGroup.'); + } + if (authorizedGroup === null || authorizedGroup === undefined) { + throw new Error('Required parameter authorizedGroup was null or undefined when calling removeVoAdminGroup.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (authorizedGroup !== undefined && authorizedGroup !== null) { + queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/vosManager/removeAdmin/group`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Removes a user as a Vo admin. + * @param vo id of Vo + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeVoAdminUser(vo: number, user: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeVoAdminUser(vo: number, user: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeVoAdminUser(vo: number, user: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeVoAdminUser(vo: number, user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling removeVoAdminUser.'); + } + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling removeVoAdminUser.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/vosManager/removeAdmin/user`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove vo ban with given id. + * @param banId id of a ban + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeVoBan(banId: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeVoBan(banId: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeVoBan(banId: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeVoBan(banId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (banId === null || banId === undefined) { + throw new Error('Required parameter banId was null or undefined when calling removeVoBan.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (banId !== undefined && banId !== null) { + queryParameters = queryParameters.set('banId', banId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/vosManager/removeBan`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Remove vo ban for member with given id. + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeVoBanForMember(member: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeVoBanForMember(member: number, observe?: 'response', reportProgress?: boolean): Observable>; + public removeVoBanForMember(member: number, observe?: 'events', reportProgress?: boolean): Observable>; + public removeVoBanForMember(member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling removeVoBanForMember.'); + } + + let queryParameters = new HttpParams({encoder: this.encoder}); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/vosManager/removeBanForMember`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Set ban for member on his vo. The member id is required, validityTo and description are optional. voId is ignored. + * @param inputSetVoBan + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setVoBan(inputSetVoBan: InputSetVoBan, observe?: 'body', reportProgress?: boolean): Observable; + public setVoBan(inputSetVoBan: InputSetVoBan, observe?: 'response', reportProgress?: boolean): Observable>; + public setVoBan(inputSetVoBan: InputSetVoBan, observe?: 'events', reportProgress?: boolean): Observable>; + public setVoBan(inputSetVoBan: InputSetVoBan, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputSetVoBan === null || inputSetVoBan === undefined) { + throw new Error('Required parameter inputSetVoBan was null or undefined when calling setVoBan.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/vosManager/setBan`, + inputSetVoBan, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Updates a VO. Only name parameter is updated. VO to updated is determined by id parameter of passed VO object. + * @param inputUpdateVo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateVo(inputUpdateVo: InputUpdateVo, observe?: 'body', reportProgress?: boolean): Observable; + public updateVo(inputUpdateVo: InputUpdateVo, observe?: 'response', reportProgress?: boolean): Observable>; + public updateVo(inputUpdateVo: InputUpdateVo, observe?: 'events', reportProgress?: boolean): Observable>; + public updateVo(inputUpdateVo: InputUpdateVo, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (inputUpdateVo === null || inputUpdateVo === undefined) { + throw new Error('Required parameter inputUpdateVo was null or undefined when calling updateVo.'); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { + headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post(`${this.configuration.basePath}/json/vosManager/updateVo`, + inputUpdateVo, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } - return this.httpClient.post( - `${this.configuration.basePath}/json/vosManager/updateVo`, - inputUpdateVo, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress, - } - ); - } } diff --git a/libs/perun/openapi/src/lib/configuration.ts b/libs/perun/openapi/src/lib/configuration.ts index 5524d7849..c038bbc94 100644 --- a/libs/perun/openapi/src/lib/configuration.ts +++ b/libs/perun/openapi/src/lib/configuration.ts @@ -1,89 +1,84 @@ import { HttpParameterCodec } from '@angular/common/http'; export interface ConfigurationParameters { - apiKeys?: { [key: string]: string }; - username?: string; - password?: string; - accessToken?: string | (() => string); - basePath?: string; - withCredentials?: boolean; - encoder?: HttpParameterCodec; + apiKeys?: {[ key: string ]: string}; + username?: string; + password?: string; + accessToken?: string | (() => string); + basePath?: string; + withCredentials?: boolean; + encoder?: HttpParameterCodec; } export class Configuration { - apiKeys?: { [key: string]: string }; - username?: string; - password?: string; - accessToken?: string | (() => string); - basePath?: string; - withCredentials?: boolean; - encoder?: HttpParameterCodec; + apiKeys?: {[ key: string ]: string}; + username?: string; + password?: string; + accessToken?: string | (() => string); + basePath?: string; + withCredentials?: boolean; + encoder?: HttpParameterCodec; - constructor(configurationParameters: ConfigurationParameters = {}) { - this.apiKeys = configurationParameters.apiKeys; - this.username = configurationParameters.username; - this.password = configurationParameters.password; - this.accessToken = configurationParameters.accessToken; - this.basePath = configurationParameters.basePath; - this.withCredentials = configurationParameters.withCredentials; - this.encoder = configurationParameters.encoder; - } - - /** - * Select the correct content-type to use for a request. - * Uses {@link Configuration#isJsonMime} to determine the correct content-type. - * If no content type is found return the first found type if the contentTypes is not empty - * @param contentTypes - the array of content types that are available for selection - * @returns the selected content-type or undefined if no selection could be made. - */ - public selectHeaderContentType(contentTypes: string[]): string | undefined { - if (contentTypes.length === 0) { - return undefined; + constructor(configurationParameters: ConfigurationParameters = {}) { + this.apiKeys = configurationParameters.apiKeys; + this.username = configurationParameters.username; + this.password = configurationParameters.password; + this.accessToken = configurationParameters.accessToken; + this.basePath = configurationParameters.basePath; + this.withCredentials = configurationParameters.withCredentials; + this.encoder = configurationParameters.encoder; } - const type = contentTypes.find((x: string) => this.isJsonMime(x)); - if (type === undefined) { - return contentTypes[0]; - } - return type; - } + /** + * Select the correct content-type to use for a request. + * Uses {@link Configuration#isJsonMime} to determine the correct content-type. + * If no content type is found return the first found type if the contentTypes is not empty + * @param contentTypes - the array of content types that are available for selection + * @returns the selected content-type or undefined if no selection could be made. + */ + public selectHeaderContentType (contentTypes: string[]): string | undefined { + if (contentTypes.length === 0) { + return undefined; + } - /** - * Select the correct accept content-type to use for a request. - * Uses {@link Configuration#isJsonMime} to determine the correct accept content-type. - * If no content type is found return the first found type if the contentTypes is not empty - * @param accepts - the array of content types that are available for selection. - * @returns the selected content-type or undefined if no selection could be made. - */ - public selectHeaderAccept(accepts: string[]): string | undefined { - if (accepts.length === 0) { - return undefined; + const type = contentTypes.find((x: string) => this.isJsonMime(x)); + if (type === undefined) { + return contentTypes[0]; + } + return type; } - const type = accepts.find((x: string) => this.isJsonMime(x)); - if (type === undefined) { - return accepts[0]; + /** + * Select the correct accept content-type to use for a request. + * Uses {@link Configuration#isJsonMime} to determine the correct accept content-type. + * If no content type is found return the first found type if the contentTypes is not empty + * @param accepts - the array of content types that are available for selection. + * @returns the selected content-type or undefined if no selection could be made. + */ + public selectHeaderAccept(accepts: string[]): string | undefined { + if (accepts.length === 0) { + return undefined; + } + + const type = accepts.find((x: string) => this.isJsonMime(x)); + if (type === undefined) { + return accepts[0]; + } + return type; } - return type; - } - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp( - '^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$', - 'i' - ); - return ( - mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json') - ); - } + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } } diff --git a/libs/perun/openapi/src/lib/encoder.ts b/libs/perun/openapi/src/lib/encoder.ts index 889ef00dd..cbefb4a6d 100644 --- a/libs/perun/openapi/src/lib/encoder.ts +++ b/libs/perun/openapi/src/lib/encoder.ts @@ -5,16 +5,17 @@ import { HttpParameterCodec } from '@angular/common/http'; * Workaround for https://github.com/angular/angular/issues/18261 */ export class CustomHttpParameterCodec implements HttpParameterCodec { - encodeKey(k: string): string { - return encodeURIComponent(k); - } - encodeValue(v: string): string { - return encodeURIComponent(v); - } - decodeKey(k: string): string { - return decodeURIComponent(k); - } - decodeValue(v: string): string { - return decodeURIComponent(v); - } + encodeKey(k: string): string { + return encodeURIComponent(k); + } + encodeValue(v: string): string { + return encodeURIComponent(v); + } + decodeKey(k: string): string { + return decodeURIComponent(k); + } + decodeValue(v: string): string { + return decodeURIComponent(v); + } } + diff --git a/libs/perun/openapi/src/lib/index.ts b/libs/perun/openapi/src/lib/index.ts index 410623f1c..c312b70fa 100644 --- a/libs/perun/openapi/src/lib/index.ts +++ b/libs/perun/openapi/src/lib/index.ts @@ -2,4 +2,4 @@ export * from './api/api'; export * from './model/models'; export * from './variables'; export * from './configuration'; -export * from './api.module'; +export * from './api.module'; \ No newline at end of file diff --git a/libs/perun/openapi/src/lib/model/actionType.ts b/libs/perun/openapi/src/lib/model/actionType.ts index 7de98752a..df486e768 100644 --- a/libs/perun/openapi/src/lib/model/actionType.ts +++ b/libs/perun/openapi/src/lib/model/actionType.ts @@ -10,16 +10,18 @@ * Do not edit the class manually. */ + /** * Action types for attributes. */ export type ActionType = 'WRITE' | 'WRITE_VO' | 'WRITE_PUBLIC' | 'READ' | 'READ_VO' | 'READ_PUBLIC'; export const ActionType = { - WRITE: 'WRITE' as ActionType, - WRITEVO: 'WRITE_VO' as ActionType, - WRITEPUBLIC: 'WRITE_PUBLIC' as ActionType, - READ: 'READ' as ActionType, - READVO: 'READ_VO' as ActionType, - READPUBLIC: 'READ_PUBLIC' as ActionType, + WRITE: 'WRITE' as ActionType, + WRITEVO: 'WRITE_VO' as ActionType, + WRITEPUBLIC: 'WRITE_PUBLIC' as ActionType, + READ: 'READ' as ActionType, + READVO: 'READ_VO' as ActionType, + READPUBLIC: 'READ_PUBLIC' as ActionType }; + diff --git a/libs/perun/openapi/src/lib/model/addUserExtSourceInput.ts b/libs/perun/openapi/src/lib/model/addUserExtSourceInput.ts index af7caab3c..1478d73a2 100644 --- a/libs/perun/openapi/src/lib/model/addUserExtSourceInput.ts +++ b/libs/perun/openapi/src/lib/model/addUserExtSourceInput.ts @@ -11,10 +11,12 @@ */ import { UserExtSource } from './userExtSource'; + /** * input to addUserExtSource */ -export interface AddUserExtSourceInput { - user: number; - userExtSource: UserExtSource; +export interface AddUserExtSourceInput { + user: number; + userExtSource: UserExtSource; } + diff --git a/libs/perun/openapi/src/lib/model/appState.ts b/libs/perun/openapi/src/lib/model/appState.ts index 78507cd5c..a7e5d87db 100644 --- a/libs/perun/openapi/src/lib/model/appState.ts +++ b/libs/perun/openapi/src/lib/model/appState.ts @@ -10,11 +10,13 @@ * Do not edit the class manually. */ + export type AppState = 'NEW' | 'VERIFIED' | 'APPROVED' | 'REJECTED'; export const AppState = { - NEW: 'NEW' as AppState, - VERIFIED: 'VERIFIED' as AppState, - APPROVED: 'APPROVED' as AppState, - REJECTED: 'REJECTED' as AppState, + NEW: 'NEW' as AppState, + VERIFIED: 'VERIFIED' as AppState, + APPROVED: 'APPROVED' as AppState, + REJECTED: 'REJECTED' as AppState }; + diff --git a/libs/perun/openapi/src/lib/model/appType.ts b/libs/perun/openapi/src/lib/model/appType.ts index 2c30ab3d1..6c8140906 100644 --- a/libs/perun/openapi/src/lib/model/appType.ts +++ b/libs/perun/openapi/src/lib/model/appType.ts @@ -10,10 +10,12 @@ * Do not edit the class manually. */ + export type AppType = 'INITIAL' | 'EXTENSION' | 'EMBEDDED'; export const AppType = { - INITIAL: 'INITIAL' as AppType, - EXTENSION: 'EXTENSION' as AppType, - EMBEDDED: 'EMBEDDED' as AppType, + INITIAL: 'INITIAL' as AppType, + EXTENSION: 'EXTENSION' as AppType, + EMBEDDED: 'EMBEDDED' as AppType }; + diff --git a/libs/perun/openapi/src/lib/model/application.ts b/libs/perun/openapi/src/lib/model/application.ts index 7f92498b0..ef7c3e001 100644 --- a/libs/perun/openapi/src/lib/model/application.ts +++ b/libs/perun/openapi/src/lib/model/application.ts @@ -15,19 +15,21 @@ import { Vo } from './vo'; import { AppState } from './appState'; import { AppType } from './appType'; -export interface Application { - id?: number; - vo?: Vo; - group?: Group; - type?: AppType; - fedInfo?: string; - state?: AppState; - extSourceName?: string; - extSourceType?: string; - extSourceLoa?: number; - user?: User; - createdBy?: string; - createdAt?: string; - modifiedBy?: string; - modifiedAt?: string; + +export interface Application { + id?: number; + vo?: Vo; + group?: Group; + type?: AppType; + fedInfo?: string; + state?: AppState; + extSourceName?: string; + extSourceType?: string; + extSourceLoa?: number; + user?: User; + createdBy?: string; + createdAt?: string; + modifiedBy?: string; + modifiedAt?: string; } + diff --git a/libs/perun/openapi/src/lib/model/applicationForm.ts b/libs/perun/openapi/src/lib/model/applicationForm.ts index ba637e7c4..2663b1089 100644 --- a/libs/perun/openapi/src/lib/model/applicationForm.ts +++ b/libs/perun/openapi/src/lib/model/applicationForm.ts @@ -12,12 +12,14 @@ import { Group } from './group'; import { Vo } from './vo'; -export interface ApplicationForm { - id?: number; - vo?: Vo; - group?: Group; - automaticApproval?: boolean; - automaticApprovalExtension?: boolean; - automaticApprovalEmbedded?: boolean; - moduleClassName?: string; + +export interface ApplicationForm { + id?: number; + vo?: Vo; + group?: Group; + automaticApproval?: boolean; + automaticApprovalExtension?: boolean; + automaticApprovalEmbedded?: boolean; + moduleClassName?: string; } + diff --git a/libs/perun/openapi/src/lib/model/applicationFormItem.ts b/libs/perun/openapi/src/lib/model/applicationFormItem.ts index 077965df8..d22fd7017 100644 --- a/libs/perun/openapi/src/lib/model/applicationFormItem.ts +++ b/libs/perun/openapi/src/lib/model/applicationFormItem.ts @@ -13,38 +13,41 @@ import { ItemTexts } from './itemTexts'; import { Type } from './type'; import { AppType } from './appType'; -export interface ApplicationFormItem { - id?: number; - shortname?: string; - required?: boolean; - updatable?: boolean; - type?: Type; - federationAttribute?: string; - perunSourceAttribute?: string; - perunDestinationAttribute?: string; - regex?: string; - applicationTypes?: Array; - ordnum?: number; - i18n?: { [key: string]: ItemTexts }; - hiddenDependencyItemId?: number; - disabledDependencyItemId?: number; - hidden?: ApplicationFormItem.HiddenEnum; - disabled?: ApplicationFormItem.DisabledEnum; - forDelete?: boolean; + +export interface ApplicationFormItem { + id?: number; + shortname?: string; + required?: boolean; + updatable?: boolean; + type?: Type; + federationAttribute?: string; + perunSourceAttribute?: string; + perunDestinationAttribute?: string; + regex?: string; + applicationTypes?: Array; + ordnum?: number; + i18n?: { [key: string]: ItemTexts; }; + hiddenDependencyItemId?: number; + disabledDependencyItemId?: number; + hidden?: ApplicationFormItem.HiddenEnum; + disabled?: ApplicationFormItem.DisabledEnum; + forDelete?: boolean; } export namespace ApplicationFormItem { - export type HiddenEnum = 'NEVER' | 'ALWAYS' | 'IF_PREFILLED' | 'IF_EMPTY'; - export const HiddenEnum = { - NEVER: 'NEVER' as HiddenEnum, - ALWAYS: 'ALWAYS' as HiddenEnum, - IFPREFILLED: 'IF_PREFILLED' as HiddenEnum, - IFEMPTY: 'IF_EMPTY' as HiddenEnum, - }; - export type DisabledEnum = 'NEVER' | 'ALWAYS' | 'IF_PREFILLED' | 'IF_EMPTY'; - export const DisabledEnum = { - NEVER: 'NEVER' as DisabledEnum, - ALWAYS: 'ALWAYS' as DisabledEnum, - IFPREFILLED: 'IF_PREFILLED' as DisabledEnum, - IFEMPTY: 'IF_EMPTY' as DisabledEnum, - }; + export type HiddenEnum = 'NEVER' | 'ALWAYS' | 'IF_PREFILLED' | 'IF_EMPTY'; + export const HiddenEnum = { + NEVER: 'NEVER' as HiddenEnum, + ALWAYS: 'ALWAYS' as HiddenEnum, + IFPREFILLED: 'IF_PREFILLED' as HiddenEnum, + IFEMPTY: 'IF_EMPTY' as HiddenEnum + }; + export type DisabledEnum = 'NEVER' | 'ALWAYS' | 'IF_PREFILLED' | 'IF_EMPTY'; + export const DisabledEnum = { + NEVER: 'NEVER' as DisabledEnum, + ALWAYS: 'ALWAYS' as DisabledEnum, + IFPREFILLED: 'IF_PREFILLED' as DisabledEnum, + IFEMPTY: 'IF_EMPTY' as DisabledEnum + }; } + + diff --git a/libs/perun/openapi/src/lib/model/applicationFormItemData.ts b/libs/perun/openapi/src/lib/model/applicationFormItemData.ts index fc8e3f9b9..035f17e3e 100644 --- a/libs/perun/openapi/src/lib/model/applicationFormItemData.ts +++ b/libs/perun/openapi/src/lib/model/applicationFormItemData.ts @@ -11,11 +11,13 @@ */ import { ApplicationFormItem } from './applicationFormItem'; -export interface ApplicationFormItemData { - id?: number; - formItem?: ApplicationFormItem; - shortname?: string; - value?: string; - assuranceLevel?: string; - prefilledValue?: string; + +export interface ApplicationFormItemData { + id?: number; + formItem?: ApplicationFormItem; + shortname?: string; + value?: string; + assuranceLevel?: string; + prefilledValue?: string; } + diff --git a/libs/perun/openapi/src/lib/model/applicationMail.ts b/libs/perun/openapi/src/lib/model/applicationMail.ts index 7de4d710a..4a31ba989 100644 --- a/libs/perun/openapi/src/lib/model/applicationMail.ts +++ b/libs/perun/openapi/src/lib/model/applicationMail.ts @@ -13,11 +13,13 @@ import { MailText } from './mailText'; import { MailType } from './mailType'; import { AppType } from './appType'; -export interface ApplicationMail { - id?: number; - appType?: AppType; - formId?: number; - mailType?: MailType; - send?: boolean; - message?: { [key: string]: MailText }; + +export interface ApplicationMail { + id?: number; + appType?: AppType; + formId?: number; + mailType?: MailType; + send?: boolean; + message?: { [key: string]: MailText; }; } + diff --git a/libs/perun/openapi/src/lib/model/applicationsOrderColumn.ts b/libs/perun/openapi/src/lib/model/applicationsOrderColumn.ts index 9f53c23b0..185c3ff06 100644 --- a/libs/perun/openapi/src/lib/model/applicationsOrderColumn.ts +++ b/libs/perun/openapi/src/lib/model/applicationsOrderColumn.ts @@ -10,21 +10,16 @@ * Do not edit the class manually. */ -export type ApplicationsOrderColumn = - | 'ID' - | 'DATE_CREATED' - | 'TYPE' - | 'STATE' - | 'SUBMITTER' - | 'GROUP_NAME' - | 'MODIFIED_BY'; + +export type ApplicationsOrderColumn = 'ID' | 'DATE_CREATED' | 'TYPE' | 'STATE' | 'SUBMITTER' | 'GROUP_NAME' | 'MODIFIED_BY'; export const ApplicationsOrderColumn = { - ID: 'ID' as ApplicationsOrderColumn, - DATECREATED: 'DATE_CREATED' as ApplicationsOrderColumn, - TYPE: 'TYPE' as ApplicationsOrderColumn, - STATE: 'STATE' as ApplicationsOrderColumn, - SUBMITTER: 'SUBMITTER' as ApplicationsOrderColumn, - GROUPNAME: 'GROUP_NAME' as ApplicationsOrderColumn, - MODIFIEDBY: 'MODIFIED_BY' as ApplicationsOrderColumn, + ID: 'ID' as ApplicationsOrderColumn, + DATECREATED: 'DATE_CREATED' as ApplicationsOrderColumn, + TYPE: 'TYPE' as ApplicationsOrderColumn, + STATE: 'STATE' as ApplicationsOrderColumn, + SUBMITTER: 'SUBMITTER' as ApplicationsOrderColumn, + GROUPNAME: 'GROUP_NAME' as ApplicationsOrderColumn, + MODIFIEDBY: 'MODIFIED_BY' as ApplicationsOrderColumn }; + diff --git a/libs/perun/openapi/src/lib/model/applicationsPageQuery.ts b/libs/perun/openapi/src/lib/model/applicationsPageQuery.ts index eb75e693f..b33003e73 100644 --- a/libs/perun/openapi/src/lib/model/applicationsPageQuery.ts +++ b/libs/perun/openapi/src/lib/model/applicationsPageQuery.ts @@ -13,16 +13,19 @@ import { ApplicationsOrderColumn } from './applicationsOrderColumn'; import { SortingOrder } from './sortingOrder'; import { AppState } from './appState'; -export interface ApplicationsPageQuery { - pageSize: number; - offset: number; - order: SortingOrder; - sortColumn: ApplicationsOrderColumn; - searchString?: string; - includeGroupApplications?: boolean; - states?: Array; - dateFrom?: string; - dateTo?: string; - userId?: number; - groupId?: number; + +export interface ApplicationsPageQuery { + pageSize: number; + offset: number; + order: SortingOrder; + sortColumn: ApplicationsOrderColumn; + searchString?: string; + includeGroupApplications?: boolean; + getDetails?: boolean; + states?: Array; + dateFrom?: string; + dateTo?: string; + userId?: number; + groupId?: number; } + diff --git a/libs/perun/openapi/src/lib/model/assignedGroup.ts b/libs/perun/openapi/src/lib/model/assignedGroup.ts index bb4bdb908..38cf3ebc7 100644 --- a/libs/perun/openapi/src/lib/model/assignedGroup.ts +++ b/libs/perun/openapi/src/lib/model/assignedGroup.ts @@ -12,10 +12,12 @@ import { EnrichedGroup } from './enrichedGroup'; import { GroupResourceStatus } from './groupResourceStatus'; -export interface AssignedGroup { - enrichedGroup?: EnrichedGroup; - status?: GroupResourceStatus; - sourceGroupId?: number; - failureCause?: string; - autoAssignSubgroups?: boolean; + +export interface AssignedGroup { + enrichedGroup?: EnrichedGroup; + status?: GroupResourceStatus; + sourceGroupId?: number; + failureCause?: string; + autoAssignSubgroups?: boolean; } + diff --git a/libs/perun/openapi/src/lib/model/assignedMember.ts b/libs/perun/openapi/src/lib/model/assignedMember.ts index 34b0f20df..f784c513b 100644 --- a/libs/perun/openapi/src/lib/model/assignedMember.ts +++ b/libs/perun/openapi/src/lib/model/assignedMember.ts @@ -12,7 +12,9 @@ import { RichMember } from './richMember'; import { GroupResourceStatus } from './groupResourceStatus'; -export interface AssignedMember { - richMember?: RichMember; - status?: GroupResourceStatus; + +export interface AssignedMember { + richMember?: RichMember; + status?: GroupResourceStatus; } + diff --git a/libs/perun/openapi/src/lib/model/assignedResource.ts b/libs/perun/openapi/src/lib/model/assignedResource.ts index 6fda91edf..805a9f530 100644 --- a/libs/perun/openapi/src/lib/model/assignedResource.ts +++ b/libs/perun/openapi/src/lib/model/assignedResource.ts @@ -14,12 +14,14 @@ import { ResourceTag } from './resourceTag'; import { Facility } from './facility'; import { GroupResourceStatus } from './groupResourceStatus'; -export interface AssignedResource { - enrichedResource?: EnrichedResource; - status?: GroupResourceStatus; - sourceGroupId?: number; - failureCause?: string; - facility?: Facility; - resourceTags?: Array; - autoAssignSubgroups?: boolean; + +export interface AssignedResource { + enrichedResource?: EnrichedResource; + status?: GroupResourceStatus; + sourceGroupId?: number; + failureCause?: string; + facility?: Facility; + resourceTags?: Array; + autoAssignSubgroups?: boolean; } + diff --git a/libs/perun/openapi/src/lib/model/attribute.ts b/libs/perun/openapi/src/lib/model/attribute.ts index d3c21a569..5c68c003c 100644 --- a/libs/perun/openapi/src/lib/model/attribute.ts +++ b/libs/perun/openapi/src/lib/model/attribute.ts @@ -11,10 +11,12 @@ */ import { AttributeDefinition } from './attributeDefinition'; -export interface Attribute extends AttributeDefinition { - valueCreatedAt?: string | null; - valueCreatedBy?: string | null; - valueModifiedAt?: string | null; - valueModifiedBy?: string | null; - value?: object; + +export interface Attribute extends AttributeDefinition { + valueCreatedAt?: string | null; + valueCreatedBy?: string | null; + valueModifiedAt?: string | null; + valueModifiedBy?: string | null; + value?: object; } + diff --git a/libs/perun/openapi/src/lib/model/attributeAction.ts b/libs/perun/openapi/src/lib/model/attributeAction.ts index 0daa33114..416a20a97 100644 --- a/libs/perun/openapi/src/lib/model/attributeAction.ts +++ b/libs/perun/openapi/src/lib/model/attributeAction.ts @@ -10,12 +10,14 @@ * Do not edit the class manually. */ + /** * Represents types of actions that users can perform upon attributes. */ export type AttributeAction = 'WRITE' | 'READ'; export const AttributeAction = { - WRITE: 'WRITE' as AttributeAction, - READ: 'READ' as AttributeAction, + WRITE: 'WRITE' as AttributeAction, + READ: 'READ' as AttributeAction }; + diff --git a/libs/perun/openapi/src/lib/model/attributeDefinition.ts b/libs/perun/openapi/src/lib/model/attributeDefinition.ts index 2683a9939..50f8817a6 100644 --- a/libs/perun/openapi/src/lib/model/attributeDefinition.ts +++ b/libs/perun/openapi/src/lib/model/attributeDefinition.ts @@ -11,15 +11,17 @@ */ import { Auditable } from './auditable'; -export interface AttributeDefinition extends Auditable { - friendlyName?: string; - namespace?: string; - description?: string; - type?: string; - displayName?: string; - writable?: boolean; - unique?: boolean; - readonly friendlyNameParameter?: string; - readonly baseFriendlyName?: string; - readonly entity?: string; + +export interface AttributeDefinition extends Auditable { + friendlyName?: string; + namespace?: string; + description?: string | null; + type?: string; + displayName?: string; + writable?: boolean; + unique?: boolean; + readonly friendlyNameParameter?: string; + readonly baseFriendlyName?: string; + readonly entity?: string; } + diff --git a/libs/perun/openapi/src/lib/model/attributePolicy.ts b/libs/perun/openapi/src/lib/model/attributePolicy.ts index 0ca5e9440..5c5e20a52 100644 --- a/libs/perun/openapi/src/lib/model/attributePolicy.ts +++ b/libs/perun/openapi/src/lib/model/attributePolicy.ts @@ -11,9 +11,11 @@ */ import { RoleObject } from './roleObject'; -export interface AttributePolicy { - id: number; - role: string; - object: RoleObject; - policyCollectionId: number; + +export interface AttributePolicy { + id: number; + role: string; + object: RoleObject; + policyCollectionId: number; } + diff --git a/libs/perun/openapi/src/lib/model/attributePolicyCollection.ts b/libs/perun/openapi/src/lib/model/attributePolicyCollection.ts index ecbde2b3b..7127137aa 100644 --- a/libs/perun/openapi/src/lib/model/attributePolicyCollection.ts +++ b/libs/perun/openapi/src/lib/model/attributePolicyCollection.ts @@ -12,9 +12,11 @@ import { AttributeAction } from './attributeAction'; import { AttributePolicy } from './attributePolicy'; -export interface AttributePolicyCollection { - id: number; - attributeId: number; - action: AttributeAction; - policies: Array; + +export interface AttributePolicyCollection { + id: number; + attributeId: number; + action: AttributeAction; + policies: Array; } + diff --git a/libs/perun/openapi/src/lib/model/attributeRights.ts b/libs/perun/openapi/src/lib/model/attributeRights.ts index abf5ae70a..e5f367df4 100644 --- a/libs/perun/openapi/src/lib/model/attributeRights.ts +++ b/libs/perun/openapi/src/lib/model/attributeRights.ts @@ -11,8 +11,10 @@ */ import { ActionType } from './actionType'; -export interface AttributeRights { - attributeId: number; - role: string; - rights: Array; + +export interface AttributeRights { + attributeId: number; + role: string; + rights: Array; } + diff --git a/libs/perun/openapi/src/lib/model/auditEvent.ts b/libs/perun/openapi/src/lib/model/auditEvent.ts index 2e93690bf..9370908e1 100644 --- a/libs/perun/openapi/src/lib/model/auditEvent.ts +++ b/libs/perun/openapi/src/lib/model/auditEvent.ts @@ -20,19 +20,21 @@ import { ExtSource } from './extSource'; import { Facility } from './facility'; import { Member } from './member'; -export interface AuditEvent { - attribute?: AttributeDefinition; - extSource?: ExtSource; - source?: ExtSource; - facility?: Facility; - group?: Group; - parentGroup?: Group; - member?: Member; - resource?: Resource; - service?: Service; - user?: User; - userExtSource?: UserExtSource; - vo?: Vo; - name?: string; - message?: string; + +export interface AuditEvent { + attribute?: AttributeDefinition; + extSource?: ExtSource; + source?: ExtSource; + facility?: Facility; + group?: Group; + parentGroup?: Group; + member?: Member; + resource?: Resource; + service?: Service; + user?: User; + userExtSource?: UserExtSource; + vo?: Vo; + name?: string; + message?: string; } + diff --git a/libs/perun/openapi/src/lib/model/auditMessage.ts b/libs/perun/openapi/src/lib/model/auditMessage.ts index 0ec62e8f5..d3e1d6a54 100644 --- a/libs/perun/openapi/src/lib/model/auditMessage.ts +++ b/libs/perun/openapi/src/lib/model/auditMessage.ts @@ -11,10 +11,12 @@ */ import { AuditEvent } from './auditEvent'; -export interface AuditMessage { - event?: AuditEvent; - id?: number; - actor?: string; - createdAt?: string; - createdByUid?: number; + +export interface AuditMessage { + event?: AuditEvent; + id?: number; + actor?: string; + createdAt?: string; + createdByUid?: number; } + diff --git a/libs/perun/openapi/src/lib/model/auditMessagesPageQuery.ts b/libs/perun/openapi/src/lib/model/auditMessagesPageQuery.ts index da921e467..30e799c30 100644 --- a/libs/perun/openapi/src/lib/model/auditMessagesPageQuery.ts +++ b/libs/perun/openapi/src/lib/model/auditMessagesPageQuery.ts @@ -11,8 +11,10 @@ */ import { SortingOrder } from './sortingOrder'; -export interface AuditMessagesPageQuery { - pageSize: number; - offset: number; - order: SortingOrder; + +export interface AuditMessagesPageQuery { + pageSize: number; + offset: number; + order: SortingOrder; } + diff --git a/libs/perun/openapi/src/lib/model/auditable.ts b/libs/perun/openapi/src/lib/model/auditable.ts index 6ff1a369c..e3a0bc0b9 100644 --- a/libs/perun/openapi/src/lib/model/auditable.ts +++ b/libs/perun/openapi/src/lib/model/auditable.ts @@ -11,11 +11,13 @@ */ import { PerunBean } from './perunBean'; -export interface Auditable extends PerunBean { - createdAt?: string | null; - createdBy?: string | null; - modifiedAt?: string | null; - modifiedBy?: string | null; - createdByUid?: number | null; - modifiedByUid?: number | null; + +export interface Auditable extends PerunBean { + createdAt?: string | null; + createdBy?: string | null; + modifiedAt?: string | null; + modifiedBy?: string | null; + createdByUid?: number | null; + modifiedByUid?: number | null; } + diff --git a/libs/perun/openapi/src/lib/model/author.ts b/libs/perun/openapi/src/lib/model/author.ts index 1dcc23994..53a006d66 100644 --- a/libs/perun/openapi/src/lib/model/author.ts +++ b/libs/perun/openapi/src/lib/model/author.ts @@ -13,12 +13,14 @@ import { PerunBean } from './perunBean'; import { Authorship } from './authorship'; import { Attribute } from './attribute'; -export interface Author extends PerunBean { - firstName?: string; - lastName?: string; - middleName?: string; - titleBefore?: string; - titleAfter?: string; - attributes?: Array; - authorships?: Array; + +export interface Author extends PerunBean { + firstName?: string; + lastName?: string; + middleName?: string; + titleBefore?: string; + titleAfter?: string; + attributes?: Array; + authorships?: Array; } + diff --git a/libs/perun/openapi/src/lib/model/authorship.ts b/libs/perun/openapi/src/lib/model/authorship.ts index 5ef0693f9..a005370a6 100644 --- a/libs/perun/openapi/src/lib/model/authorship.ts +++ b/libs/perun/openapi/src/lib/model/authorship.ts @@ -11,10 +11,12 @@ */ import { PerunBean } from './perunBean'; -export interface Authorship extends PerunBean { - publicationId?: number; - userId?: number; - createdBy?: string; - createdDate?: string; - createdByUid?: number; + +export interface Authorship extends PerunBean { + publicationId?: number; + userId?: number; + createdBy?: string; + createdDate?: string; + createdByUid?: number; } + diff --git a/libs/perun/openapi/src/lib/model/ban.ts b/libs/perun/openapi/src/lib/model/ban.ts index db3de919e..314cdb065 100644 --- a/libs/perun/openapi/src/lib/model/ban.ts +++ b/libs/perun/openapi/src/lib/model/ban.ts @@ -11,7 +11,9 @@ */ import { Auditable } from './auditable'; -export interface Ban extends Auditable { - validityTo?: string; - description?: string; + +export interface Ban extends Auditable { + validityTo?: string; + description?: string; } + diff --git a/libs/perun/openapi/src/lib/model/banOnFacility.ts b/libs/perun/openapi/src/lib/model/banOnFacility.ts index 4ba5b21f5..fdc66e737 100644 --- a/libs/perun/openapi/src/lib/model/banOnFacility.ts +++ b/libs/perun/openapi/src/lib/model/banOnFacility.ts @@ -11,7 +11,9 @@ */ import { Ban } from './ban'; -export interface BanOnFacility extends Ban { - userId?: number; - facilityId?: number; + +export interface BanOnFacility extends Ban { + userId?: number; + facilityId?: number; } + diff --git a/libs/perun/openapi/src/lib/model/banOnResource.ts b/libs/perun/openapi/src/lib/model/banOnResource.ts index 185b0f4cc..d0b9fe890 100644 --- a/libs/perun/openapi/src/lib/model/banOnResource.ts +++ b/libs/perun/openapi/src/lib/model/banOnResource.ts @@ -11,7 +11,9 @@ */ import { Ban } from './ban'; -export interface BanOnResource extends Ban { - memberId?: number; - resourceId?: number; + +export interface BanOnResource extends Ban { + memberId?: number; + resourceId?: number; } + diff --git a/libs/perun/openapi/src/lib/model/banOnVo.ts b/libs/perun/openapi/src/lib/model/banOnVo.ts index 7dad589dc..ecb6b0fb3 100644 --- a/libs/perun/openapi/src/lib/model/banOnVo.ts +++ b/libs/perun/openapi/src/lib/model/banOnVo.ts @@ -11,7 +11,9 @@ */ import { Ban } from './ban'; -export interface BanOnVo extends Ban { - memberId?: number; - voId?: number; + +export interface BanOnVo extends Ban { + memberId?: number; + voId?: number; } + diff --git a/libs/perun/openapi/src/lib/model/brand.ts b/libs/perun/openapi/src/lib/model/brand.ts index 3c4ee833e..10ae8a6d9 100644 --- a/libs/perun/openapi/src/lib/model/brand.ts +++ b/libs/perun/openapi/src/lib/model/brand.ts @@ -11,8 +11,10 @@ */ import { NewApps } from './newApps'; -export interface Brand { - name?: string; - oldGuiDomain?: string; - newApps?: NewApps; + +export interface Brand { + name?: string; + oldGuiDomain?: string; + newApps?: NewApps; } + diff --git a/libs/perun/openapi/src/lib/model/candidate.ts b/libs/perun/openapi/src/lib/model/candidate.ts index d7cbbe35e..3ba487ecc 100644 --- a/libs/perun/openapi/src/lib/model/candidate.ts +++ b/libs/perun/openapi/src/lib/model/candidate.ts @@ -12,8 +12,10 @@ import { User } from './user'; import { UserExtSource } from './userExtSource'; -export interface Candidate extends User { - userExtSource?: UserExtSource; - additionalUserExtSources?: Array; - attributes?: { [key: string]: string }; + +export interface Candidate extends User { + userExtSource?: UserExtSource; + additionalUserExtSources?: Array; + attributes?: { [key: string]: string; }; } + diff --git a/libs/perun/openapi/src/lib/model/category.ts b/libs/perun/openapi/src/lib/model/category.ts index 040080a50..7e23b29bf 100644 --- a/libs/perun/openapi/src/lib/model/category.ts +++ b/libs/perun/openapi/src/lib/model/category.ts @@ -11,7 +11,9 @@ */ import { PerunBean } from './perunBean'; -export interface Category extends PerunBean { - name?: string; - rank?: number; + +export interface Category extends PerunBean { + name?: string; + rank?: number; } + diff --git a/libs/perun/openapi/src/lib/model/destination.ts b/libs/perun/openapi/src/lib/model/destination.ts index 5c09aea7c..85bea099c 100644 --- a/libs/perun/openapi/src/lib/model/destination.ts +++ b/libs/perun/openapi/src/lib/model/destination.ts @@ -13,8 +13,10 @@ import { Auditable } from './auditable'; import { DestinationPropagationType } from './destinationPropagationType'; import { DestinationType } from './destinationType'; -export interface Destination extends Auditable { - destination?: string; - type?: DestinationType; - propagationType?: DestinationPropagationType; + +export interface Destination extends Auditable { + destination?: string; + type?: DestinationType; + propagationType?: DestinationPropagationType; } + diff --git a/libs/perun/openapi/src/lib/model/destinationPropagationType.ts b/libs/perun/openapi/src/lib/model/destinationPropagationType.ts index 5c6de770f..2e07b3be8 100644 --- a/libs/perun/openapi/src/lib/model/destinationPropagationType.ts +++ b/libs/perun/openapi/src/lib/model/destinationPropagationType.ts @@ -10,13 +10,15 @@ * Do not edit the class manually. */ + /** * type of propagation of service settings to a destination */ export type DestinationPropagationType = 'PARALLEL' | 'SERIAL' | 'DUMMY'; export const DestinationPropagationType = { - PARALLEL: 'PARALLEL' as DestinationPropagationType, - SERIAL: 'SERIAL' as DestinationPropagationType, - DUMMY: 'DUMMY' as DestinationPropagationType, + PARALLEL: 'PARALLEL' as DestinationPropagationType, + SERIAL: 'SERIAL' as DestinationPropagationType, + DUMMY: 'DUMMY' as DestinationPropagationType }; + diff --git a/libs/perun/openapi/src/lib/model/destinationType.ts b/libs/perun/openapi/src/lib/model/destinationType.ts index fccbeffe3..9b680a48b 100644 --- a/libs/perun/openapi/src/lib/model/destinationType.ts +++ b/libs/perun/openapi/src/lib/model/destinationType.ts @@ -10,28 +10,21 @@ * Do not edit the class manually. */ + /** * type of destination, i.e. way of delivery of service settings */ -export type DestinationType = - | 'host' - | 'email' - | 'semail' - | 'url' - | 'user@host' - | 'user@host:port' - | 'service-specific' - | 'user@host-windows' - | 'host-windows-proxy'; +export type DestinationType = 'host' | 'email' | 'semail' | 'url' | 'user@host' | 'user@host:port' | 'service-specific' | 'user@host-windows' | 'host-windows-proxy'; export const DestinationType = { - Host: 'host' as DestinationType, - Email: 'email' as DestinationType, - Semail: 'semail' as DestinationType, - Url: 'url' as DestinationType, - Userhost: 'user@host' as DestinationType, - Userhostport: 'user@host:port' as DestinationType, - ServiceSpecific: 'service-specific' as DestinationType, - UserhostWindows: 'user@host-windows' as DestinationType, - HostWindowsProxy: 'host-windows-proxy' as DestinationType, + Host: 'host' as DestinationType, + Email: 'email' as DestinationType, + Semail: 'semail' as DestinationType, + Url: 'url' as DestinationType, + Userhost: 'user@host' as DestinationType, + Userhostport: 'user@host:port' as DestinationType, + ServiceSpecific: 'service-specific' as DestinationType, + UserhostWindows: 'user@host-windows' as DestinationType, + HostWindowsProxy: 'host-windows-proxy' as DestinationType }; + diff --git a/libs/perun/openapi/src/lib/model/enrichedFacility.ts b/libs/perun/openapi/src/lib/model/enrichedFacility.ts index e067de5a8..b8878a083 100644 --- a/libs/perun/openapi/src/lib/model/enrichedFacility.ts +++ b/libs/perun/openapi/src/lib/model/enrichedFacility.ts @@ -14,9 +14,11 @@ import { Owner } from './owner'; import { Host } from './host'; import { Facility } from './facility'; -export interface EnrichedFacility { - facility?: Facility; - owners?: Array; - destinations?: Array; - hosts?: Array; + +export interface EnrichedFacility { + facility?: Facility; + owners?: Array; + destinations?: Array; + hosts?: Array; } + diff --git a/libs/perun/openapi/src/lib/model/enrichedGroup.ts b/libs/perun/openapi/src/lib/model/enrichedGroup.ts index 1a19bf16e..cf13a754f 100644 --- a/libs/perun/openapi/src/lib/model/enrichedGroup.ts +++ b/libs/perun/openapi/src/lib/model/enrichedGroup.ts @@ -12,7 +12,9 @@ import { Group } from './group'; import { Attribute } from './attribute'; -export interface EnrichedGroup { - group?: Group; - attributes?: Array; + +export interface EnrichedGroup { + group?: Group; + attributes?: Array; } + diff --git a/libs/perun/openapi/src/lib/model/enrichedHost.ts b/libs/perun/openapi/src/lib/model/enrichedHost.ts index b9f70a77a..c906c37a8 100644 --- a/libs/perun/openapi/src/lib/model/enrichedHost.ts +++ b/libs/perun/openapi/src/lib/model/enrichedHost.ts @@ -12,7 +12,9 @@ import { Attribute } from './attribute'; import { Host } from './host'; -export interface EnrichedHost { - host?: Host; - hostAttributes?: Array; + +export interface EnrichedHost { + host?: Host; + hostAttributes?: Array; } + diff --git a/libs/perun/openapi/src/lib/model/enrichedResource.ts b/libs/perun/openapi/src/lib/model/enrichedResource.ts index 0c1911a08..9c485bc58 100644 --- a/libs/perun/openapi/src/lib/model/enrichedResource.ts +++ b/libs/perun/openapi/src/lib/model/enrichedResource.ts @@ -12,7 +12,9 @@ import { Attribute } from './attribute'; import { Resource } from './resource'; -export interface EnrichedResource { - resource?: Resource; - attributes?: Array; + +export interface EnrichedResource { + resource?: Resource; + attributes?: Array; } + diff --git a/libs/perun/openapi/src/lib/model/extSource.ts b/libs/perun/openapi/src/lib/model/extSource.ts index 6fffa059b..719b1628d 100644 --- a/libs/perun/openapi/src/lib/model/extSource.ts +++ b/libs/perun/openapi/src/lib/model/extSource.ts @@ -11,7 +11,9 @@ */ import { Auditable } from './auditable'; -export interface ExtSource extends Auditable { - name?: string; - type?: string; + +export interface ExtSource extends Auditable { + name?: string; + type?: string; } + diff --git a/libs/perun/openapi/src/lib/model/extSourceObject.ts b/libs/perun/openapi/src/lib/model/extSourceObject.ts index 88f36312c..c343cb512 100644 --- a/libs/perun/openapi/src/lib/model/extSourceObject.ts +++ b/libs/perun/openapi/src/lib/model/extSourceObject.ts @@ -11,9 +11,11 @@ */ import { ExtSource } from './extSource'; + /** * input to createExtSourceFromExtSourceObject */ -export interface ExtSourceObject { - extSource: ExtSource; +export interface ExtSourceObject { + extSource: ExtSource; } + diff --git a/libs/perun/openapi/src/lib/model/facility.ts b/libs/perun/openapi/src/lib/model/facility.ts index 79e6c0221..09dab5bcf 100644 --- a/libs/perun/openapi/src/lib/model/facility.ts +++ b/libs/perun/openapi/src/lib/model/facility.ts @@ -11,7 +11,9 @@ */ import { Auditable } from './auditable'; -export interface Facility extends Auditable { - name?: string; - description?: string; + +export interface Facility extends Auditable { + name?: string; + description?: string; } + diff --git a/libs/perun/openapi/src/lib/model/facilityPropagationState.ts b/libs/perun/openapi/src/lib/model/facilityPropagationState.ts index 4a967c215..6f91e1404 100644 --- a/libs/perun/openapi/src/lib/model/facilityPropagationState.ts +++ b/libs/perun/openapi/src/lib/model/facilityPropagationState.ts @@ -10,11 +10,13 @@ * Do not edit the class manually. */ + export type FacilityPropagationState = 'OK' | 'ERROR' | 'PROCESSING' | 'NOT_DETERMINED'; export const FacilityPropagationState = { - OK: 'OK' as FacilityPropagationState, - ERROR: 'ERROR' as FacilityPropagationState, - PROCESSING: 'PROCESSING' as FacilityPropagationState, - NOTDETERMINED: 'NOT_DETERMINED' as FacilityPropagationState, + OK: 'OK' as FacilityPropagationState, + ERROR: 'ERROR' as FacilityPropagationState, + PROCESSING: 'PROCESSING' as FacilityPropagationState, + NOTDETERMINED: 'NOT_DETERMINED' as FacilityPropagationState }; + diff --git a/libs/perun/openapi/src/lib/model/facilityState.ts b/libs/perun/openapi/src/lib/model/facilityState.ts index ddc3f1f86..1ed911967 100644 --- a/libs/perun/openapi/src/lib/model/facilityState.ts +++ b/libs/perun/openapi/src/lib/model/facilityState.ts @@ -12,8 +12,10 @@ import { Facility } from './facility'; import { FacilityPropagationState } from './facilityPropagationState'; -export interface FacilityState { - facility?: Facility; - state?: FacilityPropagationState; - results?: { [key: string]: FacilityPropagationState }; + +export interface FacilityState { + facility?: Facility; + state?: FacilityPropagationState; + results?: { [key: string]: FacilityPropagationState; }; } + diff --git a/libs/perun/openapi/src/lib/model/genDataNode.ts b/libs/perun/openapi/src/lib/model/genDataNode.ts index 48704a203..f3a7e5109 100644 --- a/libs/perun/openapi/src/lib/model/genDataNode.ts +++ b/libs/perun/openapi/src/lib/model/genDataNode.ts @@ -12,8 +12,10 @@ import { GenMemberDataNode } from './genMemberDataNode'; import { HashedGenData } from './hashedGenData'; -export interface GenDataNode { - h?: Array; - c?: Array; - m?: Array; + +export interface GenDataNode { + h?: Array; + c?: Array; + m?: Array; } + diff --git a/libs/perun/openapi/src/lib/model/genMemberDataNode.ts b/libs/perun/openapi/src/lib/model/genMemberDataNode.ts index b3e0f0688..59270e6cf 100644 --- a/libs/perun/openapi/src/lib/model/genMemberDataNode.ts +++ b/libs/perun/openapi/src/lib/model/genMemberDataNode.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ -export interface GenMemberDataNode { - h?: Array; + +export interface GenMemberDataNode { + h?: Array; } + diff --git a/libs/perun/openapi/src/lib/model/group.ts b/libs/perun/openapi/src/lib/model/group.ts index d7c6a8c2e..9dfe2ea0e 100644 --- a/libs/perun/openapi/src/lib/model/group.ts +++ b/libs/perun/openapi/src/lib/model/group.ts @@ -11,11 +11,13 @@ */ import { Auditable } from './auditable'; -export interface Group extends Auditable { - name?: string; - shortName?: string; - description?: string; - voId?: number; - parentGroupId?: number; - uuid?: string; + +export interface Group extends Auditable { + name?: string; + shortName?: string; + description?: string | null; + voId?: number; + parentGroupId?: number | null; + uuid?: string; } + diff --git a/libs/perun/openapi/src/lib/model/groupMemberData.ts b/libs/perun/openapi/src/lib/model/groupMemberData.ts index d0caa9c8c..15213e61e 100644 --- a/libs/perun/openapi/src/lib/model/groupMemberData.ts +++ b/libs/perun/openapi/src/lib/model/groupMemberData.ts @@ -12,7 +12,9 @@ import { Attribute } from './attribute'; import { GroupMemberRelation } from './groupMemberRelation'; -export interface GroupMemberData { - relations?: Array; - groupMemberAttributes?: { [key: string]: { [key: string]: Array } }; + +export interface GroupMemberData { + relations?: Array; + groupMemberAttributes?: { [key: string]: { [key: string]: Array; }; }; } + diff --git a/libs/perun/openapi/src/lib/model/groupMemberRelation.ts b/libs/perun/openapi/src/lib/model/groupMemberRelation.ts index 09166af69..6230cdf0b 100644 --- a/libs/perun/openapi/src/lib/model/groupMemberRelation.ts +++ b/libs/perun/openapi/src/lib/model/groupMemberRelation.ts @@ -10,25 +10,27 @@ * Do not edit the class manually. */ -export interface GroupMemberRelation { - /** - * member id - */ - m?: number; - /** - * group id - */ - g?: number; - /** - * source group id - */ - sg?: number; - /** - * source group status - */ - s?: string; - /** - * membership type - */ - t?: string; + +export interface GroupMemberRelation { + /** + * member id + */ + m?: number; + /** + * group id + */ + g?: number; + /** + * source group id + */ + sg?: number; + /** + * source group status + */ + s?: string; + /** + * membership type + */ + t?: string; } + diff --git a/libs/perun/openapi/src/lib/model/groupResourceStatus.ts b/libs/perun/openapi/src/lib/model/groupResourceStatus.ts index 02efa1f60..e225745b2 100644 --- a/libs/perun/openapi/src/lib/model/groupResourceStatus.ts +++ b/libs/perun/openapi/src/lib/model/groupResourceStatus.ts @@ -10,14 +10,16 @@ * Do not edit the class manually. */ + /** * status of the group-resource assignment */ export type GroupResourceStatus = 'ACTIVE' | 'INACTIVE' | 'FAILED' | 'PROCESSING'; export const GroupResourceStatus = { - ACTIVE: 'ACTIVE' as GroupResourceStatus, - INACTIVE: 'INACTIVE' as GroupResourceStatus, - FAILED: 'FAILED' as GroupResourceStatus, - PROCESSING: 'PROCESSING' as GroupResourceStatus, + ACTIVE: 'ACTIVE' as GroupResourceStatus, + INACTIVE: 'INACTIVE' as GroupResourceStatus, + FAILED: 'FAILED' as GroupResourceStatus, + PROCESSING: 'PROCESSING' as GroupResourceStatus }; + diff --git a/libs/perun/openapi/src/lib/model/groupsOrderColumn.ts b/libs/perun/openapi/src/lib/model/groupsOrderColumn.ts index aa8d492bc..e37b0015c 100644 --- a/libs/perun/openapi/src/lib/model/groupsOrderColumn.ts +++ b/libs/perun/openapi/src/lib/model/groupsOrderColumn.ts @@ -10,10 +10,12 @@ * Do not edit the class manually. */ + export type GroupsOrderColumn = 'ID' | 'NAME' | 'DESCRIPTION'; export const GroupsOrderColumn = { - ID: 'ID' as GroupsOrderColumn, - NAME: 'NAME' as GroupsOrderColumn, - DESCRIPTION: 'DESCRIPTION' as GroupsOrderColumn, + ID: 'ID' as GroupsOrderColumn, + NAME: 'NAME' as GroupsOrderColumn, + DESCRIPTION: 'DESCRIPTION' as GroupsOrderColumn }; + diff --git a/libs/perun/openapi/src/lib/model/groupsPageQuery.ts b/libs/perun/openapi/src/lib/model/groupsPageQuery.ts index 27b8cd45a..a3a17a4da 100644 --- a/libs/perun/openapi/src/lib/model/groupsPageQuery.ts +++ b/libs/perun/openapi/src/lib/model/groupsPageQuery.ts @@ -12,11 +12,13 @@ import { GroupsOrderColumn } from './groupsOrderColumn'; import { SortingOrder } from './sortingOrder'; -export interface GroupsPageQuery { - pageSize: number; - offset: number; - order: SortingOrder; - sortColumn: GroupsOrderColumn; - memberId?: number; - searchString?: string; + +export interface GroupsPageQuery { + pageSize: number; + offset: number; + order: SortingOrder; + sortColumn: GroupsOrderColumn; + memberId?: number; + searchString?: string; } + diff --git a/libs/perun/openapi/src/lib/model/hashedGenData.ts b/libs/perun/openapi/src/lib/model/hashedGenData.ts index 4a731f02b..48e0a2645 100644 --- a/libs/perun/openapi/src/lib/model/hashedGenData.ts +++ b/libs/perun/openapi/src/lib/model/hashedGenData.ts @@ -12,7 +12,9 @@ import { Attribute } from './attribute'; import { GenDataNode } from './genDataNode'; -export interface HashedGenData { - attributes?: { [key: string]: Array }; - hierarchy?: GenDataNode; + +export interface HashedGenData { + attributes?: { [key: string]: Array; }; + hierarchy?: GenDataNode; } + diff --git a/libs/perun/openapi/src/lib/model/host.ts b/libs/perun/openapi/src/lib/model/host.ts index 81233ad4b..7ec0d10e3 100644 --- a/libs/perun/openapi/src/lib/model/host.ts +++ b/libs/perun/openapi/src/lib/model/host.ts @@ -11,6 +11,8 @@ */ import { Auditable } from './auditable'; -export interface Host extends Auditable { - hostname?: string; + +export interface Host extends Auditable { + hostname?: string; } + diff --git a/libs/perun/openapi/src/lib/model/identity.ts b/libs/perun/openapi/src/lib/model/identity.ts index a52713a2b..35d27b406 100644 --- a/libs/perun/openapi/src/lib/model/identity.ts +++ b/libs/perun/openapi/src/lib/model/identity.ts @@ -11,10 +11,12 @@ */ import { ExtSource } from './extSource'; -export interface Identity { - id?: number; - name?: string; - organization?: string; - email?: string; - identities?: Array; + +export interface Identity { + id?: number; + name?: string; + organization?: string; + email?: string; + identities?: Array; } + diff --git a/libs/perun/openapi/src/lib/model/inlineResponse200.ts b/libs/perun/openapi/src/lib/model/inlineResponse200.ts index 60dfa3ad3..2e0fdc3bb 100644 --- a/libs/perun/openapi/src/lib/model/inlineResponse200.ts +++ b/libs/perun/openapi/src/lib/model/inlineResponse200.ts @@ -10,14 +10,17 @@ * Do not edit the class manually. */ -export interface InlineResponse200 { - graph?: string; - format?: InlineResponse200.FormatEnum; + +export interface InlineResponse200 { + graph?: string; + format?: InlineResponse200.FormatEnum; } export namespace InlineResponse200 { - export type FormatEnum = 'DOT' | 'TGF'; - export const FormatEnum = { - DOT: 'DOT' as FormatEnum, - TGF: 'TGF' as FormatEnum, - }; + export type FormatEnum = 'DOT' | 'TGF'; + export const FormatEnum = { + DOT: 'DOT' as FormatEnum, + TGF: 'TGF' as FormatEnum + }; } + + diff --git a/libs/perun/openapi/src/lib/model/inputAddApplicationMailForGroup.ts b/libs/perun/openapi/src/lib/model/inputAddApplicationMailForGroup.ts index 7c6da60ed..a7ddd6f52 100644 --- a/libs/perun/openapi/src/lib/model/inputAddApplicationMailForGroup.ts +++ b/libs/perun/openapi/src/lib/model/inputAddApplicationMailForGroup.ts @@ -11,10 +11,12 @@ */ import { ApplicationMail } from './applicationMail'; + /** * input to addApplicationMailForGroup */ -export interface InputAddApplicationMailForGroup { - group: number; - mail: ApplicationMail; +export interface InputAddApplicationMailForGroup { + group: number; + mail: ApplicationMail; } + diff --git a/libs/perun/openapi/src/lib/model/inputAddApplicationMailForVo.ts b/libs/perun/openapi/src/lib/model/inputAddApplicationMailForVo.ts index e370d2d51..5e49ed737 100644 --- a/libs/perun/openapi/src/lib/model/inputAddApplicationMailForVo.ts +++ b/libs/perun/openapi/src/lib/model/inputAddApplicationMailForVo.ts @@ -11,10 +11,12 @@ */ import { ApplicationMail } from './applicationMail'; + /** * input to addApplicationMailForVo */ -export interface InputAddApplicationMailForVo { - vo: number; - mail: ApplicationMail; +export interface InputAddApplicationMailForVo { + vo: number; + mail: ApplicationMail; } + diff --git a/libs/perun/openapi/src/lib/model/inputAddDestinationToMultipleServices.ts b/libs/perun/openapi/src/lib/model/inputAddDestinationToMultipleServices.ts index c9876bcc5..0b012eb8e 100644 --- a/libs/perun/openapi/src/lib/model/inputAddDestinationToMultipleServices.ts +++ b/libs/perun/openapi/src/lib/model/inputAddDestinationToMultipleServices.ts @@ -13,13 +13,15 @@ import { DestinationPropagationType } from './destinationPropagationType'; import { Service } from './service'; import { DestinationType } from './destinationType'; + /** * input to addDestinationToMultipleServices */ -export interface InputAddDestinationToMultipleServices { - services: Array; - facility: number; - destination: string; - type: DestinationType; - propagationType?: DestinationPropagationType; +export interface InputAddDestinationToMultipleServices { + services: Array; + facility: number; + destination: string; + type: DestinationType; + propagationType?: DestinationPropagationType; } + diff --git a/libs/perun/openapi/src/lib/model/inputAddDestinationsDefinedByHostsOnFacility.ts b/libs/perun/openapi/src/lib/model/inputAddDestinationsDefinedByHostsOnFacility.ts index 2e482f156..c9a5a1ae6 100644 --- a/libs/perun/openapi/src/lib/model/inputAddDestinationsDefinedByHostsOnFacility.ts +++ b/libs/perun/openapi/src/lib/model/inputAddDestinationsDefinedByHostsOnFacility.ts @@ -11,10 +11,12 @@ */ import { Service } from './service'; + /** * input to addDestinationsDefinedByHostsOnFacility */ -export interface InputAddDestinationsDefinedByHostsOnFacility { - services: Array; - facility: number; +export interface InputAddDestinationsDefinedByHostsOnFacility { + services: Array; + facility: number; } + diff --git a/libs/perun/openapi/src/lib/model/inputAssignResourceTagToResource.ts b/libs/perun/openapi/src/lib/model/inputAssignResourceTagToResource.ts index 19d092c43..9ca6878a0 100644 --- a/libs/perun/openapi/src/lib/model/inputAssignResourceTagToResource.ts +++ b/libs/perun/openapi/src/lib/model/inputAssignResourceTagToResource.ts @@ -11,13 +11,15 @@ */ import { ResourceTag } from './resourceTag'; + /** * input to assignResourceTagToResource */ -export interface InputAssignResourceTagToResource { - /** - * resource id - */ - resource: number; - resourceTag: ResourceTag; +export interface InputAssignResourceTagToResource { + /** + * resource id + */ + resource: number; + resourceTag: ResourceTag; } + diff --git a/libs/perun/openapi/src/lib/model/inputAttributeDefinition.ts b/libs/perun/openapi/src/lib/model/inputAttributeDefinition.ts index f815f1c03..37c02623c 100644 --- a/libs/perun/openapi/src/lib/model/inputAttributeDefinition.ts +++ b/libs/perun/openapi/src/lib/model/inputAttributeDefinition.ts @@ -11,9 +11,11 @@ */ import { AttributeDefinition } from './attributeDefinition'; + /** * Input to updateAttributeDefinition */ -export interface InputAttributeDefinition { - attributeDefinition: AttributeDefinition; +export interface InputAttributeDefinition { + attributeDefinition: AttributeDefinition; } + diff --git a/libs/perun/openapi/src/lib/model/inputAttributePolicyCollections.ts b/libs/perun/openapi/src/lib/model/inputAttributePolicyCollections.ts index deda38f19..ad37acfda 100644 --- a/libs/perun/openapi/src/lib/model/inputAttributePolicyCollections.ts +++ b/libs/perun/openapi/src/lib/model/inputAttributePolicyCollections.ts @@ -11,9 +11,11 @@ */ import { AttributePolicyCollection } from './attributePolicyCollection'; + /** * Input to setAttributePolicyCollections */ -export interface InputAttributePolicyCollections { - policyCollections: Array; +export interface InputAttributePolicyCollections { + policyCollections: Array; } + diff --git a/libs/perun/openapi/src/lib/model/inputAttributeRights.ts b/libs/perun/openapi/src/lib/model/inputAttributeRights.ts index 815d58468..9dbacb9a9 100644 --- a/libs/perun/openapi/src/lib/model/inputAttributeRights.ts +++ b/libs/perun/openapi/src/lib/model/inputAttributeRights.ts @@ -11,9 +11,11 @@ */ import { AttributeRights } from './attributeRights'; + /** * Input to setAttributeRights */ -export interface InputAttributeRights { - rights: Array; +export interface InputAttributeRights { + rights: Array; } + diff --git a/libs/perun/openapi/src/lib/model/inputCopyResource.ts b/libs/perun/openapi/src/lib/model/inputCopyResource.ts index f9ff12c9a..38acfb0b0 100644 --- a/libs/perun/openapi/src/lib/model/inputCopyResource.ts +++ b/libs/perun/openapi/src/lib/model/inputCopyResource.ts @@ -11,14 +11,16 @@ */ import { Resource } from './resource'; + /** * input to copyResource */ -export interface InputCopyResource { - templateResource: Resource; - destinationResource: Resource; - /** - * if copy the resource with group - */ - withGroups: boolean; +export interface InputCopyResource { + templateResource: Resource; + destinationResource: Resource; + /** + * if copy the resource with group + */ + withGroups: boolean; } + diff --git a/libs/perun/openapi/src/lib/model/inputCreateAttributeDefinition.ts b/libs/perun/openapi/src/lib/model/inputCreateAttributeDefinition.ts index e283aec86..9bebe688b 100644 --- a/libs/perun/openapi/src/lib/model/inputCreateAttributeDefinition.ts +++ b/libs/perun/openapi/src/lib/model/inputCreateAttributeDefinition.ts @@ -11,9 +11,11 @@ */ import { AttributeDefinition } from './attributeDefinition'; + /** * input to createAttributeDefinition */ -export interface InputCreateAttributeDefinition { - attribute: AttributeDefinition; +export interface InputCreateAttributeDefinition { + attribute: AttributeDefinition; } + diff --git a/libs/perun/openapi/src/lib/model/inputCreateAuthorship.ts b/libs/perun/openapi/src/lib/model/inputCreateAuthorship.ts index 9b6a83061..10024b2bf 100644 --- a/libs/perun/openapi/src/lib/model/inputCreateAuthorship.ts +++ b/libs/perun/openapi/src/lib/model/inputCreateAuthorship.ts @@ -11,9 +11,11 @@ */ import { Authorship } from './authorship'; + /** * input to createAuthorship */ -export interface InputCreateAuthorship { - authorship: Authorship; +export interface InputCreateAuthorship { + authorship: Authorship; } + diff --git a/libs/perun/openapi/src/lib/model/inputCreateCategory.ts b/libs/perun/openapi/src/lib/model/inputCreateCategory.ts index 460d6c8b7..e2ead65d6 100644 --- a/libs/perun/openapi/src/lib/model/inputCreateCategory.ts +++ b/libs/perun/openapi/src/lib/model/inputCreateCategory.ts @@ -11,9 +11,11 @@ */ import { Category } from './category'; + /** * input to createCategory */ -export interface InputCreateCategory { - category: Category; +export interface InputCreateCategory { + category: Category; } + diff --git a/libs/perun/openapi/src/lib/model/inputCreateCategory1.ts b/libs/perun/openapi/src/lib/model/inputCreateCategory1.ts index 07c6c2d6c..4b63fa7c8 100644 --- a/libs/perun/openapi/src/lib/model/inputCreateCategory1.ts +++ b/libs/perun/openapi/src/lib/model/inputCreateCategory1.ts @@ -10,16 +10,18 @@ * Do not edit the class manually. */ + /** * input to createCategory */ -export interface InputCreateCategory1 { - /** - * name of the category - */ - name: string; - /** - * the rank of the category - */ - rank: number; +export interface InputCreateCategory1 { + /** + * name of the category + */ + name: string; + /** + * the rank of the category + */ + rank: number; } + diff --git a/libs/perun/openapi/src/lib/model/inputCreateMemberForCandidate.ts b/libs/perun/openapi/src/lib/model/inputCreateMemberForCandidate.ts index 65eaa9582..e8ff005f0 100644 --- a/libs/perun/openapi/src/lib/model/inputCreateMemberForCandidate.ts +++ b/libs/perun/openapi/src/lib/model/inputCreateMemberForCandidate.ts @@ -12,11 +12,13 @@ import { Candidate } from './candidate'; import { Group } from './group'; + /** * input to create member for candidate */ -export interface InputCreateMemberForCandidate { - vo: number; - candidate: Candidate; - groups?: Array; +export interface InputCreateMemberForCandidate { + vo: number; + candidate: Candidate; + groups?: Array; } + diff --git a/libs/perun/openapi/src/lib/model/inputCreateMemberForUser.ts b/libs/perun/openapi/src/lib/model/inputCreateMemberForUser.ts index de9cdfd99..9f5f5a306 100644 --- a/libs/perun/openapi/src/lib/model/inputCreateMemberForUser.ts +++ b/libs/perun/openapi/src/lib/model/inputCreateMemberForUser.ts @@ -11,11 +11,13 @@ */ import { Group } from './group'; + /** * input to create member for user */ -export interface InputCreateMemberForUser { - vo: number; - user: number; - groups?: Array; +export interface InputCreateMemberForUser { + vo: number; + user: number; + groups?: Array; } + diff --git a/libs/perun/openapi/src/lib/model/inputCreateMemberFromExtSource.ts b/libs/perun/openapi/src/lib/model/inputCreateMemberFromExtSource.ts index 7a9cdb6ed..8626f3798 100644 --- a/libs/perun/openapi/src/lib/model/inputCreateMemberFromExtSource.ts +++ b/libs/perun/openapi/src/lib/model/inputCreateMemberFromExtSource.ts @@ -12,14 +12,16 @@ import { Candidate } from './candidate'; import { Group } from './group'; + /** * input to create member from extSource */ -export interface InputCreateMemberFromExtSource { - vo: number; - extSourceName: string; - extSourceType: string; - login: string; - candidate: Candidate; - groups?: Array; +export interface InputCreateMemberFromExtSource { + vo: number; + extSourceName: string; + extSourceType: string; + login: string; + candidate: Candidate; + groups?: Array; } + diff --git a/libs/perun/openapi/src/lib/model/inputCreateOwner.ts b/libs/perun/openapi/src/lib/model/inputCreateOwner.ts index 0fcc11cde..60b8cd2e2 100644 --- a/libs/perun/openapi/src/lib/model/inputCreateOwner.ts +++ b/libs/perun/openapi/src/lib/model/inputCreateOwner.ts @@ -10,27 +10,30 @@ * Do not edit the class manually. */ + /** * input to createOwner, no id, numeric ownerType instead of string type */ -export interface InputCreateOwner { - /** - * name of contact, e.g. John Doe or NSA - */ - name: string; - /** - * email address - */ - contact: string; - /** - * 0 - technical, 1 - administrative - */ - ownerType: InputCreateOwner.OwnerTypeEnum; +export interface InputCreateOwner { + /** + * name of contact, e.g. John Doe or NSA + */ + name: string; + /** + * email address + */ + contact: string; + /** + * 0 - technical, 1 - administrative + */ + ownerType: InputCreateOwner.OwnerTypeEnum; } export namespace InputCreateOwner { - export type OwnerTypeEnum = 0 | 1; - export const OwnerTypeEnum = { - NUMBER_0: 0 as OwnerTypeEnum, - NUMBER_1: 1 as OwnerTypeEnum, - }; + export type OwnerTypeEnum = 0 | 1; + export const OwnerTypeEnum = { + NUMBER_0: 0 as OwnerTypeEnum, + NUMBER_1: 1 as OwnerTypeEnum + }; } + + diff --git a/libs/perun/openapi/src/lib/model/inputCreatePublication.ts b/libs/perun/openapi/src/lib/model/inputCreatePublication.ts index 1f62f5206..24cafd819 100644 --- a/libs/perun/openapi/src/lib/model/inputCreatePublication.ts +++ b/libs/perun/openapi/src/lib/model/inputCreatePublication.ts @@ -11,9 +11,11 @@ */ import { Publication } from './publication'; + /** * input to createPublication */ -export interface InputCreatePublication { - publication: Publication; +export interface InputCreatePublication { + publication: Publication; } + diff --git a/libs/perun/openapi/src/lib/model/inputCreatePublicationSystem.ts b/libs/perun/openapi/src/lib/model/inputCreatePublicationSystem.ts index a28189578..07b9705d4 100644 --- a/libs/perun/openapi/src/lib/model/inputCreatePublicationSystem.ts +++ b/libs/perun/openapi/src/lib/model/inputCreatePublicationSystem.ts @@ -11,9 +11,11 @@ */ import { PublicationSystem } from './publicationSystem'; + /** * input to createPublicationSystem */ -export interface InputCreatePublicationSystem { - pubsys: PublicationSystem; +export interface InputCreatePublicationSystem { + pubsys: PublicationSystem; } + diff --git a/libs/perun/openapi/src/lib/model/inputCreateResourceTagWithResourceTag.ts b/libs/perun/openapi/src/lib/model/inputCreateResourceTagWithResourceTag.ts index ce0008c7f..26cf094e3 100644 --- a/libs/perun/openapi/src/lib/model/inputCreateResourceTagWithResourceTag.ts +++ b/libs/perun/openapi/src/lib/model/inputCreateResourceTagWithResourceTag.ts @@ -11,13 +11,15 @@ */ import { ResourceTag } from './resourceTag'; + /** * input to createResourceTagWithResourceTag */ -export interface InputCreateResourceTagWithResourceTag { - resourceTag: ResourceTag; - /** - * vo id - */ - vo: number; +export interface InputCreateResourceTagWithResourceTag { + resourceTag: ResourceTag; + /** + * vo id + */ + vo: number; } + diff --git a/libs/perun/openapi/src/lib/model/inputCreateService.ts b/libs/perun/openapi/src/lib/model/inputCreateService.ts index 26ab0ceec..0474a6b60 100644 --- a/libs/perun/openapi/src/lib/model/inputCreateService.ts +++ b/libs/perun/openapi/src/lib/model/inputCreateService.ts @@ -11,9 +11,11 @@ */ import { Service } from './service'; + /** * input to createService */ -export interface InputCreateService { - service: Service; +export interface InputCreateService { + service: Service; } + diff --git a/libs/perun/openapi/src/lib/model/inputCreateServiceUser.ts b/libs/perun/openapi/src/lib/model/inputCreateServiceUser.ts index c4cff10ed..af4104a67 100644 --- a/libs/perun/openapi/src/lib/model/inputCreateServiceUser.ts +++ b/libs/perun/openapi/src/lib/model/inputCreateServiceUser.ts @@ -12,10 +12,12 @@ import { Candidate } from './candidate'; import { User } from './user'; + /** * input to createServiceUser */ -export interface InputCreateServiceUser { - candidate: Candidate; - specificUserOwners: Array; +export interface InputCreateServiceUser { + candidate: Candidate; + specificUserOwners: Array; } + diff --git a/libs/perun/openapi/src/lib/model/inputCreateServicesPackage.ts b/libs/perun/openapi/src/lib/model/inputCreateServicesPackage.ts index 0f5550815..ec7581d61 100644 --- a/libs/perun/openapi/src/lib/model/inputCreateServicesPackage.ts +++ b/libs/perun/openapi/src/lib/model/inputCreateServicesPackage.ts @@ -11,9 +11,11 @@ */ import { ServicesPackage } from './servicesPackage'; + /** * Input to createServicesPackage */ -export interface InputCreateServicesPackage { - servicesPackage: ServicesPackage; +export interface InputCreateServicesPackage { + servicesPackage: ServicesPackage; } + diff --git a/libs/perun/openapi/src/lib/model/inputCreateSponsoredMember.ts b/libs/perun/openapi/src/lib/model/inputCreateSponsoredMember.ts index f013ef026..7d7131332 100644 --- a/libs/perun/openapi/src/lib/model/inputCreateSponsoredMember.ts +++ b/libs/perun/openapi/src/lib/model/inputCreateSponsoredMember.ts @@ -11,13 +11,15 @@ */ import { SponsoredUserData } from './sponsoredUserData'; + /** * input for createSponsoredMember */ -export interface InputCreateSponsoredMember { - vo: number; - validityTo?: string; - sponsor: number; - sendActivationLink?: boolean; - userData: SponsoredUserData; +export interface InputCreateSponsoredMember { + vo: number; + validityTo?: string; + sponsor: number; + sendActivationLink?: boolean; + userData: SponsoredUserData; } + diff --git a/libs/perun/openapi/src/lib/model/inputCreateSponsoredMember1.ts b/libs/perun/openapi/src/lib/model/inputCreateSponsoredMember1.ts index b355c4319..83ee99091 100644 --- a/libs/perun/openapi/src/lib/model/inputCreateSponsoredMember1.ts +++ b/libs/perun/openapi/src/lib/model/inputCreateSponsoredMember1.ts @@ -10,18 +10,20 @@ * Do not edit the class manually. */ + /** * input for createSponsoredMember */ -export interface InputCreateSponsoredMember1 { - /** - * names of members to create, single name should have the format {firstName};{lastName} to be parsed well - */ - guestNames: Array; - vo: number; - sponsor: number; - namespace: string; - validityTo?: string; - email?: string; - sendActivationLink?: boolean; +export interface InputCreateSponsoredMember1 { + /** + * names of members to create, single name should have the format {firstName};{lastName} to be parsed well + */ + guestNames: Array; + vo: number; + sponsor: number; + namespace: string; + validityTo?: string; + email?: string; + sendActivationLink?: boolean; } + diff --git a/libs/perun/openapi/src/lib/model/inputCreateSponsoredMemberFromCSV.ts b/libs/perun/openapi/src/lib/model/inputCreateSponsoredMemberFromCSV.ts index 953652caa..50bcab080 100644 --- a/libs/perun/openapi/src/lib/model/inputCreateSponsoredMemberFromCSV.ts +++ b/libs/perun/openapi/src/lib/model/inputCreateSponsoredMemberFromCSV.ts @@ -10,25 +10,27 @@ * Do not edit the class manually. */ + /** * input for createSponsoredMembersFromCSV */ -export interface InputCreateSponsoredMemberFromCSV { - /** - * values separated with semicolons - */ - data: Array; - /** - * csv header for the given data, values are also split with semicolons - */ - header: string; - vo: number; - sponsor: number; - namespace: string; - validityTo?: string; - sendActivationLinks?: boolean; - /** - * groups to which should be the created users assigned - */ - groups?: Array; +export interface InputCreateSponsoredMemberFromCSV { + /** + * values separated with semicolons + */ + data: Array; + /** + * csv header for the given data, values are also split with semicolons + */ + header: string; + vo: number; + sponsor: number; + namespace: string; + validityTo?: string; + sendActivationLinks?: boolean; + /** + * groups to which should be the created users assigned + */ + groups?: Array; } + diff --git a/libs/perun/openapi/src/lib/model/inputCreateThanks.ts b/libs/perun/openapi/src/lib/model/inputCreateThanks.ts index f6e44f023..c93fdca11 100644 --- a/libs/perun/openapi/src/lib/model/inputCreateThanks.ts +++ b/libs/perun/openapi/src/lib/model/inputCreateThanks.ts @@ -11,9 +11,11 @@ */ import { Thanks } from './thanks'; + /** * input to createThanks */ -export interface InputCreateThanks { - thanks?: Thanks; +export interface InputCreateThanks { + thanks?: Thanks; } + diff --git a/libs/perun/openapi/src/lib/model/inputCreateVoWithVo.ts b/libs/perun/openapi/src/lib/model/inputCreateVoWithVo.ts index 3d61bd391..633ef352f 100644 --- a/libs/perun/openapi/src/lib/model/inputCreateVoWithVo.ts +++ b/libs/perun/openapi/src/lib/model/inputCreateVoWithVo.ts @@ -11,9 +11,11 @@ */ import { Vo } from './vo'; + /** * input to createVoWithVo */ -export interface InputCreateVoWithVo { - vo: Vo; +export interface InputCreateVoWithVo { + vo: Vo; } + diff --git a/libs/perun/openapi/src/lib/model/inputDeleteGroups.ts b/libs/perun/openapi/src/lib/model/inputDeleteGroups.ts index 5ce329aa1..2785edabf 100644 --- a/libs/perun/openapi/src/lib/model/inputDeleteGroups.ts +++ b/libs/perun/openapi/src/lib/model/inputDeleteGroups.ts @@ -10,13 +10,15 @@ * Do not edit the class manually. */ + /** * input to deleteGroup */ -export interface InputDeleteGroups { - groups: Array; - /** - * boolean for force delete - */ - forceDelete: boolean; +export interface InputDeleteGroups { + groups: Array; + /** + * boolean for force delete + */ + forceDelete: boolean; } + diff --git a/libs/perun/openapi/src/lib/model/inputDeleteResourceTag.ts b/libs/perun/openapi/src/lib/model/inputDeleteResourceTag.ts index d0bb017cb..d6d21f1f9 100644 --- a/libs/perun/openapi/src/lib/model/inputDeleteResourceTag.ts +++ b/libs/perun/openapi/src/lib/model/inputDeleteResourceTag.ts @@ -11,9 +11,11 @@ */ import { ResourceTag } from './resourceTag'; + /** * input to deleteResourceTag */ -export interface InputDeleteResourceTag { - resourceTag: ResourceTag; +export interface InputDeleteResourceTag { + resourceTag: ResourceTag; } + diff --git a/libs/perun/openapi/src/lib/model/inputEntitylessAttribute.ts b/libs/perun/openapi/src/lib/model/inputEntitylessAttribute.ts index 009cbe321..d7426530e 100644 --- a/libs/perun/openapi/src/lib/model/inputEntitylessAttribute.ts +++ b/libs/perun/openapi/src/lib/model/inputEntitylessAttribute.ts @@ -11,13 +11,15 @@ */ import { Attribute } from './attribute'; + /** * input to setEntitylessAttribute */ -export interface InputEntitylessAttribute { - /** - * key for entityless attribute - */ - key: string; - attribute: Attribute; +export interface InputEntitylessAttribute { + /** + * key for entityless attribute + */ + key: string; + attribute: Attribute; } + diff --git a/libs/perun/openapi/src/lib/model/inputFormItemData.ts b/libs/perun/openapi/src/lib/model/inputFormItemData.ts index 1aa3bd4da..ff4406fca 100644 --- a/libs/perun/openapi/src/lib/model/inputFormItemData.ts +++ b/libs/perun/openapi/src/lib/model/inputFormItemData.ts @@ -11,13 +11,15 @@ */ import { ApplicationFormItemData } from './applicationFormItemData'; + /** * input to updateFormItemData */ -export interface InputFormItemData { - /** - * application id - */ - appId: number; - data: ApplicationFormItemData; +export interface InputFormItemData { + /** + * application id + */ + appId: number; + data: ApplicationFormItemData; } + diff --git a/libs/perun/openapi/src/lib/model/inputFormItemData1.ts b/libs/perun/openapi/src/lib/model/inputFormItemData1.ts index b0b2597d5..2f3762f02 100644 --- a/libs/perun/openapi/src/lib/model/inputFormItemData1.ts +++ b/libs/perun/openapi/src/lib/model/inputFormItemData1.ts @@ -11,13 +11,15 @@ */ import { ApplicationFormItemData } from './applicationFormItemData'; + /** * input to updateFormItemsData */ -export interface InputFormItemData1 { - /** - * application id - */ - appId: number; - data: Array; +export interface InputFormItemData1 { + /** + * application id + */ + appId: number; + data: Array; } + diff --git a/libs/perun/openapi/src/lib/model/inputGetAllResourcesByResourceTag.ts b/libs/perun/openapi/src/lib/model/inputGetAllResourcesByResourceTag.ts index a73c3e990..054ef1c13 100644 --- a/libs/perun/openapi/src/lib/model/inputGetAllResourcesByResourceTag.ts +++ b/libs/perun/openapi/src/lib/model/inputGetAllResourcesByResourceTag.ts @@ -11,13 +11,15 @@ */ import { ResourceTag } from './resourceTag'; + /** * input to getAllResourcesByResourceTag */ -export interface InputGetAllResourcesByResourceTag { - /** - * resource id - */ - resource?: number; - resourceTag: ResourceTag; +export interface InputGetAllResourcesByResourceTag { + /** + * resource id + */ + resource?: number; + resourceTag: ResourceTag; } + diff --git a/libs/perun/openapi/src/lib/model/inputGetMessagesPage.ts b/libs/perun/openapi/src/lib/model/inputGetMessagesPage.ts index fa41176ad..06eb83482 100644 --- a/libs/perun/openapi/src/lib/model/inputGetMessagesPage.ts +++ b/libs/perun/openapi/src/lib/model/inputGetMessagesPage.ts @@ -11,9 +11,11 @@ */ import { AuditMessagesPageQuery } from './auditMessagesPageQuery'; + /** * input to get messages page */ -export interface InputGetMessagesPage { - query: AuditMessagesPageQuery; +export interface InputGetMessagesPage { + query: AuditMessagesPageQuery; } + diff --git a/libs/perun/openapi/src/lib/model/inputGetPaginatedApplications.ts b/libs/perun/openapi/src/lib/model/inputGetPaginatedApplications.ts index 89208e3a1..7b8bdd8a2 100644 --- a/libs/perun/openapi/src/lib/model/inputGetPaginatedApplications.ts +++ b/libs/perun/openapi/src/lib/model/inputGetPaginatedApplications.ts @@ -11,10 +11,12 @@ */ import { ApplicationsPageQuery } from './applicationsPageQuery'; + /** * input to getPaginatedApplications */ -export interface InputGetPaginatedApplications { - vo: number; - query: ApplicationsPageQuery; +export interface InputGetPaginatedApplications { + vo: number; + query: ApplicationsPageQuery; } + diff --git a/libs/perun/openapi/src/lib/model/inputGetPaginatedGroups.ts b/libs/perun/openapi/src/lib/model/inputGetPaginatedGroups.ts index 1287f4f3b..503814dca 100644 --- a/libs/perun/openapi/src/lib/model/inputGetPaginatedGroups.ts +++ b/libs/perun/openapi/src/lib/model/inputGetPaginatedGroups.ts @@ -11,11 +11,13 @@ */ import { GroupsPageQuery } from './groupsPageQuery'; + /** * input to getPaginatedGroups */ -export interface InputGetPaginatedGroups { - vo: number; - attrNames: Array; - query: GroupsPageQuery; +export interface InputGetPaginatedGroups { + vo: number; + attrNames: Array; + query: GroupsPageQuery; } + diff --git a/libs/perun/openapi/src/lib/model/inputGetPaginatedMembers.ts b/libs/perun/openapi/src/lib/model/inputGetPaginatedMembers.ts index 7a7e39042..0b2632d68 100644 --- a/libs/perun/openapi/src/lib/model/inputGetPaginatedMembers.ts +++ b/libs/perun/openapi/src/lib/model/inputGetPaginatedMembers.ts @@ -11,11 +11,13 @@ */ import { MembersPageQuery } from './membersPageQuery'; + /** * input to getPaginatedMembers */ -export interface InputGetPaginatedMembers { - vo: number; - attrNames: Array; - query: MembersPageQuery; +export interface InputGetPaginatedMembers { + vo: number; + attrNames: Array; + query: MembersPageQuery; } + diff --git a/libs/perun/openapi/src/lib/model/inputGetPaginatedSubgroups.ts b/libs/perun/openapi/src/lib/model/inputGetPaginatedSubgroups.ts index 5cf0b3ff2..7c76bb115 100644 --- a/libs/perun/openapi/src/lib/model/inputGetPaginatedSubgroups.ts +++ b/libs/perun/openapi/src/lib/model/inputGetPaginatedSubgroups.ts @@ -11,11 +11,13 @@ */ import { GroupsPageQuery } from './groupsPageQuery'; + /** * input to getSubgroupsPage */ -export interface InputGetPaginatedSubgroups { - group: number; - attrNames: Array; - query: GroupsPageQuery; +export interface InputGetPaginatedSubgroups { + group: number; + attrNames: Array; + query: GroupsPageQuery; } + diff --git a/libs/perun/openapi/src/lib/model/inputGetPaginatedUsers.ts b/libs/perun/openapi/src/lib/model/inputGetPaginatedUsers.ts index 7bf6f81d7..7aa376c63 100644 --- a/libs/perun/openapi/src/lib/model/inputGetPaginatedUsers.ts +++ b/libs/perun/openapi/src/lib/model/inputGetPaginatedUsers.ts @@ -11,10 +11,12 @@ */ import { UsersPageQuery } from './usersPageQuery'; + /** * input to getPaginatedUsers */ -export interface InputGetPaginatedUsers { - attrNames: Array; - query: UsersPageQuery; +export interface InputGetPaginatedUsers { + attrNames: Array; + query: UsersPageQuery; } + diff --git a/libs/perun/openapi/src/lib/model/inputLockPublications.ts b/libs/perun/openapi/src/lib/model/inputLockPublications.ts index 9c6bce44c..89eabd034 100644 --- a/libs/perun/openapi/src/lib/model/inputLockPublications.ts +++ b/libs/perun/openapi/src/lib/model/inputLockPublications.ts @@ -11,10 +11,12 @@ */ import { Publication } from './publication'; + /** * input to lockPublications */ -export interface InputLockPublications { - publications: Array; - lock: boolean; +export interface InputLockPublications { + publications: Array; + lock: boolean; } + diff --git a/libs/perun/openapi/src/lib/model/inputRemoveResourceTagFromResource.ts b/libs/perun/openapi/src/lib/model/inputRemoveResourceTagFromResource.ts index 95ae081e8..c133c7d28 100644 --- a/libs/perun/openapi/src/lib/model/inputRemoveResourceTagFromResource.ts +++ b/libs/perun/openapi/src/lib/model/inputRemoveResourceTagFromResource.ts @@ -11,13 +11,15 @@ */ import { ResourceTag } from './resourceTag'; + /** * input to removeResourceTagFromResource */ -export interface InputRemoveResourceTagFromResource { - /** - * resource id - */ - resource: number; - resourceTag: ResourceTag; +export interface InputRemoveResourceTagFromResource { + /** + * resource id + */ + resource: number; + resourceTag: ResourceTag; } + diff --git a/libs/perun/openapi/src/lib/model/inputSendMessage.ts b/libs/perun/openapi/src/lib/model/inputSendMessage.ts index 7253998ad..e768d5b11 100644 --- a/libs/perun/openapi/src/lib/model/inputSendMessage.ts +++ b/libs/perun/openapi/src/lib/model/inputSendMessage.ts @@ -11,17 +11,19 @@ */ import { MailType } from './mailType'; + /** * input to sendMessage */ -export interface InputSendMessage { - mailType: MailType; - /** - * application id - */ - appId: number; - /** - * you can specify reason for case: mailType == APP_REJECTED_USER - */ - reason?: string; +export interface InputSendMessage { + mailType: MailType; + /** + * application id + */ + appId: number; + /** + * you can specify reason for case: mailType == APP_REJECTED_USER + */ + reason?: string; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetBan.ts b/libs/perun/openapi/src/lib/model/inputSetBan.ts index 44ea248dd..ced958602 100644 --- a/libs/perun/openapi/src/lib/model/inputSetBan.ts +++ b/libs/perun/openapi/src/lib/model/inputSetBan.ts @@ -11,9 +11,11 @@ */ import { BanOnResource } from './banOnResource'; + /** * input to setBan */ -export interface InputSetBan { - banOnResource: BanOnResource; +export interface InputSetBan { + banOnResource: BanOnResource; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetBanForUserOnFacility.ts b/libs/perun/openapi/src/lib/model/inputSetBanForUserOnFacility.ts index ef8254b4a..fd7daeca2 100644 --- a/libs/perun/openapi/src/lib/model/inputSetBanForUserOnFacility.ts +++ b/libs/perun/openapi/src/lib/model/inputSetBanForUserOnFacility.ts @@ -11,9 +11,11 @@ */ import { BanOnFacility } from './banOnFacility'; + /** * input to setBanForUserOnFacility */ -export interface InputSetBanForUserOnFacility { - banOnFacility: BanOnFacility; +export interface InputSetBanForUserOnFacility { + banOnFacility: BanOnFacility; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetFacilityAttribute.ts b/libs/perun/openapi/src/lib/model/inputSetFacilityAttribute.ts index 7bd5a2655..93c6385a2 100644 --- a/libs/perun/openapi/src/lib/model/inputSetFacilityAttribute.ts +++ b/libs/perun/openapi/src/lib/model/inputSetFacilityAttribute.ts @@ -11,13 +11,15 @@ */ import { Attribute } from './attribute'; + /** * input to setFacilityAttribute */ -export interface InputSetFacilityAttribute { - /** - * facility id - */ - facility: number; - attribute: Attribute; +export interface InputSetFacilityAttribute { + /** + * facility id + */ + facility: number; + attribute: Attribute; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetFacilityAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetFacilityAttributes.ts index ace2bfe22..e51d31da2 100644 --- a/libs/perun/openapi/src/lib/model/inputSetFacilityAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetFacilityAttributes.ts @@ -11,13 +11,15 @@ */ import { Attribute } from './attribute'; + /** * input to setFacilityAttributes */ -export interface InputSetFacilityAttributes { - /** - * facility id - */ - facility?: number; - attributes?: Array; +export interface InputSetFacilityAttributes { + /** + * facility id + */ + facility?: number; + attributes?: Array; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetFacilityResourceGroupUserMemberAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetFacilityResourceGroupUserMemberAttributes.ts index 270f1271d..fb3c0abe5 100644 --- a/libs/perun/openapi/src/lib/model/inputSetFacilityResourceGroupUserMemberAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetFacilityResourceGroupUserMemberAttributes.ts @@ -11,29 +11,31 @@ */ import { Attribute } from './attribute'; + /** * input to setFacilityResourceGroupUserMemberAttributes */ -export interface InputSetFacilityResourceGroupUserMemberAttributes { - /** - * facility id - */ - facility: number; - /** - * resource id - */ - resource: number; - /** - * group id - */ - group: number; - /** - * user id - */ - user: number; - /** - * member id - */ - member: number; - attributes: Array; +export interface InputSetFacilityResourceGroupUserMemberAttributes { + /** + * facility id + */ + facility: number; + /** + * resource id + */ + resource: number; + /** + * group id + */ + group: number; + /** + * user id + */ + user: number; + /** + * member id + */ + member: number; + attributes: Array; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetFacilityResourceUserMemberAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetFacilityResourceUserMemberAttributes.ts index 6d9bd8627..a4fc36848 100644 --- a/libs/perun/openapi/src/lib/model/inputSetFacilityResourceUserMemberAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetFacilityResourceUserMemberAttributes.ts @@ -11,25 +11,27 @@ */ import { Attribute } from './attribute'; + /** * input to setFacilityResourceUserMemberAttributes */ -export interface InputSetFacilityResourceUserMemberAttributes { - /** - * facility id - */ - facility?: number; - /** - * resource id - */ - resource?: number; - /** - * user id - */ - user?: number; - /** - * member id - */ - member?: number; - attributes?: Array; +export interface InputSetFacilityResourceUserMemberAttributes { + /** + * facility id + */ + facility?: number; + /** + * resource id + */ + resource?: number; + /** + * user id + */ + user?: number; + /** + * member id + */ + member?: number; + attributes?: Array; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetFacilityUserAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetFacilityUserAttributes.ts index f2f97118b..11626eefc 100644 --- a/libs/perun/openapi/src/lib/model/inputSetFacilityUserAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetFacilityUserAttributes.ts @@ -11,17 +11,19 @@ */ import { Attribute } from './attribute'; + /** * input to setFacilityUserAttributes */ -export interface InputSetFacilityUserAttributes { - /** - * facility id - */ - facility?: number; - /** - * user id - */ - user?: number; - attributes?: Array; +export interface InputSetFacilityUserAttributes { + /** + * facility id + */ + facility?: number; + /** + * user id + */ + user?: number; + attributes?: Array; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetGroupAttribute.ts b/libs/perun/openapi/src/lib/model/inputSetGroupAttribute.ts index d88b8d9f3..d7519f325 100644 --- a/libs/perun/openapi/src/lib/model/inputSetGroupAttribute.ts +++ b/libs/perun/openapi/src/lib/model/inputSetGroupAttribute.ts @@ -11,13 +11,15 @@ */ import { Attribute } from './attribute'; + /** * input to setGroupAttribute */ -export interface InputSetGroupAttribute { - /** - * group id - */ - group: number; - attribute: Attribute; +export interface InputSetGroupAttribute { + /** + * group id + */ + group: number; + attribute: Attribute; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetGroupAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetGroupAttributes.ts index 2a322d64e..780445a9b 100644 --- a/libs/perun/openapi/src/lib/model/inputSetGroupAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetGroupAttributes.ts @@ -11,13 +11,15 @@ */ import { Attribute } from './attribute'; + /** * input to setGroupAttributes */ -export interface InputSetGroupAttributes { - /** - * group id - */ - group: number; - attributes: Array; +export interface InputSetGroupAttributes { + /** + * group id + */ + group: number; + attributes: Array; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetGroupResourceAttribute.ts b/libs/perun/openapi/src/lib/model/inputSetGroupResourceAttribute.ts index 12afe18e3..fa6091b7b 100644 --- a/libs/perun/openapi/src/lib/model/inputSetGroupResourceAttribute.ts +++ b/libs/perun/openapi/src/lib/model/inputSetGroupResourceAttribute.ts @@ -11,17 +11,19 @@ */ import { Attribute } from './attribute'; + /** * input to setGroupResourceAttribute */ -export interface InputSetGroupResourceAttribute { - /** - * group id - */ - group: number; - /** - * resource id - */ - resource: number; - attribute: Attribute; +export interface InputSetGroupResourceAttribute { + /** + * group id + */ + group: number; + /** + * resource id + */ + resource: number; + attribute: Attribute; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetGroupResourceAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetGroupResourceAttributes.ts index 92f92114a..5c1313dff 100644 --- a/libs/perun/openapi/src/lib/model/inputSetGroupResourceAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetGroupResourceAttributes.ts @@ -11,17 +11,19 @@ */ import { Attribute } from './attribute'; + /** * input to setGroupResourceAttributes */ -export interface InputSetGroupResourceAttributes { - /** - * group id - */ - group: number; - /** - * resource id - */ - resource: number; - attributes: Array; +export interface InputSetGroupResourceAttributes { + /** + * group id + */ + group: number; + /** + * resource id + */ + resource: number; + attributes: Array; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetHostAttribute.ts b/libs/perun/openapi/src/lib/model/inputSetHostAttribute.ts index c98a924c2..6dd109856 100644 --- a/libs/perun/openapi/src/lib/model/inputSetHostAttribute.ts +++ b/libs/perun/openapi/src/lib/model/inputSetHostAttribute.ts @@ -11,13 +11,15 @@ */ import { Attribute } from './attribute'; + /** * input to setHostAttribute */ -export interface InputSetHostAttribute { - /** - * host id - */ - host: number; - attribute: Attribute; +export interface InputSetHostAttribute { + /** + * host id + */ + host: number; + attribute: Attribute; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetHostAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetHostAttributes.ts index fa1513a66..ca1353d24 100644 --- a/libs/perun/openapi/src/lib/model/inputSetHostAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetHostAttributes.ts @@ -11,13 +11,15 @@ */ import { Attribute } from './attribute'; + /** * input to setHostAttributes */ -export interface InputSetHostAttributes { - /** - * host id - */ - host: number; - attributes: Array; +export interface InputSetHostAttributes { + /** + * host id + */ + host: number; + attributes: Array; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetMemberAttribute.ts b/libs/perun/openapi/src/lib/model/inputSetMemberAttribute.ts index 13268bfc1..d9f51c613 100644 --- a/libs/perun/openapi/src/lib/model/inputSetMemberAttribute.ts +++ b/libs/perun/openapi/src/lib/model/inputSetMemberAttribute.ts @@ -11,13 +11,15 @@ */ import { Attribute } from './attribute'; + /** * input to setMemberAttribute */ -export interface InputSetMemberAttribute { - /** - * member id - */ - member: number; - attribute: Attribute; +export interface InputSetMemberAttribute { + /** + * member id + */ + member: number; + attribute: Attribute; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetMemberAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetMemberAttributes.ts index 9e6be43c4..ca4b162fe 100644 --- a/libs/perun/openapi/src/lib/model/inputSetMemberAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetMemberAttributes.ts @@ -11,13 +11,15 @@ */ import { Attribute } from './attribute'; + /** * input to setMemberAttributes */ -export interface InputSetMemberAttributes { - /** - * member id - */ - member: number; - attributes: Array; +export interface InputSetMemberAttributes { + /** + * member id + */ + member: number; + attributes: Array; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetMemberGroupAttribute.ts b/libs/perun/openapi/src/lib/model/inputSetMemberGroupAttribute.ts index e7e6c8c5c..9d96855e0 100644 --- a/libs/perun/openapi/src/lib/model/inputSetMemberGroupAttribute.ts +++ b/libs/perun/openapi/src/lib/model/inputSetMemberGroupAttribute.ts @@ -11,17 +11,19 @@ */ import { Attribute } from './attribute'; + /** * input to setMemberGroupAttribute */ -export interface InputSetMemberGroupAttribute { - /** - * member id - */ - member: number; - /** - * group id - */ - group: number; - attribute: Attribute; +export interface InputSetMemberGroupAttribute { + /** + * member id + */ + member: number; + /** + * group id + */ + group: number; + attribute: Attribute; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetMemberGroupAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetMemberGroupAttributes.ts index 9dfd1e310..716bc961c 100644 --- a/libs/perun/openapi/src/lib/model/inputSetMemberGroupAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetMemberGroupAttributes.ts @@ -11,17 +11,19 @@ */ import { Attribute } from './attribute'; + /** * input to setMemberGroupAttributes */ -export interface InputSetMemberGroupAttributes { - /** - * member id - */ - member: number; - /** - * group id - */ - group: number; - attributes: Array; +export interface InputSetMemberGroupAttributes { + /** + * member id + */ + member: number; + /** + * group id + */ + group: number; + attributes: Array; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetMemberGroupWithUserAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetMemberGroupWithUserAttributes.ts index b67206633..4a7451eda 100644 --- a/libs/perun/openapi/src/lib/model/inputSetMemberGroupWithUserAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetMemberGroupWithUserAttributes.ts @@ -11,18 +11,20 @@ */ import { Attribute } from './attribute'; + /** * input to setMemberGroupWithUserAttributes */ -export interface InputSetMemberGroupWithUserAttributes { - /** - * member id - */ - member: number; - /** - * group id - */ - group: number; - attributes: Array; - workWithUserAttributes: boolean; +export interface InputSetMemberGroupWithUserAttributes { + /** + * member id + */ + member: number; + /** + * group id + */ + group: number; + attributes: Array; + workWithUserAttributes: boolean; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetMemberResourceAndUserAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetMemberResourceAndUserAttributes.ts index f7d849be2..f5f51f782 100644 --- a/libs/perun/openapi/src/lib/model/inputSetMemberResourceAndUserAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetMemberResourceAndUserAttributes.ts @@ -11,18 +11,20 @@ */ import { Attribute } from './attribute'; + /** * input to setMemberResourceAndUserAttributes */ -export interface InputSetMemberResourceAndUserAttributes { - /** - * member id - */ - member: number; - /** - * resource id - */ - resource: number; - attributes: Array; - workWithUserAttributes: boolean; +export interface InputSetMemberResourceAndUserAttributes { + /** + * member id + */ + member: number; + /** + * resource id + */ + resource: number; + attributes: Array; + workWithUserAttributes: boolean; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetMemberResourceAttribute.ts b/libs/perun/openapi/src/lib/model/inputSetMemberResourceAttribute.ts index 25fe0882f..52ff89b2c 100644 --- a/libs/perun/openapi/src/lib/model/inputSetMemberResourceAttribute.ts +++ b/libs/perun/openapi/src/lib/model/inputSetMemberResourceAttribute.ts @@ -11,17 +11,19 @@ */ import { Attribute } from './attribute'; + /** * input to setMemberResourceAttribute */ -export interface InputSetMemberResourceAttribute { - /** - * member id - */ - member: number; - /** - * resource id - */ - resource: number; - attribute: Attribute; +export interface InputSetMemberResourceAttribute { + /** + * member id + */ + member: number; + /** + * resource id + */ + resource: number; + attribute: Attribute; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetMemberResourceAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetMemberResourceAttributes.ts index 98491dcbe..7e66703e7 100644 --- a/libs/perun/openapi/src/lib/model/inputSetMemberResourceAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetMemberResourceAttributes.ts @@ -11,17 +11,19 @@ */ import { Attribute } from './attribute'; + /** * input to setMemberResourceAttributes */ -export interface InputSetMemberResourceAttributes { - /** - * member id - */ - member: number; - /** - * resource id - */ - resource: number; - attributes: Array; +export interface InputSetMemberResourceAttributes { + /** + * member id + */ + member: number; + /** + * resource id + */ + resource: number; + attributes: Array; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetMemberWithUserAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetMemberWithUserAttributes.ts index 4956bb814..81bf3c2d3 100644 --- a/libs/perun/openapi/src/lib/model/inputSetMemberWithUserAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetMemberWithUserAttributes.ts @@ -11,14 +11,16 @@ */ import { Attribute } from './attribute'; + /** * input to setMemberWithUserAttributes */ -export interface InputSetMemberWithUserAttributes { - /** - * member id - */ - member: number; - attributes: Array; - workWithUserAttributes: boolean; +export interface InputSetMemberWithUserAttributes { + /** + * member id + */ + member: number; + attributes: Array; + workWithUserAttributes: boolean; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetResourceAttribute.ts b/libs/perun/openapi/src/lib/model/inputSetResourceAttribute.ts index d56ed02ca..c45d13904 100644 --- a/libs/perun/openapi/src/lib/model/inputSetResourceAttribute.ts +++ b/libs/perun/openapi/src/lib/model/inputSetResourceAttribute.ts @@ -11,13 +11,15 @@ */ import { Attribute } from './attribute'; + /** * input to setResourceAttribute */ -export interface InputSetResourceAttribute { - /** - * resource id - */ - resource: number; - attribute: Attribute; +export interface InputSetResourceAttribute { + /** + * resource id + */ + resource: number; + attribute: Attribute; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetResourceAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetResourceAttributes.ts index 896f6557c..52a58cfdf 100644 --- a/libs/perun/openapi/src/lib/model/inputSetResourceAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetResourceAttributes.ts @@ -11,13 +11,15 @@ */ import { Attribute } from './attribute'; + /** * input to setResourceAttributes */ -export interface InputSetResourceAttributes { - /** - * resource id - */ - resource: number; - attributes: Array; +export interface InputSetResourceAttributes { + /** + * resource id + */ + resource: number; + attributes: Array; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetResourceGroupAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetResourceGroupAttributes.ts index 5087ebaa3..e152d4ddc 100644 --- a/libs/perun/openapi/src/lib/model/inputSetResourceGroupAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetResourceGroupAttributes.ts @@ -11,17 +11,19 @@ */ import { Attribute } from './attribute'; + /** * input to setResourceGroupAttributes */ -export interface InputSetResourceGroupAttributes { - /** - * resource id - */ - resource: number; - /** - * group id - */ - group: number; - attributes: Array; +export interface InputSetResourceGroupAttributes { + /** + * resource id + */ + resource: number; + /** + * group id + */ + group: number; + attributes: Array; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetResourceGroupWithGroupAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetResourceGroupWithGroupAttributes.ts index f43cb58cf..a40f34914 100644 --- a/libs/perun/openapi/src/lib/model/inputSetResourceGroupWithGroupAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetResourceGroupWithGroupAttributes.ts @@ -11,18 +11,20 @@ */ import { Attribute } from './attribute'; + /** * input to setResourceGroupWithGroupAttributes */ -export interface InputSetResourceGroupWithGroupAttributes { - /** - * resource id - */ - resource: number; - /** - * group id - */ - group: number; - attributes: Array; - workWithGroupAttributes: boolean; +export interface InputSetResourceGroupWithGroupAttributes { + /** + * resource id + */ + resource: number; + /** + * group id + */ + group: number; + attributes: Array; + workWithGroupAttributes: boolean; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetSendingEnabled.ts b/libs/perun/openapi/src/lib/model/inputSetSendingEnabled.ts index 3b4659814..4df1660da 100644 --- a/libs/perun/openapi/src/lib/model/inputSetSendingEnabled.ts +++ b/libs/perun/openapi/src/lib/model/inputSetSendingEnabled.ts @@ -11,10 +11,12 @@ */ import { ApplicationMail } from './applicationMail'; + /** * input to setSendingEnabled */ -export interface InputSetSendingEnabled { - mails: Array; - enabled: boolean; +export interface InputSetSendingEnabled { + mails: Array; + enabled: boolean; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetSponsoredMember.ts b/libs/perun/openapi/src/lib/model/inputSetSponsoredMember.ts index ab6cc7d5b..44ae7b57e 100644 --- a/libs/perun/openapi/src/lib/model/inputSetSponsoredMember.ts +++ b/libs/perun/openapi/src/lib/model/inputSetSponsoredMember.ts @@ -10,14 +10,16 @@ * Do not edit the class manually. */ + /** * input for setSponsoredMember */ -export interface InputSetSponsoredMember { - userToBeSponsored: number; - password: string; - vo: number; - sponsor?: number; - namespace: string; - validityTo?: string; +export interface InputSetSponsoredMember { + userToBeSponsored: number; + password: string; + vo: number; + sponsor?: number; + namespace: string; + validityTo?: string; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetUserAttribute.ts b/libs/perun/openapi/src/lib/model/inputSetUserAttribute.ts index c9af1143f..c8f74e462 100644 --- a/libs/perun/openapi/src/lib/model/inputSetUserAttribute.ts +++ b/libs/perun/openapi/src/lib/model/inputSetUserAttribute.ts @@ -11,13 +11,15 @@ */ import { Attribute } from './attribute'; + /** * input to setUserAttribute */ -export interface InputSetUserAttribute { - /** - * user id - */ - user: number; - attribute: Attribute; +export interface InputSetUserAttribute { + /** + * user id + */ + user: number; + attribute: Attribute; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetUserAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetUserAttributes.ts index 65b08a735..5b3094807 100644 --- a/libs/perun/openapi/src/lib/model/inputSetUserAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetUserAttributes.ts @@ -11,13 +11,15 @@ */ import { Attribute } from './attribute'; + /** * input to setUserAttributes */ -export interface InputSetUserAttributes { - /** - * user id - */ - user: number; - attributes: Array; +export interface InputSetUserAttributes { + /** + * user id + */ + user: number; + attributes: Array; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetUserExtSourceAttribute.ts b/libs/perun/openapi/src/lib/model/inputSetUserExtSourceAttribute.ts index fc65be09a..7dfea29a9 100644 --- a/libs/perun/openapi/src/lib/model/inputSetUserExtSourceAttribute.ts +++ b/libs/perun/openapi/src/lib/model/inputSetUserExtSourceAttribute.ts @@ -11,13 +11,15 @@ */ import { Attribute } from './attribute'; + /** * input to setUserExtSourceAttribute */ -export interface InputSetUserExtSourceAttribute { - /** - * userExtSource id - */ - userExtSource: number; - attribute: Attribute; +export interface InputSetUserExtSourceAttribute { + /** + * userExtSource id + */ + userExtSource: number; + attribute: Attribute; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetUserExtSourceAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetUserExtSourceAttributes.ts index ef70e6325..ad80db720 100644 --- a/libs/perun/openapi/src/lib/model/inputSetUserExtSourceAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetUserExtSourceAttributes.ts @@ -11,13 +11,15 @@ */ import { Attribute } from './attribute'; + /** * input to setUserExtSourceAttributes */ -export interface InputSetUserExtSourceAttributes { - /** - * userExtSource id - */ - userExtSource: number; - attributes: Array; +export interface InputSetUserExtSourceAttributes { + /** + * userExtSource id + */ + userExtSource: number; + attributes: Array; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetUserFacilityAttribute.ts b/libs/perun/openapi/src/lib/model/inputSetUserFacilityAttribute.ts index 34310cde6..f89cb0ca6 100644 --- a/libs/perun/openapi/src/lib/model/inputSetUserFacilityAttribute.ts +++ b/libs/perun/openapi/src/lib/model/inputSetUserFacilityAttribute.ts @@ -11,17 +11,19 @@ */ import { Attribute } from './attribute'; + /** * input to setUserFacilityAttribute */ -export interface InputSetUserFacilityAttribute { - /** - * user id - */ - user: number; - /** - * facility id - */ - facility: number; - attribute: Attribute; +export interface InputSetUserFacilityAttribute { + /** + * user id + */ + user: number; + /** + * facility id + */ + facility: number; + attribute: Attribute; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetUserFacilityAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetUserFacilityAttributes.ts index e2a647937..689b866fe 100644 --- a/libs/perun/openapi/src/lib/model/inputSetUserFacilityAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetUserFacilityAttributes.ts @@ -11,17 +11,19 @@ */ import { Attribute } from './attribute'; + /** * input to setUserFacilityAttributes */ -export interface InputSetUserFacilityAttributes { - /** - * user id - */ - user: number; - /** - * facility id - */ - facility: number; - attributes: Array; +export interface InputSetUserFacilityAttributes { + /** + * user id + */ + user: number; + /** + * facility id + */ + facility: number; + attributes: Array; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetVoAttribute.ts b/libs/perun/openapi/src/lib/model/inputSetVoAttribute.ts index d4252ce5c..2a23dc153 100644 --- a/libs/perun/openapi/src/lib/model/inputSetVoAttribute.ts +++ b/libs/perun/openapi/src/lib/model/inputSetVoAttribute.ts @@ -11,13 +11,15 @@ */ import { Attribute } from './attribute'; + /** * input to setVoAttribute */ -export interface InputSetVoAttribute { - /** - * vo id - */ - vo: number; - attribute: Attribute; +export interface InputSetVoAttribute { + /** + * vo id + */ + vo: number; + attribute: Attribute; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetVoAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetVoAttributes.ts index 0647aa6fa..22ecf09f9 100644 --- a/libs/perun/openapi/src/lib/model/inputSetVoAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetVoAttributes.ts @@ -11,13 +11,15 @@ */ import { Attribute } from './attribute'; + /** * input to setVoAttributes */ -export interface InputSetVoAttributes { - /** - * vo id - */ - vo?: number; - attributes?: Array; +export interface InputSetVoAttributes { + /** + * vo id + */ + vo?: number; + attributes?: Array; } + diff --git a/libs/perun/openapi/src/lib/model/inputSetVoBan.ts b/libs/perun/openapi/src/lib/model/inputSetVoBan.ts index 4fd1afc82..da9d64da6 100644 --- a/libs/perun/openapi/src/lib/model/inputSetVoBan.ts +++ b/libs/perun/openapi/src/lib/model/inputSetVoBan.ts @@ -11,9 +11,11 @@ */ import { BanOnVo } from './banOnVo'; + /** * input to set vo ban */ -export interface InputSetVoBan { - banOnVo: BanOnVo; +export interface InputSetVoBan { + banOnVo: BanOnVo; } + diff --git a/libs/perun/openapi/src/lib/model/inputSpecificMember.ts b/libs/perun/openapi/src/lib/model/inputSpecificMember.ts index b6f040327..b708f4ab3 100644 --- a/libs/perun/openapi/src/lib/model/inputSpecificMember.ts +++ b/libs/perun/openapi/src/lib/model/inputSpecificMember.ts @@ -12,12 +12,14 @@ import { Candidate } from './candidate'; import { User } from './user'; + /** * input to createSpecificMember */ -export interface InputSpecificMember { - candidate: Candidate; - vo: number; - specificUserType: string; - specificUserOwners: Array; +export interface InputSpecificMember { + candidate: Candidate; + vo: number; + specificUserType: string; + specificUserOwners: Array; } + diff --git a/libs/perun/openapi/src/lib/model/inputSubmitApplication.ts b/libs/perun/openapi/src/lib/model/inputSubmitApplication.ts index cc633f47e..f8ab2f173 100644 --- a/libs/perun/openapi/src/lib/model/inputSubmitApplication.ts +++ b/libs/perun/openapi/src/lib/model/inputSubmitApplication.ts @@ -12,10 +12,12 @@ import { ApplicationFormItemData } from './applicationFormItemData'; import { Application } from './application'; + /** * input to submitApplication */ -export interface InputSubmitApplication { - app: Application; - data: Array; +export interface InputSubmitApplication { + app: Application; + data: Array; } + diff --git a/libs/perun/openapi/src/lib/model/inputUpdateApplicationMail.ts b/libs/perun/openapi/src/lib/model/inputUpdateApplicationMail.ts index 39d7c518d..886faa667 100644 --- a/libs/perun/openapi/src/lib/model/inputUpdateApplicationMail.ts +++ b/libs/perun/openapi/src/lib/model/inputUpdateApplicationMail.ts @@ -11,9 +11,11 @@ */ import { ApplicationMail } from './applicationMail'; + /** * input to updateApplicationMail */ -export interface InputUpdateApplicationMail { - mail: ApplicationMail; +export interface InputUpdateApplicationMail { + mail: ApplicationMail; } + diff --git a/libs/perun/openapi/src/lib/model/inputUpdateBan.ts b/libs/perun/openapi/src/lib/model/inputUpdateBan.ts index 66ed0fddd..42f0fd934 100644 --- a/libs/perun/openapi/src/lib/model/inputUpdateBan.ts +++ b/libs/perun/openapi/src/lib/model/inputUpdateBan.ts @@ -11,9 +11,11 @@ */ import { BanOnResource } from './banOnResource'; + /** * input to updateBan */ -export interface InputUpdateBan { - banOnResource: BanOnResource; +export interface InputUpdateBan { + banOnResource: BanOnResource; } + diff --git a/libs/perun/openapi/src/lib/model/inputUpdateBanForFacility.ts b/libs/perun/openapi/src/lib/model/inputUpdateBanForFacility.ts index db622bb99..3c7be2475 100644 --- a/libs/perun/openapi/src/lib/model/inputUpdateBanForFacility.ts +++ b/libs/perun/openapi/src/lib/model/inputUpdateBanForFacility.ts @@ -11,9 +11,11 @@ */ import { BanOnFacility } from './banOnFacility'; + /** * input to updateBanForFacility */ -export interface InputUpdateBanForFacility { - banOnFacility: BanOnFacility; +export interface InputUpdateBanForFacility { + banOnFacility: BanOnFacility; } + diff --git a/libs/perun/openapi/src/lib/model/inputUpdateCategory.ts b/libs/perun/openapi/src/lib/model/inputUpdateCategory.ts index b6e64c5fc..ebb032fe5 100644 --- a/libs/perun/openapi/src/lib/model/inputUpdateCategory.ts +++ b/libs/perun/openapi/src/lib/model/inputUpdateCategory.ts @@ -11,9 +11,11 @@ */ import { Category } from './category'; + /** * input to updateCategory */ -export interface InputUpdateCategory { - category: Category; +export interface InputUpdateCategory { + category: Category; } + diff --git a/libs/perun/openapi/src/lib/model/inputUpdateFacility.ts b/libs/perun/openapi/src/lib/model/inputUpdateFacility.ts index 7b1986070..a68e27103 100644 --- a/libs/perun/openapi/src/lib/model/inputUpdateFacility.ts +++ b/libs/perun/openapi/src/lib/model/inputUpdateFacility.ts @@ -11,9 +11,11 @@ */ import { Facility } from './facility'; + /** * input to updateFacility */ -export interface InputUpdateFacility { - facility: Facility; +export interface InputUpdateFacility { + facility: Facility; } + diff --git a/libs/perun/openapi/src/lib/model/inputUpdateForm.ts b/libs/perun/openapi/src/lib/model/inputUpdateForm.ts index a48d5c81e..2cb7afa10 100644 --- a/libs/perun/openapi/src/lib/model/inputUpdateForm.ts +++ b/libs/perun/openapi/src/lib/model/inputUpdateForm.ts @@ -11,9 +11,11 @@ */ import { ApplicationForm } from './applicationForm'; + /** * input to updateForm */ -export interface InputUpdateForm { - form?: ApplicationForm; +export interface InputUpdateForm { + form?: ApplicationForm; } + diff --git a/libs/perun/openapi/src/lib/model/inputUpdateFormItemsForGroup.ts b/libs/perun/openapi/src/lib/model/inputUpdateFormItemsForGroup.ts index 0104f6011..e2c8fe45c 100644 --- a/libs/perun/openapi/src/lib/model/inputUpdateFormItemsForGroup.ts +++ b/libs/perun/openapi/src/lib/model/inputUpdateFormItemsForGroup.ts @@ -11,13 +11,15 @@ */ import { ApplicationFormItem } from './applicationFormItem'; + /** * input to updateFormItemsForGroup */ -export interface InputUpdateFormItemsForGroup { - /** - * group id - */ - group?: number; - items?: Array; +export interface InputUpdateFormItemsForGroup { + /** + * group id + */ + group?: number; + items?: Array; } + diff --git a/libs/perun/openapi/src/lib/model/inputUpdateFormItemsForVo.ts b/libs/perun/openapi/src/lib/model/inputUpdateFormItemsForVo.ts index ee9d4f3a5..62c20c4d9 100644 --- a/libs/perun/openapi/src/lib/model/inputUpdateFormItemsForVo.ts +++ b/libs/perun/openapi/src/lib/model/inputUpdateFormItemsForVo.ts @@ -11,13 +11,15 @@ */ import { ApplicationFormItem } from './applicationFormItem'; + /** * input to updateFormItemsForVo */ -export interface InputUpdateFormItemsForVo { - /** - * vo id - */ - vo?: number; - items?: Array; +export interface InputUpdateFormItemsForVo { + /** + * vo id + */ + vo?: number; + items?: Array; } + diff --git a/libs/perun/openapi/src/lib/model/inputUpdateGroup.ts b/libs/perun/openapi/src/lib/model/inputUpdateGroup.ts index 46df42302..c9d9364cc 100644 --- a/libs/perun/openapi/src/lib/model/inputUpdateGroup.ts +++ b/libs/perun/openapi/src/lib/model/inputUpdateGroup.ts @@ -11,9 +11,11 @@ */ import { Group } from './group'; + /** * input to updateGroup */ -export interface InputUpdateGroup { - group: Group; +export interface InputUpdateGroup { + group: Group; } + diff --git a/libs/perun/openapi/src/lib/model/inputUpdatePublication.ts b/libs/perun/openapi/src/lib/model/inputUpdatePublication.ts index 9b90a41db..e43ef62d2 100644 --- a/libs/perun/openapi/src/lib/model/inputUpdatePublication.ts +++ b/libs/perun/openapi/src/lib/model/inputUpdatePublication.ts @@ -11,9 +11,11 @@ */ import { Publication } from './publication'; + /** * input to updatePublication */ -export interface InputUpdatePublication { - publication: Publication; +export interface InputUpdatePublication { + publication: Publication; } + diff --git a/libs/perun/openapi/src/lib/model/inputUpdatePublicationSystem.ts b/libs/perun/openapi/src/lib/model/inputUpdatePublicationSystem.ts index ec23d78c4..6e4aaa3a6 100644 --- a/libs/perun/openapi/src/lib/model/inputUpdatePublicationSystem.ts +++ b/libs/perun/openapi/src/lib/model/inputUpdatePublicationSystem.ts @@ -11,9 +11,11 @@ */ import { PublicationSystem } from './publicationSystem'; + /** * input to updatePublicationSystem */ -export interface InputUpdatePublicationSystem { - pubsys: PublicationSystem; +export interface InputUpdatePublicationSystem { + pubsys: PublicationSystem; } + diff --git a/libs/perun/openapi/src/lib/model/inputUpdateResource.ts b/libs/perun/openapi/src/lib/model/inputUpdateResource.ts index bcceacfdb..c127b7da1 100644 --- a/libs/perun/openapi/src/lib/model/inputUpdateResource.ts +++ b/libs/perun/openapi/src/lib/model/inputUpdateResource.ts @@ -11,9 +11,11 @@ */ import { Resource } from './resource'; + /** * input to updateResource */ -export interface InputUpdateResource { - resource: Resource; +export interface InputUpdateResource { + resource: Resource; } + diff --git a/libs/perun/openapi/src/lib/model/inputUpdateResourceTag.ts b/libs/perun/openapi/src/lib/model/inputUpdateResourceTag.ts index c6c893159..64287879f 100644 --- a/libs/perun/openapi/src/lib/model/inputUpdateResourceTag.ts +++ b/libs/perun/openapi/src/lib/model/inputUpdateResourceTag.ts @@ -11,9 +11,11 @@ */ import { ResourceTag } from './resourceTag'; + /** * input to updateResourceTag */ -export interface InputUpdateResourceTag { - resourceTag: ResourceTag; +export interface InputUpdateResourceTag { + resourceTag: ResourceTag; } + diff --git a/libs/perun/openapi/src/lib/model/inputUpdateService.ts b/libs/perun/openapi/src/lib/model/inputUpdateService.ts index 238ea79a6..7e8007bd4 100644 --- a/libs/perun/openapi/src/lib/model/inputUpdateService.ts +++ b/libs/perun/openapi/src/lib/model/inputUpdateService.ts @@ -11,9 +11,11 @@ */ import { Service } from './service'; + /** * input to updateService */ -export interface InputUpdateService { - service: Service; +export interface InputUpdateService { + service: Service; } + diff --git a/libs/perun/openapi/src/lib/model/inputUpdateServicesPackage.ts b/libs/perun/openapi/src/lib/model/inputUpdateServicesPackage.ts index bbf03eda5..f70f94deb 100644 --- a/libs/perun/openapi/src/lib/model/inputUpdateServicesPackage.ts +++ b/libs/perun/openapi/src/lib/model/inputUpdateServicesPackage.ts @@ -11,9 +11,11 @@ */ import { ServicesPackage } from './servicesPackage'; + /** * Input to updateServicesPackage */ -export interface InputUpdateServicesPackage { - servicesPackage: ServicesPackage; +export interface InputUpdateServicesPackage { + servicesPackage: ServicesPackage; } + diff --git a/libs/perun/openapi/src/lib/model/inputUpdateUser.ts b/libs/perun/openapi/src/lib/model/inputUpdateUser.ts index 5c9e5421b..e9c51a232 100644 --- a/libs/perun/openapi/src/lib/model/inputUpdateUser.ts +++ b/libs/perun/openapi/src/lib/model/inputUpdateUser.ts @@ -11,9 +11,11 @@ */ import { User } from './user'; + /** * input to updateUser */ -export interface InputUpdateUser { - user: User; +export interface InputUpdateUser { + user: User; } + diff --git a/libs/perun/openapi/src/lib/model/inputUpdateVo.ts b/libs/perun/openapi/src/lib/model/inputUpdateVo.ts index a40d155f9..32ee5bf03 100644 --- a/libs/perun/openapi/src/lib/model/inputUpdateVo.ts +++ b/libs/perun/openapi/src/lib/model/inputUpdateVo.ts @@ -11,9 +11,11 @@ */ import { Vo } from './vo'; + /** * input to updateVo */ -export interface InputUpdateVo { - vo: Vo; +export interface InputUpdateVo { + vo: Vo; } + diff --git a/libs/perun/openapi/src/lib/model/itemTexts.ts b/libs/perun/openapi/src/lib/model/itemTexts.ts index 9b0d27041..92cc1e5d1 100644 --- a/libs/perun/openapi/src/lib/model/itemTexts.ts +++ b/libs/perun/openapi/src/lib/model/itemTexts.ts @@ -10,10 +10,12 @@ * Do not edit the class manually. */ -export interface ItemTexts { - locale?: string; - label?: string; - options?: string; - help?: string; - errorMessage?: string; + +export interface ItemTexts { + locale?: string; + label?: string; + options?: string; + help?: string; + errorMessage?: string; } + diff --git a/libs/perun/openapi/src/lib/model/mailText.ts b/libs/perun/openapi/src/lib/model/mailText.ts index 84474f787..2de30b5b7 100644 --- a/libs/perun/openapi/src/lib/model/mailText.ts +++ b/libs/perun/openapi/src/lib/model/mailText.ts @@ -10,8 +10,10 @@ * Do not edit the class manually. */ -export interface MailText { - locale?: string; - subject?: string; - text?: string; + +export interface MailText { + locale?: string; + subject?: string; + text?: string; } + diff --git a/libs/perun/openapi/src/lib/model/mailType.ts b/libs/perun/openapi/src/lib/model/mailType.ts index 7ff132405..220053ffb 100644 --- a/libs/perun/openapi/src/lib/model/mailType.ts +++ b/libs/perun/openapi/src/lib/model/mailType.ts @@ -10,23 +10,17 @@ * Do not edit the class manually. */ -export type MailType = - | 'APP_CREATED_USER' - | 'APPROVABLE_GROUP_APP_USER' - | 'APP_CREATED_VO_ADMIN' - | 'MAIL_VALIDATION' - | 'APP_APPROVED_USER' - | 'APP_REJECTED_USER' - | 'APP_ERROR_VO_ADMIN' - | 'USER_INVITE'; + +export type MailType = 'APP_CREATED_USER' | 'APPROVABLE_GROUP_APP_USER' | 'APP_CREATED_VO_ADMIN' | 'MAIL_VALIDATION' | 'APP_APPROVED_USER' | 'APP_REJECTED_USER' | 'APP_ERROR_VO_ADMIN' | 'USER_INVITE'; export const MailType = { - APPCREATEDUSER: 'APP_CREATED_USER' as MailType, - APPROVABLEGROUPAPPUSER: 'APPROVABLE_GROUP_APP_USER' as MailType, - APPCREATEDVOADMIN: 'APP_CREATED_VO_ADMIN' as MailType, - MAILVALIDATION: 'MAIL_VALIDATION' as MailType, - APPAPPROVEDUSER: 'APP_APPROVED_USER' as MailType, - APPREJECTEDUSER: 'APP_REJECTED_USER' as MailType, - APPERRORVOADMIN: 'APP_ERROR_VO_ADMIN' as MailType, - USERINVITE: 'USER_INVITE' as MailType, + APPCREATEDUSER: 'APP_CREATED_USER' as MailType, + APPROVABLEGROUPAPPUSER: 'APPROVABLE_GROUP_APP_USER' as MailType, + APPCREATEDVOADMIN: 'APP_CREATED_VO_ADMIN' as MailType, + MAILVALIDATION: 'MAIL_VALIDATION' as MailType, + APPAPPROVEDUSER: 'APP_APPROVED_USER' as MailType, + APPREJECTEDUSER: 'APP_REJECTED_USER' as MailType, + APPERRORVOADMIN: 'APP_ERROR_VO_ADMIN' as MailType, + USERINVITE: 'USER_INVITE' as MailType }; + diff --git a/libs/perun/openapi/src/lib/model/member.ts b/libs/perun/openapi/src/lib/model/member.ts index fb431551a..7475cbae8 100644 --- a/libs/perun/openapi/src/lib/model/member.ts +++ b/libs/perun/openapi/src/lib/model/member.ts @@ -11,13 +11,15 @@ */ import { Auditable } from './auditable'; -export interface Member extends Auditable { - userId?: number; - voId?: number; - status?: string; - membershipType?: string; - sourceGroupId?: number | null; - sponsored?: boolean; - groupStatus?: string; - groupStatuses?: { [key: string]: string }; + +export interface Member extends Auditable { + userId?: number; + voId?: number; + status?: string; + membershipType?: string; + sourceGroupId?: number | null; + sponsored?: boolean; + groupStatus?: string; + groupStatuses?: { [key: string]: string; }; } + diff --git a/libs/perun/openapi/src/lib/model/memberCandidate.ts b/libs/perun/openapi/src/lib/model/memberCandidate.ts index a1b911b83..0b6df396b 100644 --- a/libs/perun/openapi/src/lib/model/memberCandidate.ts +++ b/libs/perun/openapi/src/lib/model/memberCandidate.ts @@ -13,8 +13,10 @@ import { Candidate } from './candidate'; import { RichUser } from './richUser'; import { Member } from './member'; -export interface MemberCandidate { - candidate?: Candidate; - member?: Member; - richUser?: RichUser; + +export interface MemberCandidate { + candidate?: Candidate; + member?: Member; + richUser?: RichUser; } + diff --git a/libs/perun/openapi/src/lib/model/memberGroupStatus.ts b/libs/perun/openapi/src/lib/model/memberGroupStatus.ts index 5bbe2784a..829617d4b 100644 --- a/libs/perun/openapi/src/lib/model/memberGroupStatus.ts +++ b/libs/perun/openapi/src/lib/model/memberGroupStatus.ts @@ -10,12 +10,14 @@ * Do not edit the class manually. */ + /** * statuses of a member in a group */ export type MemberGroupStatus = 'VALID' | 'EXPIRED'; export const MemberGroupStatus = { - VALID: 'VALID' as MemberGroupStatus, - EXPIRED: 'EXPIRED' as MemberGroupStatus, + VALID: 'VALID' as MemberGroupStatus, + EXPIRED: 'EXPIRED' as MemberGroupStatus }; + diff --git a/libs/perun/openapi/src/lib/model/memberWithSponsors.ts b/libs/perun/openapi/src/lib/model/memberWithSponsors.ts index 95aa63e35..dd5ccf7fc 100644 --- a/libs/perun/openapi/src/lib/model/memberWithSponsors.ts +++ b/libs/perun/openapi/src/lib/model/memberWithSponsors.ts @@ -12,7 +12,9 @@ import { Sponsor } from './sponsor'; import { RichMember } from './richMember'; -export interface MemberWithSponsors { - member?: RichMember; - sponsors?: Array; + +export interface MemberWithSponsors { + member?: RichMember; + sponsors?: Array; } + diff --git a/libs/perun/openapi/src/lib/model/membersOrderColumn.ts b/libs/perun/openapi/src/lib/model/membersOrderColumn.ts index c6ba04e91..f0154783d 100644 --- a/libs/perun/openapi/src/lib/model/membersOrderColumn.ts +++ b/libs/perun/openapi/src/lib/model/membersOrderColumn.ts @@ -10,9 +10,11 @@ * Do not edit the class manually. */ + export type MembersOrderColumn = 'ID' | 'NAME'; export const MembersOrderColumn = { - ID: 'ID' as MembersOrderColumn, - NAME: 'NAME' as MembersOrderColumn, + ID: 'ID' as MembersOrderColumn, + NAME: 'NAME' as MembersOrderColumn }; + diff --git a/libs/perun/openapi/src/lib/model/membersPageQuery.ts b/libs/perun/openapi/src/lib/model/membersPageQuery.ts index 2f9bb45d3..24c123fa4 100644 --- a/libs/perun/openapi/src/lib/model/membersPageQuery.ts +++ b/libs/perun/openapi/src/lib/model/membersPageQuery.ts @@ -14,13 +14,15 @@ import { VoMemberStatuses } from './voMemberStatuses'; import { SortingOrder } from './sortingOrder'; import { MemberGroupStatus } from './memberGroupStatus'; -export interface MembersPageQuery { - pageSize: number; - offset: number; - order: SortingOrder; - sortColumn: MembersOrderColumn; - searchString?: string; - statuses?: Array; - groupId?: number; - groupStatuses?: Array; + +export interface MembersPageQuery { + pageSize: number; + offset: number; + order: SortingOrder; + sortColumn: MembersOrderColumn; + searchString?: string; + statuses?: Array; + groupId?: number; + groupStatuses?: Array; } + diff --git a/libs/perun/openapi/src/lib/model/models.ts b/libs/perun/openapi/src/lib/model/models.ts index cc66d6ae5..b8c4bb2ac 100644 --- a/libs/perun/openapi/src/lib/model/models.ts +++ b/libs/perun/openapi/src/lib/model/models.ts @@ -166,8 +166,8 @@ export * from './membersPageQuery'; export * from './namespaceRules'; export * from './newApps'; export * from './owner'; -export * from './paginatedApplications'; export * from './paginatedAuditMessages'; +export * from './paginatedRichApplications'; export * from './paginatedRichGroups'; export * from './paginatedRichMembers'; export * from './paginatedRichUsers'; @@ -183,6 +183,7 @@ export * from './rTMessage'; export * from './resource'; export * from './resourceState'; export * from './resourceTag'; +export * from './richApplication'; export * from './richDestination'; export * from './richFacility'; export * from './richGroup'; diff --git a/libs/perun/openapi/src/lib/model/namespaceRules.ts b/libs/perun/openapi/src/lib/model/namespaceRules.ts index 28668899d..643074177 100644 --- a/libs/perun/openapi/src/lib/model/namespaceRules.ts +++ b/libs/perun/openapi/src/lib/model/namespaceRules.ts @@ -10,12 +10,14 @@ * Do not edit the class manually. */ -export interface NamespaceRules { - defaultEmail?: string; - csvGenHeader?: string; - csvGenPlaceholder?: string; - csvGenHeaderDescription?: string; - namespaceName: string; - requiredAttributes?: Array; - optionalAttributes?: Array; + +export interface NamespaceRules { + defaultEmail?: string; + csvGenHeader?: string; + csvGenPlaceholder?: string; + csvGenHeaderDescription?: string; + namespaceName: string; + requiredAttributes?: Array; + optionalAttributes?: Array; } + diff --git a/libs/perun/openapi/src/lib/model/newApps.ts b/libs/perun/openapi/src/lib/model/newApps.ts index cf4ed3c8f..961763e0c 100644 --- a/libs/perun/openapi/src/lib/model/newApps.ts +++ b/libs/perun/openapi/src/lib/model/newApps.ts @@ -10,9 +10,11 @@ * Do not edit the class manually. */ -export interface NewApps { - admin?: string; - profile?: string; - pwdReset?: string; - publications?: string; + +export interface NewApps { + admin?: string; + profile?: string; + pwdReset?: string; + publications?: string; } + diff --git a/libs/perun/openapi/src/lib/model/owner.ts b/libs/perun/openapi/src/lib/model/owner.ts index 4d203d1c9..84e5b8eee 100644 --- a/libs/perun/openapi/src/lib/model/owner.ts +++ b/libs/perun/openapi/src/lib/model/owner.ts @@ -11,15 +11,18 @@ */ import { Auditable } from './auditable'; -export interface Owner extends Auditable { - name?: string; - contact?: string; - type?: Owner.TypeEnum; + +export interface Owner extends Auditable { + name?: string; + contact?: string; + type?: Owner.TypeEnum; } export namespace Owner { - export type TypeEnum = 'technical' | 'administrative'; - export const TypeEnum = { - Technical: 'technical' as TypeEnum, - Administrative: 'administrative' as TypeEnum, - }; + export type TypeEnum = 'technical' | 'administrative'; + export const TypeEnum = { + Technical: 'technical' as TypeEnum, + Administrative: 'administrative' as TypeEnum + }; } + + diff --git a/libs/perun/openapi/src/lib/model/paginatedAuditMessages.ts b/libs/perun/openapi/src/lib/model/paginatedAuditMessages.ts index d0279a21e..e82e0e44c 100644 --- a/libs/perun/openapi/src/lib/model/paginatedAuditMessages.ts +++ b/libs/perun/openapi/src/lib/model/paginatedAuditMessages.ts @@ -11,9 +11,11 @@ */ import { AuditMessage } from './auditMessage'; -export interface PaginatedAuditMessages { - offset: number; - pageSize: number; - totalCount: number; - data: Array; + +export interface PaginatedAuditMessages { + offset: number; + pageSize: number; + totalCount: number; + data: Array; } + diff --git a/libs/perun/openapi/src/lib/model/paginatedRichApplications.ts b/libs/perun/openapi/src/lib/model/paginatedRichApplications.ts new file mode 100644 index 000000000..ac89922b4 --- /dev/null +++ b/libs/perun/openapi/src/lib/model/paginatedRichApplications.ts @@ -0,0 +1,21 @@ +/** + * Perun RPC API + * Perun Remote Procedure Calls Application Programming Interface + * + * The version of the OpenAPI document: 0.0.0 + * Contact: perun@cesnet.cz + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { RichApplication } from './richApplication'; + + +export interface PaginatedRichApplications { + offset: number; + pageSize: number; + totalCount: number; + data: Array; +} + diff --git a/libs/perun/openapi/src/lib/model/paginatedRichGroups.ts b/libs/perun/openapi/src/lib/model/paginatedRichGroups.ts index c4b160ab7..a380f490f 100644 --- a/libs/perun/openapi/src/lib/model/paginatedRichGroups.ts +++ b/libs/perun/openapi/src/lib/model/paginatedRichGroups.ts @@ -11,9 +11,11 @@ */ import { RichGroup } from './richGroup'; -export interface PaginatedRichGroups { - offset: number; - pageSize: number; - totalCount: number; - data: Array; + +export interface PaginatedRichGroups { + offset: number; + pageSize: number; + totalCount: number; + data: Array; } + diff --git a/libs/perun/openapi/src/lib/model/paginatedRichMembers.ts b/libs/perun/openapi/src/lib/model/paginatedRichMembers.ts index fea0dfd26..42c9e0557 100644 --- a/libs/perun/openapi/src/lib/model/paginatedRichMembers.ts +++ b/libs/perun/openapi/src/lib/model/paginatedRichMembers.ts @@ -11,9 +11,11 @@ */ import { RichMember } from './richMember'; -export interface PaginatedRichMembers { - offset: number; - pageSize: number; - totalCount: number; - data: Array; + +export interface PaginatedRichMembers { + offset: number; + pageSize: number; + totalCount: number; + data: Array; } + diff --git a/libs/perun/openapi/src/lib/model/paginatedRichUsers.ts b/libs/perun/openapi/src/lib/model/paginatedRichUsers.ts index 5b6e2d347..4b4819616 100644 --- a/libs/perun/openapi/src/lib/model/paginatedRichUsers.ts +++ b/libs/perun/openapi/src/lib/model/paginatedRichUsers.ts @@ -11,9 +11,11 @@ */ import { RichUser } from './richUser'; -export interface PaginatedRichUsers { - offset: number; - pageSize: number; - totalCount: number; - data: Array; + +export interface PaginatedRichUsers { + offset: number; + pageSize: number; + totalCount: number; + data: Array; } + diff --git a/libs/perun/openapi/src/lib/model/perunAppsConfig.ts b/libs/perun/openapi/src/lib/model/perunAppsConfig.ts index fe513768a..5268f4645 100644 --- a/libs/perun/openapi/src/lib/model/perunAppsConfig.ts +++ b/libs/perun/openapi/src/lib/model/perunAppsConfig.ts @@ -11,6 +11,8 @@ */ import { Brand } from './brand'; -export interface PerunAppsConfig { - brands?: Array; + +export interface PerunAppsConfig { + brands?: Array; } + diff --git a/libs/perun/openapi/src/lib/model/perunBean.ts b/libs/perun/openapi/src/lib/model/perunBean.ts index 4931d80a3..ee2164e96 100644 --- a/libs/perun/openapi/src/lib/model/perunBean.ts +++ b/libs/perun/openapi/src/lib/model/perunBean.ts @@ -10,7 +10,9 @@ * Do not edit the class manually. */ -export interface PerunBean { - id: number; - beanName: string; + +export interface PerunBean { + id: number; + beanName: string; } + diff --git a/libs/perun/openapi/src/lib/model/perunException.ts b/libs/perun/openapi/src/lib/model/perunException.ts index 226297f68..2fa67c1c7 100644 --- a/libs/perun/openapi/src/lib/model/perunException.ts +++ b/libs/perun/openapi/src/lib/model/perunException.ts @@ -10,8 +10,10 @@ * Do not edit the class manually. */ -export interface PerunException { - errorId?: string; - name?: string; - message?: string; + +export interface PerunException { + errorId?: string; + name?: string; + message?: string; } + diff --git a/libs/perun/openapi/src/lib/model/perunPolicy.ts b/libs/perun/openapi/src/lib/model/perunPolicy.ts index b8922a2bb..6a3f7bdac 100644 --- a/libs/perun/openapi/src/lib/model/perunPolicy.ts +++ b/libs/perun/openapi/src/lib/model/perunPolicy.ts @@ -10,8 +10,10 @@ * Do not edit the class manually. */ -export interface PerunPolicy { - policyName: string; - includePolicies: Array; - perunRoles: Array<{ [key: string]: string }>; + +export interface PerunPolicy { + policyName: string; + includePolicies: Array; + perunRoles: Array<{ [key: string]: string; }>; } + diff --git a/libs/perun/openapi/src/lib/model/perunPrincipal.ts b/libs/perun/openapi/src/lib/model/perunPrincipal.ts index 3293deb3b..cd89b24ec 100644 --- a/libs/perun/openapi/src/lib/model/perunPrincipal.ts +++ b/libs/perun/openapi/src/lib/model/perunPrincipal.ts @@ -11,14 +11,16 @@ */ import { User } from './user'; -export interface PerunPrincipal { - actor?: string; - extSourceName?: string; - extSourceType?: string; - extSourceLoa?: number; - user: User; - authzInitialized?: boolean; - additionalInformations?: { [key: string]: string }; - userId: number; - roles?: { [key: string]: { [key: string]: Array } }; + +export interface PerunPrincipal { + actor?: string; + extSourceName?: string; + extSourceType?: string; + extSourceLoa?: number; + user: User; + authzInitialized?: boolean; + additionalInformations?: { [key: string]: string; }; + userId: number; + roles?: { [key: string]: { [key: string]: Array; }; }; } + diff --git a/libs/perun/openapi/src/lib/model/publication.ts b/libs/perun/openapi/src/lib/model/publication.ts index bbe13b517..06a7958be 100644 --- a/libs/perun/openapi/src/lib/model/publication.ts +++ b/libs/perun/openapi/src/lib/model/publication.ts @@ -12,19 +12,21 @@ import { PerunBean } from './perunBean'; import { Author } from './author'; -export interface Publication extends PerunBean { - authors?: Array; - externalId?: number; - publicationSystemId?: number; - title?: string; - year?: number; - main?: string; - isbn?: string; - doi?: string; - categoryId?: number; - rank?: number; - locked?: boolean; - createdBy?: string; - createdByUid?: number; - createdDate?: string; + +export interface Publication extends PerunBean { + authors?: Array; + externalId?: number; + publicationSystemId?: number; + title?: string; + year?: number; + main?: string; + isbn?: string; + doi?: string; + categoryId?: number; + rank?: number; + locked?: boolean; + createdBy?: string; + createdByUid?: number; + createdDate?: string; } + diff --git a/libs/perun/openapi/src/lib/model/publicationForGUI.ts b/libs/perun/openapi/src/lib/model/publicationForGUI.ts index ff7c80636..2d47f69e1 100644 --- a/libs/perun/openapi/src/lib/model/publicationForGUI.ts +++ b/libs/perun/openapi/src/lib/model/publicationForGUI.ts @@ -13,8 +13,10 @@ import { ThanksForGUI } from './thanksForGUI'; import { Author } from './author'; import { Publication } from './publication'; -export interface PublicationForGUI extends Publication { - pubSystemName?: string; - categoryName?: string; - thanks?: Array; + +export interface PublicationForGUI extends Publication { + pubSystemName?: string; + categoryName?: string; + thanks?: Array; } + diff --git a/libs/perun/openapi/src/lib/model/publicationSystem.ts b/libs/perun/openapi/src/lib/model/publicationSystem.ts index 05d2ed4af..98619dceb 100644 --- a/libs/perun/openapi/src/lib/model/publicationSystem.ts +++ b/libs/perun/openapi/src/lib/model/publicationSystem.ts @@ -11,11 +11,13 @@ */ import { PerunBean } from './perunBean'; -export interface PublicationSystem extends PerunBean { - friendlyName?: string; - url?: string; - username?: string; - password?: string; - loginNamespace?: string; - type?: string; + +export interface PublicationSystem extends PerunBean { + friendlyName?: string; + url?: string; + username?: string; + password?: string; + loginNamespace?: string; + type?: string; } + diff --git a/libs/perun/openapi/src/lib/model/rTMessage.ts b/libs/perun/openapi/src/lib/model/rTMessage.ts index cdbe4c21d..c8bf0762c 100644 --- a/libs/perun/openapi/src/lib/model/rTMessage.ts +++ b/libs/perun/openapi/src/lib/model/rTMessage.ts @@ -10,7 +10,9 @@ * Do not edit the class manually. */ -export interface RTMessage { - memberPreferredEmail?: string; - ticketNumber?: number; + +export interface RTMessage { + memberPreferredEmail?: string; + ticketNumber?: number; } + diff --git a/libs/perun/openapi/src/lib/model/resource.ts b/libs/perun/openapi/src/lib/model/resource.ts index 25fa2d792..5a9c58614 100644 --- a/libs/perun/openapi/src/lib/model/resource.ts +++ b/libs/perun/openapi/src/lib/model/resource.ts @@ -11,10 +11,12 @@ */ import { Auditable } from './auditable'; -export interface Resource extends Auditable { - name?: string; - description?: string; - voId?: number; - facilityId?: number; - uuid?: string; + +export interface Resource extends Auditable { + name?: string; + description?: string; + voId?: number; + facilityId?: number; + uuid?: string; } + diff --git a/libs/perun/openapi/src/lib/model/resourceState.ts b/libs/perun/openapi/src/lib/model/resourceState.ts index 82684d868..adaf4e067 100644 --- a/libs/perun/openapi/src/lib/model/resourceState.ts +++ b/libs/perun/openapi/src/lib/model/resourceState.ts @@ -12,7 +12,9 @@ import { Task } from './task'; import { Resource } from './resource'; -export interface ResourceState { - resource?: Resource; - taskList?: Array; + +export interface ResourceState { + resource?: Resource; + taskList?: Array; } + diff --git a/libs/perun/openapi/src/lib/model/resourceTag.ts b/libs/perun/openapi/src/lib/model/resourceTag.ts index d09307042..2a255d80f 100644 --- a/libs/perun/openapi/src/lib/model/resourceTag.ts +++ b/libs/perun/openapi/src/lib/model/resourceTag.ts @@ -11,7 +11,9 @@ */ import { Auditable } from './auditable'; -export interface ResourceTag extends Auditable { - tagName?: string; - voId?: number; + +export interface ResourceTag extends Auditable { + tagName?: string; + voId?: number; } + diff --git a/libs/perun/openapi/src/lib/model/richApplication.ts b/libs/perun/openapi/src/lib/model/richApplication.ts new file mode 100644 index 000000000..59939b649 --- /dev/null +++ b/libs/perun/openapi/src/lib/model/richApplication.ts @@ -0,0 +1,24 @@ +/** + * Perun RPC API + * Perun Remote Procedure Calls Application Programming Interface + * + * The version of the OpenAPI document: 0.0.0 + * Contact: perun@cesnet.cz + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { Group } from './group'; +import { User } from './user'; +import { Vo } from './vo'; +import { ApplicationFormItemData } from './applicationFormItemData'; +import { AppState } from './appState'; +import { AppType } from './appType'; +import { Application } from './application'; + + +export interface RichApplication { + formData: Array; +} + diff --git a/libs/perun/openapi/src/lib/model/richDestination.ts b/libs/perun/openapi/src/lib/model/richDestination.ts index 3bb709a30..f68f700af 100644 --- a/libs/perun/openapi/src/lib/model/richDestination.ts +++ b/libs/perun/openapi/src/lib/model/richDestination.ts @@ -15,8 +15,10 @@ import { Service } from './service'; import { Facility } from './facility'; import { DestinationType } from './destinationType'; -export interface RichDestination extends Destination { - blocked?: boolean; - service?: Service; - facility?: Facility; + +export interface RichDestination extends Destination { + blocked?: boolean; + service?: Service; + facility?: Facility; } + diff --git a/libs/perun/openapi/src/lib/model/richFacility.ts b/libs/perun/openapi/src/lib/model/richFacility.ts index 3b58102de..a1705d372 100644 --- a/libs/perun/openapi/src/lib/model/richFacility.ts +++ b/libs/perun/openapi/src/lib/model/richFacility.ts @@ -12,6 +12,8 @@ import { Owner } from './owner'; import { Facility } from './facility'; -export interface RichFacility extends Facility { - facilityOwners: Array; + +export interface RichFacility extends Facility { + facilityOwners: Array; } + diff --git a/libs/perun/openapi/src/lib/model/richGroup.ts b/libs/perun/openapi/src/lib/model/richGroup.ts index 7432d0265..1eb746514 100644 --- a/libs/perun/openapi/src/lib/model/richGroup.ts +++ b/libs/perun/openapi/src/lib/model/richGroup.ts @@ -12,6 +12,8 @@ import { Group } from './group'; import { Attribute } from './attribute'; -export interface RichGroup extends Group { - attributes?: Array; + +export interface RichGroup extends Group { + attributes?: Array; } + diff --git a/libs/perun/openapi/src/lib/model/richMember.ts b/libs/perun/openapi/src/lib/model/richMember.ts index bede2ca79..c300a4417 100644 --- a/libs/perun/openapi/src/lib/model/richMember.ts +++ b/libs/perun/openapi/src/lib/model/richMember.ts @@ -14,9 +14,11 @@ import { Attribute } from './attribute'; import { UserExtSource } from './userExtSource'; import { Member } from './member'; -export interface RichMember extends Member { - user: User; - userExtSources: Array; - userAttributes?: Array; - memberAttributes?: Array; + +export interface RichMember extends Member { + user: User; + userExtSources: Array; + userAttributes?: Array; + memberAttributes?: Array; } + diff --git a/libs/perun/openapi/src/lib/model/richResource.ts b/libs/perun/openapi/src/lib/model/richResource.ts index 2dfddc53c..f4ac308b3 100644 --- a/libs/perun/openapi/src/lib/model/richResource.ts +++ b/libs/perun/openapi/src/lib/model/richResource.ts @@ -14,8 +14,10 @@ import { Resource } from './resource'; import { Vo } from './vo'; import { Facility } from './facility'; -export interface RichResource extends Resource { - vo?: Vo; - facility?: Facility; - resourceTags?: Array; + +export interface RichResource extends Resource { + vo?: Vo; + facility?: Facility; + resourceTags?: Array; } + diff --git a/libs/perun/openapi/src/lib/model/richUser.ts b/libs/perun/openapi/src/lib/model/richUser.ts index e0041bc0a..c08708a04 100644 --- a/libs/perun/openapi/src/lib/model/richUser.ts +++ b/libs/perun/openapi/src/lib/model/richUser.ts @@ -13,7 +13,9 @@ import { User } from './user'; import { Attribute } from './attribute'; import { UserExtSource } from './userExtSource'; -export interface RichUser extends User { - userExtSources: Array; - userAttributes: Array; + +export interface RichUser extends User { + userExtSources: Array; + userAttributes: Array; } + diff --git a/libs/perun/openapi/src/lib/model/richUserExtSource.ts b/libs/perun/openapi/src/lib/model/richUserExtSource.ts index b1f86d156..686e66696 100644 --- a/libs/perun/openapi/src/lib/model/richUserExtSource.ts +++ b/libs/perun/openapi/src/lib/model/richUserExtSource.ts @@ -12,7 +12,9 @@ import { Attribute } from './attribute'; import { UserExtSource } from './userExtSource'; -export interface RichUserExtSource { - userExtSource: UserExtSource; - attributes: Array; + +export interface RichUserExtSource { + userExtSource: UserExtSource; + attributes: Array; } + diff --git a/libs/perun/openapi/src/lib/model/roleManagementRules.ts b/libs/perun/openapi/src/lib/model/roleManagementRules.ts index 2e5ac2c94..193428d6d 100644 --- a/libs/perun/openapi/src/lib/model/roleManagementRules.ts +++ b/libs/perun/openapi/src/lib/model/roleManagementRules.ts @@ -10,11 +10,13 @@ * Do not edit the class manually. */ -export interface RoleManagementRules { - roleName: string; - primaryObject: string | null; - privilegedRolesToManage: Array<{ [key: string]: string }>; - privilegedRolesToRead: Array<{ [key: string]: string }>; - entitiesToManage: { [key: string]: string }; - assignedObjects: { [key: string]: string }; + +export interface RoleManagementRules { + roleName: string; + primaryObject: string | null; + privilegedRolesToManage: Array<{ [key: string]: string; }>; + privilegedRolesToRead: Array<{ [key: string]: string; }>; + entitiesToManage: { [key: string]: string; }; + assignedObjects: { [key: string]: string; }; } + diff --git a/libs/perun/openapi/src/lib/model/roleObject.ts b/libs/perun/openapi/src/lib/model/roleObject.ts index 3865cd8cd..4d5bcb345 100644 --- a/libs/perun/openapi/src/lib/model/roleObject.ts +++ b/libs/perun/openapi/src/lib/model/roleObject.ts @@ -10,17 +10,19 @@ * Do not edit the class manually. */ + /** * Represents objects, upon which Perun roles can be set, e.g. role RESOURCEADMIN can be set upon Resource, Vo, Facility or no object (None). */ export type RoleObject = 'None' | 'Group' | 'Vo' | 'Facility' | 'Resource' | 'User' | 'Member'; export const RoleObject = { - None: 'None' as RoleObject, - Group: 'Group' as RoleObject, - Vo: 'Vo' as RoleObject, - Facility: 'Facility' as RoleObject, - Resource: 'Resource' as RoleObject, - User: 'User' as RoleObject, - Member: 'Member' as RoleObject, + None: 'None' as RoleObject, + Group: 'Group' as RoleObject, + Vo: 'Vo' as RoleObject, + Facility: 'Facility' as RoleObject, + Resource: 'Resource' as RoleObject, + User: 'User' as RoleObject, + Member: 'Member' as RoleObject }; + diff --git a/libs/perun/openapi/src/lib/model/securityTeam.ts b/libs/perun/openapi/src/lib/model/securityTeam.ts index 970b8d6eb..c3f96d65e 100644 --- a/libs/perun/openapi/src/lib/model/securityTeam.ts +++ b/libs/perun/openapi/src/lib/model/securityTeam.ts @@ -11,7 +11,9 @@ */ import { Auditable } from './auditable'; -export interface SecurityTeam extends Auditable { - name?: string; - description?: string; + +export interface SecurityTeam extends Auditable { + name?: string; + description?: string; } + diff --git a/libs/perun/openapi/src/lib/model/service.ts b/libs/perun/openapi/src/lib/model/service.ts index 8c9b4248a..45a09db3d 100644 --- a/libs/perun/openapi/src/lib/model/service.ts +++ b/libs/perun/openapi/src/lib/model/service.ts @@ -11,11 +11,13 @@ */ import { Auditable } from './auditable'; -export interface Service extends Auditable { - name?: string; - description?: string; - delay?: number; - recurrence?: number; - enabled?: boolean; - script?: string; + +export interface Service extends Auditable { + name?: string; + description?: string; + delay?: number; + recurrence?: number; + enabled?: boolean; + script?: string; } + diff --git a/libs/perun/openapi/src/lib/model/serviceAttributes.ts b/libs/perun/openapi/src/lib/model/serviceAttributes.ts index e841c32e9..39a0d1c5d 100644 --- a/libs/perun/openapi/src/lib/model/serviceAttributes.ts +++ b/libs/perun/openapi/src/lib/model/serviceAttributes.ts @@ -11,7 +11,9 @@ */ import { Attribute } from './attribute'; -export interface ServiceAttributes { - attributes?: Array; - childElements?: Array; + +export interface ServiceAttributes { + attributes?: Array; + childElements?: Array; } + diff --git a/libs/perun/openapi/src/lib/model/serviceForGUI.ts b/libs/perun/openapi/src/lib/model/serviceForGUI.ts index 508fa59ed..fcd331b2a 100644 --- a/libs/perun/openapi/src/lib/model/serviceForGUI.ts +++ b/libs/perun/openapi/src/lib/model/serviceForGUI.ts @@ -11,6 +11,8 @@ */ import { Service } from './service'; -export interface ServiceForGUI extends Service { - allowedOnFacility?: boolean; + +export interface ServiceForGUI extends Service { + allowedOnFacility?: boolean; } + diff --git a/libs/perun/openapi/src/lib/model/serviceState.ts b/libs/perun/openapi/src/lib/model/serviceState.ts index f5a6792e5..0b68150fd 100644 --- a/libs/perun/openapi/src/lib/model/serviceState.ts +++ b/libs/perun/openapi/src/lib/model/serviceState.ts @@ -13,12 +13,14 @@ import { Task } from './task'; import { Service } from './service'; import { Facility } from './facility'; -export interface ServiceState { - service?: Service; - facility?: Facility; - task?: Task; - status?: string; - blockedOnFacility?: boolean; - readonly blockedGlobally?: boolean; - hasDestinations?: boolean; + +export interface ServiceState { + service?: Service; + facility?: Facility; + task?: Task; + status?: string; + blockedOnFacility?: boolean; + readonly blockedGlobally?: boolean; + hasDestinations?: boolean; } + diff --git a/libs/perun/openapi/src/lib/model/servicesPackage.ts b/libs/perun/openapi/src/lib/model/servicesPackage.ts index 327a6484d..d48d9a27a 100644 --- a/libs/perun/openapi/src/lib/model/servicesPackage.ts +++ b/libs/perun/openapi/src/lib/model/servicesPackage.ts @@ -11,7 +11,9 @@ */ import { Auditable } from './auditable'; -export interface ServicesPackage extends Auditable { - description?: string; - name?: string; + +export interface ServicesPackage extends Auditable { + description?: string; + name?: string; } + diff --git a/libs/perun/openapi/src/lib/model/setRoleWithGroupComplementaryObject.ts b/libs/perun/openapi/src/lib/model/setRoleWithGroupComplementaryObject.ts index 3339ac187..972175335 100644 --- a/libs/perun/openapi/src/lib/model/setRoleWithGroupComplementaryObject.ts +++ b/libs/perun/openapi/src/lib/model/setRoleWithGroupComplementaryObject.ts @@ -11,14 +11,16 @@ */ import { PerunBean } from './perunBean'; + /** * input to unsetRoleWithUserComplementaryObject */ -export interface SetRoleWithGroupComplementaryObject { - role: string; - /** - * List of authorizedGroups ids - */ - authorizedGroups: Array; - complementaryObject?: PerunBean; +export interface SetRoleWithGroupComplementaryObject { + role: string; + /** + * List of authorizedGroups ids + */ + authorizedGroups: Array; + complementaryObject?: PerunBean; } + diff --git a/libs/perun/openapi/src/lib/model/setRoleWithUserComplementaryObject.ts b/libs/perun/openapi/src/lib/model/setRoleWithUserComplementaryObject.ts index 1d8029ca7..71833879d 100644 --- a/libs/perun/openapi/src/lib/model/setRoleWithUserComplementaryObject.ts +++ b/libs/perun/openapi/src/lib/model/setRoleWithUserComplementaryObject.ts @@ -11,14 +11,16 @@ */ import { PerunBean } from './perunBean'; + /** * input to setRoleWithUserComplementaryObject */ -export interface SetRoleWithUserComplementaryObject { - role: string; - /** - * List of user ids - */ - users: Array; - complementaryObject?: PerunBean; +export interface SetRoleWithUserComplementaryObject { + role: string; + /** + * List of user ids + */ + users: Array; + complementaryObject?: PerunBean; } + diff --git a/libs/perun/openapi/src/lib/model/simpleAttribute.ts b/libs/perun/openapi/src/lib/model/simpleAttribute.ts index e003c57f4..609095b3b 100644 --- a/libs/perun/openapi/src/lib/model/simpleAttribute.ts +++ b/libs/perun/openapi/src/lib/model/simpleAttribute.ts @@ -10,12 +10,14 @@ * Do not edit the class manually. */ + /** * Attribute returned using the JsonSimple serializator */ -export interface SimpleAttribute { - friendlyName?: string; - namespace?: string; - unique?: boolean; - value?: object; +export interface SimpleAttribute { + friendlyName?: string; + namespace?: string; + unique?: boolean; + value?: object; } + diff --git a/libs/perun/openapi/src/lib/model/sortingOrder.ts b/libs/perun/openapi/src/lib/model/sortingOrder.ts index 5f623a69f..d09dd365a 100644 --- a/libs/perun/openapi/src/lib/model/sortingOrder.ts +++ b/libs/perun/openapi/src/lib/model/sortingOrder.ts @@ -10,9 +10,11 @@ * Do not edit the class manually. */ + export type SortingOrder = 'ASCENDING' | 'DESCENDING'; export const SortingOrder = { - ASCENDING: 'ASCENDING' as SortingOrder, - DESCENDING: 'DESCENDING' as SortingOrder, + ASCENDING: 'ASCENDING' as SortingOrder, + DESCENDING: 'DESCENDING' as SortingOrder }; + diff --git a/libs/perun/openapi/src/lib/model/sponsor.ts b/libs/perun/openapi/src/lib/model/sponsor.ts index bd955124e..26a462320 100644 --- a/libs/perun/openapi/src/lib/model/sponsor.ts +++ b/libs/perun/openapi/src/lib/model/sponsor.ts @@ -13,13 +13,15 @@ import { User } from './user'; import { Attribute } from './attribute'; import { UserExtSource } from './userExtSource'; -export interface Sponsor { - user: User; - userExtSources: Array; - userAttributes: Array; - /** - * Date in format yyyy-MM-dd} - */ - validityTo: string; - active: boolean; + +export interface Sponsor { + user: User; + userExtSources: Array; + userAttributes: Array; + /** + * Date in format yyyy-MM-dd} + */ + validityTo: string; + active: boolean; } + diff --git a/libs/perun/openapi/src/lib/model/sponsoredUserData.ts b/libs/perun/openapi/src/lib/model/sponsoredUserData.ts index eda21c7d6..759b187bf 100644 --- a/libs/perun/openapi/src/lib/model/sponsoredUserData.ts +++ b/libs/perun/openapi/src/lib/model/sponsoredUserData.ts @@ -10,14 +10,16 @@ * Do not edit the class manually. */ -export interface SponsoredUserData { - guestName?: string; - firstName?: string; - lastName?: string; - titleBefore?: string; - titleAfter?: string; - namespace?: string; - email?: string; - password?: string; - login?: string; + +export interface SponsoredUserData { + guestName?: string; + firstName?: string; + lastName?: string; + titleBefore?: string; + titleAfter?: string; + namespace?: string; + email?: string; + password?: string; + login?: string; } + diff --git a/libs/perun/openapi/src/lib/model/task.ts b/libs/perun/openapi/src/lib/model/task.ts index be496414c..1359422d8 100644 --- a/libs/perun/openapi/src/lib/model/task.ts +++ b/libs/perun/openapi/src/lib/model/task.ts @@ -14,22 +14,24 @@ import { Service } from './service'; import { Facility } from './facility'; import { TaskStatus } from './taskStatus'; -export interface Task { - id?: number; - delay?: number; - recurrence?: number; - startTime?: string; - sentToEngine?: string; - sendStartTime?: string; - schedule?: string; - genStartTime?: string; - genEndTime?: string; - sendEndTime?: string; - endTime?: string; - service?: Service; - facility?: Facility; - destinations?: Array; - status?: TaskStatus; - sourceUpdated?: boolean; - propagationForced?: boolean; + +export interface Task { + id?: number; + delay?: number; + recurrence?: number; + startTime?: string; + sentToEngine?: string; + sendStartTime?: string; + schedule?: string; + genStartTime?: string; + genEndTime?: string; + sendEndTime?: string; + endTime?: string; + service?: Service; + facility?: Facility; + destinations?: Array; + status?: TaskStatus; + sourceUpdated?: boolean; + propagationForced?: boolean; } + diff --git a/libs/perun/openapi/src/lib/model/taskAndDestinationIdObject.ts b/libs/perun/openapi/src/lib/model/taskAndDestinationIdObject.ts index d509e18c9..e7f147b27 100644 --- a/libs/perun/openapi/src/lib/model/taskAndDestinationIdObject.ts +++ b/libs/perun/openapi/src/lib/model/taskAndDestinationIdObject.ts @@ -10,16 +10,18 @@ * Do not edit the class manually. */ + /** * input to deleteTaskResultsIds */ -export interface TaskAndDestinationIdObject { - /** - * task id - */ - taskId: number; - /** - * destination id - */ - destinationId: number; +export interface TaskAndDestinationIdObject { + /** + * task id + */ + taskId: number; + /** + * destination id + */ + destinationId: number; } + diff --git a/libs/perun/openapi/src/lib/model/taskAndDestinationNameObject.ts b/libs/perun/openapi/src/lib/model/taskAndDestinationNameObject.ts index 955836c73..297cdf47e 100644 --- a/libs/perun/openapi/src/lib/model/taskAndDestinationNameObject.ts +++ b/libs/perun/openapi/src/lib/model/taskAndDestinationNameObject.ts @@ -10,20 +10,22 @@ * Do not edit the class manually. */ + /** * input to deleteTaskResultsNames */ -export interface TaskAndDestinationNameObject { - /** - * task id - */ - taskId: number; - /** - * destination name - */ - destinationName: string; - /** - * destination type - */ - destinationType: string; +export interface TaskAndDestinationNameObject { + /** + * task id + */ + taskId: number; + /** + * destination name + */ + destinationName: string; + /** + * destination type + */ + destinationType: string; } + diff --git a/libs/perun/openapi/src/lib/model/taskIdObject.ts b/libs/perun/openapi/src/lib/model/taskIdObject.ts index 79ecd8224..2e5aace7b 100644 --- a/libs/perun/openapi/src/lib/model/taskIdObject.ts +++ b/libs/perun/openapi/src/lib/model/taskIdObject.ts @@ -10,12 +10,14 @@ * Do not edit the class manually. */ + /** * input to deleteTaskObject */ -export interface TaskIdObject { - /** - * task id - */ - task: number; +export interface TaskIdObject { + /** + * task id + */ + task: number; } + diff --git a/libs/perun/openapi/src/lib/model/taskResult.ts b/libs/perun/openapi/src/lib/model/taskResult.ts index 6eba29dcf..2cf002b24 100644 --- a/libs/perun/openapi/src/lib/model/taskResult.ts +++ b/libs/perun/openapi/src/lib/model/taskResult.ts @@ -14,14 +14,16 @@ import { PerunBean } from './perunBean'; import { Service } from './service'; import { TaskResultStatus } from './taskResultStatus'; -export interface TaskResult extends PerunBean { - taskId?: number; - destinationId?: number; - errorMessage?: string; - standardMessage?: string; - returnCode?: number; - timestamp?: string; - status?: TaskResultStatus; - destination?: Destination; - service?: Service; + +export interface TaskResult extends PerunBean { + taskId?: number; + destinationId?: number; + errorMessage?: string; + standardMessage?: string; + returnCode?: number; + timestamp?: string; + status?: TaskResultStatus; + destination?: Destination; + service?: Service; } + diff --git a/libs/perun/openapi/src/lib/model/taskResultIdObject.ts b/libs/perun/openapi/src/lib/model/taskResultIdObject.ts index 8770b5e51..0afacf112 100644 --- a/libs/perun/openapi/src/lib/model/taskResultIdObject.ts +++ b/libs/perun/openapi/src/lib/model/taskResultIdObject.ts @@ -10,12 +10,14 @@ * Do not edit the class manually. */ + /** * input to deleteTaskResultObject */ -export interface TaskResultIdObject { - /** - * task result id - */ - taskResultId: number; +export interface TaskResultIdObject { + /** + * task result id + */ + taskResultId: number; } + diff --git a/libs/perun/openapi/src/lib/model/taskResultStatus.ts b/libs/perun/openapi/src/lib/model/taskResultStatus.ts index 0d279a859..6dccdb52d 100644 --- a/libs/perun/openapi/src/lib/model/taskResultStatus.ts +++ b/libs/perun/openapi/src/lib/model/taskResultStatus.ts @@ -10,11 +10,13 @@ * Do not edit the class manually. */ + export type TaskResultStatus = 'DONE' | 'ERROR' | 'DENIED' | 'WARNING'; export const TaskResultStatus = { - DONE: 'DONE' as TaskResultStatus, - ERROR: 'ERROR' as TaskResultStatus, - DENIED: 'DENIED' as TaskResultStatus, - WARNING: 'WARNING' as TaskResultStatus, + DONE: 'DONE' as TaskResultStatus, + ERROR: 'ERROR' as TaskResultStatus, + DENIED: 'DENIED' as TaskResultStatus, + WARNING: 'WARNING' as TaskResultStatus }; + diff --git a/libs/perun/openapi/src/lib/model/taskStatus.ts b/libs/perun/openapi/src/lib/model/taskStatus.ts index 554a584e4..3ba326adc 100644 --- a/libs/perun/openapi/src/lib/model/taskStatus.ts +++ b/libs/perun/openapi/src/lib/model/taskStatus.ts @@ -10,27 +10,19 @@ * Do not edit the class manually. */ -export type TaskStatus = - | 'WAITING' - | 'PLANNED' - | 'GENERATING' - | 'GENERROR' - | 'GENERATED' - | 'SENDING' - | 'DONE' - | 'SENDERROR' - | 'ERROR' - | 'WARNING'; + +export type TaskStatus = 'WAITING' | 'PLANNED' | 'GENERATING' | 'GENERROR' | 'GENERATED' | 'SENDING' | 'DONE' | 'SENDERROR' | 'ERROR' | 'WARNING'; export const TaskStatus = { - WAITING: 'WAITING' as TaskStatus, - PLANNED: 'PLANNED' as TaskStatus, - GENERATING: 'GENERATING' as TaskStatus, - GENERROR: 'GENERROR' as TaskStatus, - GENERATED: 'GENERATED' as TaskStatus, - SENDING: 'SENDING' as TaskStatus, - DONE: 'DONE' as TaskStatus, - SENDERROR: 'SENDERROR' as TaskStatus, - ERROR: 'ERROR' as TaskStatus, - WARNING: 'WARNING' as TaskStatus, + WAITING: 'WAITING' as TaskStatus, + PLANNED: 'PLANNED' as TaskStatus, + GENERATING: 'GENERATING' as TaskStatus, + GENERROR: 'GENERROR' as TaskStatus, + GENERATED: 'GENERATED' as TaskStatus, + SENDING: 'SENDING' as TaskStatus, + DONE: 'DONE' as TaskStatus, + SENDERROR: 'SENDERROR' as TaskStatus, + ERROR: 'ERROR' as TaskStatus, + WARNING: 'WARNING' as TaskStatus }; + diff --git a/libs/perun/openapi/src/lib/model/thanks.ts b/libs/perun/openapi/src/lib/model/thanks.ts index 0e075e191..368a6b3ea 100644 --- a/libs/perun/openapi/src/lib/model/thanks.ts +++ b/libs/perun/openapi/src/lib/model/thanks.ts @@ -11,10 +11,12 @@ */ import { PerunBean } from './perunBean'; -export interface Thanks extends PerunBean { - publicationId?: number; - ownerId?: number; - createdBy?: string; - createdByUid?: number; - createdDate?: string; + +export interface Thanks extends PerunBean { + publicationId?: number; + ownerId?: number; + createdBy?: string; + createdByUid?: number; + createdDate?: string; } + diff --git a/libs/perun/openapi/src/lib/model/thanksForGUI.ts b/libs/perun/openapi/src/lib/model/thanksForGUI.ts index 35c1351f1..2d49af7fd 100644 --- a/libs/perun/openapi/src/lib/model/thanksForGUI.ts +++ b/libs/perun/openapi/src/lib/model/thanksForGUI.ts @@ -11,6 +11,8 @@ */ import { Thanks } from './thanks'; -export interface ThanksForGUI extends Thanks { - ownerName?: string; + +export interface ThanksForGUI extends Thanks { + ownerName?: string; } + diff --git a/libs/perun/openapi/src/lib/model/type.ts b/libs/perun/openapi/src/lib/model/type.ts index 4ae867893..f6b27d2fb 100644 --- a/libs/perun/openapi/src/lib/model/type.ts +++ b/libs/perun/openapi/src/lib/model/type.ts @@ -10,40 +10,27 @@ * Do not edit the class manually. */ + /** * type of application form items */ -export type Type = - | 'HTML_COMMENT' - | 'SUBMIT_BUTTON' - | 'AUTO_SUBMIT_BUTTON' - | 'PASSWORD' - | 'VALIDATED_EMAIL' - | 'TEXTFIELD' - | 'TEXTAREA' - | 'CHECKBOX' - | 'RADIO' - | 'SELECTIONBOX' - | 'COMBOBOX' - | 'USERNAME' - | 'HEADING' - | 'TIMEZONE' - | 'EMBEDDED_GROUP_APPLICATION'; +export type Type = 'HTML_COMMENT' | 'SUBMIT_BUTTON' | 'AUTO_SUBMIT_BUTTON' | 'PASSWORD' | 'VALIDATED_EMAIL' | 'TEXTFIELD' | 'TEXTAREA' | 'CHECKBOX' | 'RADIO' | 'SELECTIONBOX' | 'COMBOBOX' | 'USERNAME' | 'HEADING' | 'TIMEZONE' | 'EMBEDDED_GROUP_APPLICATION'; export const Type = { - HTMLCOMMENT: 'HTML_COMMENT' as Type, - SUBMITBUTTON: 'SUBMIT_BUTTON' as Type, - AUTOSUBMITBUTTON: 'AUTO_SUBMIT_BUTTON' as Type, - PASSWORD: 'PASSWORD' as Type, - VALIDATEDEMAIL: 'VALIDATED_EMAIL' as Type, - TEXTFIELD: 'TEXTFIELD' as Type, - TEXTAREA: 'TEXTAREA' as Type, - CHECKBOX: 'CHECKBOX' as Type, - RADIO: 'RADIO' as Type, - SELECTIONBOX: 'SELECTIONBOX' as Type, - COMBOBOX: 'COMBOBOX' as Type, - USERNAME: 'USERNAME' as Type, - HEADING: 'HEADING' as Type, - TIMEZONE: 'TIMEZONE' as Type, - EMBEDDEDGROUPAPPLICATION: 'EMBEDDED_GROUP_APPLICATION' as Type, + HTMLCOMMENT: 'HTML_COMMENT' as Type, + SUBMITBUTTON: 'SUBMIT_BUTTON' as Type, + AUTOSUBMITBUTTON: 'AUTO_SUBMIT_BUTTON' as Type, + PASSWORD: 'PASSWORD' as Type, + VALIDATEDEMAIL: 'VALIDATED_EMAIL' as Type, + TEXTFIELD: 'TEXTFIELD' as Type, + TEXTAREA: 'TEXTAREA' as Type, + CHECKBOX: 'CHECKBOX' as Type, + RADIO: 'RADIO' as Type, + SELECTIONBOX: 'SELECTIONBOX' as Type, + COMBOBOX: 'COMBOBOX' as Type, + USERNAME: 'USERNAME' as Type, + HEADING: 'HEADING' as Type, + TIMEZONE: 'TIMEZONE' as Type, + EMBEDDEDGROUPAPPLICATION: 'EMBEDDED_GROUP_APPLICATION' as Type }; + diff --git a/libs/perun/openapi/src/lib/model/unsetRoleWithGroupComplementaryObject.ts b/libs/perun/openapi/src/lib/model/unsetRoleWithGroupComplementaryObject.ts index 38bddf4bf..448519ec9 100644 --- a/libs/perun/openapi/src/lib/model/unsetRoleWithGroupComplementaryObject.ts +++ b/libs/perun/openapi/src/lib/model/unsetRoleWithGroupComplementaryObject.ts @@ -11,14 +11,16 @@ */ import { PerunBean } from './perunBean'; + /** * input to unsetRoleWithUserComplementaryObject */ -export interface UnsetRoleWithGroupComplementaryObject { - role: string; - /** - * List of authorizedGroups ids - */ - authorizedGroups: Array; - complementaryObject?: PerunBean; +export interface UnsetRoleWithGroupComplementaryObject { + role: string; + /** + * List of authorizedGroups ids + */ + authorizedGroups: Array; + complementaryObject?: PerunBean; } + diff --git a/libs/perun/openapi/src/lib/model/unsetRoleWithUserComplementaryObject.ts b/libs/perun/openapi/src/lib/model/unsetRoleWithUserComplementaryObject.ts index 24b1dfc08..ead7a9b85 100644 --- a/libs/perun/openapi/src/lib/model/unsetRoleWithUserComplementaryObject.ts +++ b/libs/perun/openapi/src/lib/model/unsetRoleWithUserComplementaryObject.ts @@ -11,14 +11,16 @@ */ import { PerunBean } from './perunBean'; + /** * input to unsetRoleWithUserComplementaryObject */ -export interface UnsetRoleWithUserComplementaryObject { - role: string; - /** - * List of user ids - */ - users: Array; - complementaryObject?: PerunBean; +export interface UnsetRoleWithUserComplementaryObject { + role: string; + /** + * List of user ids + */ + users: Array; + complementaryObject?: PerunBean; } + diff --git a/libs/perun/openapi/src/lib/model/user.ts b/libs/perun/openapi/src/lib/model/user.ts index 3b3d5aec3..cd40a79d4 100644 --- a/libs/perun/openapi/src/lib/model/user.ts +++ b/libs/perun/openapi/src/lib/model/user.ts @@ -11,15 +11,17 @@ */ import { Auditable } from './auditable'; -export interface User extends Auditable { - firstName?: string | null; - lastName?: string | null; - middleName?: string | null; - titleBefore?: string | null; - titleAfter?: string | null; - serviceUser?: boolean; - sponsoredUser?: boolean; - uuid?: string; - specificUser?: boolean; - majorSpecificType?: string; + +export interface User extends Auditable { + firstName?: string | null; + lastName?: string | null; + middleName?: string | null; + titleBefore?: string | null; + titleAfter?: string | null; + serviceUser?: boolean; + sponsoredUser?: boolean; + uuid?: string; + specificUser?: boolean; + majorSpecificType?: string; } + diff --git a/libs/perun/openapi/src/lib/model/userExtSource.ts b/libs/perun/openapi/src/lib/model/userExtSource.ts index 561ca432c..f6c059216 100644 --- a/libs/perun/openapi/src/lib/model/userExtSource.ts +++ b/libs/perun/openapi/src/lib/model/userExtSource.ts @@ -12,14 +12,16 @@ import { Auditable } from './auditable'; import { ExtSource } from './extSource'; -export interface UserExtSource extends Auditable { - login: string; - userId?: number; - loa?: number; - persistent?: boolean; - /** - * SQL timestamp - */ - lastAccess?: string; - extSource: ExtSource; + +export interface UserExtSource extends Auditable { + login: string; + userId?: number; + loa?: number; + persistent?: boolean; + /** + * SQL timestamp + */ + lastAccess?: string; + extSource: ExtSource; } + diff --git a/libs/perun/openapi/src/lib/model/usersOrderColumn.ts b/libs/perun/openapi/src/lib/model/usersOrderColumn.ts index 010bdafe6..703e40a50 100644 --- a/libs/perun/openapi/src/lib/model/usersOrderColumn.ts +++ b/libs/perun/openapi/src/lib/model/usersOrderColumn.ts @@ -10,9 +10,11 @@ * Do not edit the class manually. */ + export type UsersOrderColumn = 'ID' | 'NAME'; export const UsersOrderColumn = { - ID: 'ID' as UsersOrderColumn, - NAME: 'NAME' as UsersOrderColumn, + ID: 'ID' as UsersOrderColumn, + NAME: 'NAME' as UsersOrderColumn }; + diff --git a/libs/perun/openapi/src/lib/model/usersPageQuery.ts b/libs/perun/openapi/src/lib/model/usersPageQuery.ts index 68066cae7..e597aa0fc 100644 --- a/libs/perun/openapi/src/lib/model/usersPageQuery.ts +++ b/libs/perun/openapi/src/lib/model/usersPageQuery.ts @@ -12,16 +12,18 @@ import { UsersOrderColumn } from './usersOrderColumn'; import { SortingOrder } from './sortingOrder'; -export interface UsersPageQuery { - pageSize: number; - offset: number; - order: SortingOrder; - sortColumn: UsersOrderColumn; - searchString?: string; - withoutVo?: boolean; - facilityId?: number; - voId?: number; - serviceId?: number; - resourceId?: number; - onlyAllowed?: boolean; + +export interface UsersPageQuery { + pageSize: number; + offset: number; + order: SortingOrder; + sortColumn: UsersOrderColumn; + searchString?: string; + withoutVo?: boolean; + facilityId?: number; + voId?: number; + serviceId?: number; + resourceId?: number; + onlyAllowed?: boolean; } + diff --git a/libs/perun/openapi/src/lib/model/vo.ts b/libs/perun/openapi/src/lib/model/vo.ts index 8fa8a4896..f887c1a83 100644 --- a/libs/perun/openapi/src/lib/model/vo.ts +++ b/libs/perun/openapi/src/lib/model/vo.ts @@ -11,7 +11,9 @@ */ import { Auditable } from './auditable'; -export interface Vo extends Auditable { - name?: string; - shortName?: string; + +export interface Vo extends Auditable { + name?: string; + shortName?: string; } + diff --git a/libs/perun/openapi/src/lib/model/voAdminRoles.ts b/libs/perun/openapi/src/lib/model/voAdminRoles.ts index 1b3dec1d8..47dd7d3bd 100644 --- a/libs/perun/openapi/src/lib/model/voAdminRoles.ts +++ b/libs/perun/openapi/src/lib/model/voAdminRoles.ts @@ -10,13 +10,15 @@ * Do not edit the class manually. */ + /** * admin roles for a Vo */ export type VoAdminRoles = 'VOOBSERVER' | 'TOPGROUPCREATOR' | 'VOADMIN'; export const VoAdminRoles = { - VOOBSERVER: 'VOOBSERVER' as VoAdminRoles, - TOPGROUPCREATOR: 'TOPGROUPCREATOR' as VoAdminRoles, - VOADMIN: 'VOADMIN' as VoAdminRoles, + VOOBSERVER: 'VOOBSERVER' as VoAdminRoles, + TOPGROUPCREATOR: 'TOPGROUPCREATOR' as VoAdminRoles, + VOADMIN: 'VOADMIN' as VoAdminRoles }; + diff --git a/libs/perun/openapi/src/lib/model/voMemberStatuses.ts b/libs/perun/openapi/src/lib/model/voMemberStatuses.ts index 75d967293..f1898d567 100644 --- a/libs/perun/openapi/src/lib/model/voMemberStatuses.ts +++ b/libs/perun/openapi/src/lib/model/voMemberStatuses.ts @@ -10,14 +10,16 @@ * Do not edit the class manually. */ + /** * statuses of a member in a Vo */ export type VoMemberStatuses = 'VALID' | 'INVALID' | 'EXPIRED' | 'DISABLED'; export const VoMemberStatuses = { - VALID: 'VALID' as VoMemberStatuses, - INVALID: 'INVALID' as VoMemberStatuses, - EXPIRED: 'EXPIRED' as VoMemberStatuses, - DISABLED: 'DISABLED' as VoMemberStatuses, + VALID: 'VALID' as VoMemberStatuses, + INVALID: 'INVALID' as VoMemberStatuses, + EXPIRED: 'EXPIRED' as VoMemberStatuses, + DISABLED: 'DISABLED' as VoMemberStatuses }; + diff --git a/libs/perun/openapi/src/lib/variables.ts b/libs/perun/openapi/src/lib/variables.ts index 2277a9cc3..6fe58549f 100644 --- a/libs/perun/openapi/src/lib/variables.ts +++ b/libs/perun/openapi/src/lib/variables.ts @@ -2,8 +2,8 @@ import { InjectionToken } from '@angular/core'; export const BASE_PATH = new InjectionToken('basePath'); export const COLLECTION_FORMATS = { - csv: ',', - tsv: ' ', - ssv: ' ', - pipes: '|', -}; + 'csv': ',', + 'tsv': ' ', + 'ssv': ' ', + 'pipes': '|' +} diff --git a/libs/perun/services/src/lib/dynamic-paginating.service.ts b/libs/perun/services/src/lib/dynamic-paginating.service.ts index 99824d5cd..233ce67ad 100644 --- a/libs/perun/services/src/lib/dynamic-paginating.service.ts +++ b/libs/perun/services/src/lib/dynamic-paginating.service.ts @@ -6,7 +6,7 @@ import { MemberGroupStatus, MembersManagerService, MembersOrderColumn, - PaginatedApplications, + PaginatedRichApplications, PaginatedAuditMessages, PaginatedRichMembers, PaginatedRichUsers, @@ -115,8 +115,9 @@ export class DynamicPaginatingService { dateTo: string, userId: number, voId: number, - groupId: number - ): Observable { + groupId: number, + getDetails: boolean + ): Observable { return this.registrarService.getApplicationsPage({ vo: voId, query: { @@ -124,8 +125,9 @@ export class DynamicPaginatingService { offset: pageIndex * pageSize, order: sortOrder, sortColumn: sortColumn, - includeGroupApplications: includeGroupApps, searchString: searchString, + includeGroupApplications: includeGroupApps, + getDetails: getDetails, states: states, dateFrom: dateFrom, dateTo: dateTo, diff --git a/libs/perun/services/src/lib/dynamicDataSource.ts b/libs/perun/services/src/lib/dynamicDataSource.ts index 696c5863d..ab6935a1f 100644 --- a/libs/perun/services/src/lib/dynamicDataSource.ts +++ b/libs/perun/services/src/lib/dynamicDataSource.ts @@ -1,6 +1,4 @@ import { DataSource } from '@angular/cdk/collections'; -import { Observable, BehaviorSubject, of } from 'rxjs'; -import { catchError, finalize } from 'rxjs/operators'; import { Application, ApplicationsOrderColumn, @@ -8,7 +6,7 @@ import { AuditMessage, MemberGroupStatus, MembersOrderColumn, - PaginatedApplications, + PaginatedRichApplications, PaginatedAuditMessages, PaginatedRichMembers, PaginatedRichUsers, @@ -17,7 +15,10 @@ import { SortingOrder, UsersOrderColumn, VoMemberStatuses, + RichApplication, } from '@perun-web-apps/perun/openapi'; +import { BehaviorSubject, Observable, of } from 'rxjs'; +import { catchError, finalize } from 'rxjs/operators'; import { DynamicPaginatingService } from './dynamic-paginating.service'; import { GuiAuthResolver } from './gui-auth-resolver.service'; @@ -168,7 +169,8 @@ export class DynamicDataSource implements DataSource { dateTo: string, userId: number, groupId: number, - voId: number + voId: number, + details?:boolean ) { this.loadingSubject.next(true); this.latestQueryTime = Date.now(); @@ -187,7 +189,8 @@ export class DynamicDataSource implements DataSource { dateTo, userId, voId, - groupId + groupId, + details ?? false ) .pipe( catchError(() => of([])), @@ -195,21 +198,22 @@ export class DynamicDataSource implements DataSource { ) .subscribe((paginatedApplications) => { if (this.latestQueryTime <= thisQueryTime) { - const data: Application[] = (paginatedApplications).data; + const data = (paginatedApplications).data; if (data !== null && data.length !== 0) { - if (data[0].group) { + const d = data; + if (d[0].group) { this.routeAuth = this.authzService.isAuthorized( 'getApplicationsForGroup_Group_List_policy', - [data[0].group] + [d[0].group] ); } else { this.routeAuth = this.authzService.isAuthorized( 'getApplicationsForVo_Vo_List_Boolean_policy', - [data[0].vo] + [d[0].vo] ); } } - this.allObjectCount = (paginatedApplications).totalCount; + this.allObjectCount = (paginatedApplications).totalCount; // @ts-ignore this.dataSubject.next(data); } From 3f7165858b206335c42e37f2a4991d6c687dbe8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Hako=C5=A1?= Date: Thu, 3 Mar 2022 11:27:37 +0100 Subject: [PATCH 2/6] fix(admin): fix prettier * run prettier write * fixed console error --- .../applications-dynamic-list.component.html | 28 +- .../applications-dynamic-list.component.ts | 32 +- .../vo-applications.component.ts | 1 - libs/perun/openapi/src/lib/api.module.ts | 39 +- libs/perun/openapi/src/lib/api/api.ts | 23 +- .../src/lib/api/attributesManager.service.ts | 25711 +++++++++------- .../lib/api/auditMessagesManager.service.ts | 1364 +- .../src/lib/api/authzResolver.service.ts | 3745 ++- .../src/lib/api/cabinetManager.service.ts | 3930 ++- .../src/lib/api/databaseManager.service.ts | 491 +- .../src/lib/api/extSourcesManager.service.ts | 1887 +- .../src/lib/api/facilitiesManager.service.ts | 14626 +++++---- ...facilitiesManagerByFacilityName.service.ts | 189 +- .../src/lib/api/groupsManager.service.ts | 6236 ++-- .../src/lib/api/integrationManager.service.ts | 168 +- .../src/lib/api/membersManager.service.ts | 7773 +++-- .../src/lib/api/ownersManager.service.ts | 701 +- .../src/lib/api/rTMessagesManager.service.ts | 772 +- .../src/lib/api/registrarManager.service.ts | 7448 +++-- .../src/lib/api/resourcesManager.service.ts | 12908 ++++---- .../src/lib/api/servicesManager.service.ts | 10011 +++--- .../src/lib/api/tasksManager.service.ts | 3044 +- .../src/lib/api/usersManager.service.ts | 8949 +++--- .../openapi/src/lib/api/utils.service.ts | 670 +- .../openapi/src/lib/api/vosManager.service.ts | 4823 +-- libs/perun/openapi/src/lib/configuration.ts | 143 +- libs/perun/openapi/src/lib/encoder.ts | 25 +- libs/perun/openapi/src/lib/index.ts | 2 +- .../perun/openapi/src/lib/model/actionType.ts | 14 +- .../src/lib/model/addUserExtSourceInput.ts | 8 +- libs/perun/openapi/src/lib/model/appState.ts | 10 +- libs/perun/openapi/src/lib/model/appType.ts | 8 +- .../openapi/src/lib/model/application.ts | 32 +- .../openapi/src/lib/model/applicationForm.ts | 18 +- .../src/lib/model/applicationFormItem.ts | 67 +- .../src/lib/model/applicationFormItemData.ts | 16 +- .../openapi/src/lib/model/applicationMail.ts | 16 +- .../src/lib/model/applicationsOrderColumn.ts | 25 +- .../src/lib/model/applicationsPageQuery.ts | 28 +- .../openapi/src/lib/model/assignedGroup.ts | 14 +- .../openapi/src/lib/model/assignedMember.ts | 8 +- .../openapi/src/lib/model/assignedResource.ts | 18 +- libs/perun/openapi/src/lib/model/attribute.ts | 14 +- .../openapi/src/lib/model/attributeAction.ts | 6 +- .../src/lib/model/attributeDefinition.ts | 24 +- .../openapi/src/lib/model/attributePolicy.ts | 12 +- .../lib/model/attributePolicyCollection.ts | 12 +- .../openapi/src/lib/model/attributeRights.ts | 10 +- .../perun/openapi/src/lib/model/auditEvent.ts | 32 +- .../openapi/src/lib/model/auditMessage.ts | 14 +- .../src/lib/model/auditMessagesPageQuery.ts | 10 +- libs/perun/openapi/src/lib/model/auditable.ts | 16 +- libs/perun/openapi/src/lib/model/author.ts | 18 +- .../perun/openapi/src/lib/model/authorship.ts | 14 +- libs/perun/openapi/src/lib/model/ban.ts | 8 +- .../openapi/src/lib/model/banOnFacility.ts | 8 +- .../openapi/src/lib/model/banOnResource.ts | 8 +- libs/perun/openapi/src/lib/model/banOnVo.ts | 8 +- libs/perun/openapi/src/lib/model/brand.ts | 10 +- libs/perun/openapi/src/lib/model/candidate.ts | 10 +- libs/perun/openapi/src/lib/model/category.ts | 8 +- .../openapi/src/lib/model/destination.ts | 10 +- .../lib/model/destinationPropagationType.ts | 8 +- .../openapi/src/lib/model/destinationType.ts | 31 +- .../openapi/src/lib/model/enrichedFacility.ts | 12 +- .../openapi/src/lib/model/enrichedGroup.ts | 8 +- .../openapi/src/lib/model/enrichedHost.ts | 8 +- .../openapi/src/lib/model/enrichedResource.ts | 8 +- libs/perun/openapi/src/lib/model/extSource.ts | 8 +- .../openapi/src/lib/model/extSourceObject.ts | 6 +- libs/perun/openapi/src/lib/model/facility.ts | 8 +- .../src/lib/model/facilityPropagationState.ts | 10 +- .../openapi/src/lib/model/facilityState.ts | 10 +- .../openapi/src/lib/model/genDataNode.ts | 10 +- .../src/lib/model/genMemberDataNode.ts | 6 +- libs/perun/openapi/src/lib/model/group.ts | 16 +- .../openapi/src/lib/model/groupMemberData.ts | 8 +- .../src/lib/model/groupMemberRelation.ts | 44 +- .../src/lib/model/groupResourceStatus.ts | 10 +- .../src/lib/model/groupsOrderColumn.ts | 8 +- .../openapi/src/lib/model/groupsPageQuery.ts | 16 +- .../openapi/src/lib/model/hashedGenData.ts | 8 +- libs/perun/openapi/src/lib/model/host.ts | 6 +- libs/perun/openapi/src/lib/model/identity.ts | 14 +- .../src/lib/model/inlineResponse200.ts | 19 +- .../model/inputAddApplicationMailForGroup.ts | 8 +- .../lib/model/inputAddApplicationMailForVo.ts | 8 +- .../inputAddDestinationToMultipleServices.ts | 14 +- ...AddDestinationsDefinedByHostsOnFacility.ts | 8 +- .../model/inputAssignResourceTagToResource.ts | 14 +- .../src/lib/model/inputAttributeDefinition.ts | 6 +- .../model/inputAttributePolicyCollections.ts | 6 +- .../src/lib/model/inputAttributeRights.ts | 6 +- .../src/lib/model/inputCopyResource.ts | 16 +- .../model/inputCreateAttributeDefinition.ts | 6 +- .../src/lib/model/inputCreateAuthorship.ts | 6 +- .../src/lib/model/inputCreateCategory.ts | 6 +- .../src/lib/model/inputCreateCategory1.ts | 20 +- .../model/inputCreateMemberForCandidate.ts | 10 +- .../src/lib/model/inputCreateMemberForUser.ts | 10 +- .../model/inputCreateMemberFromExtSource.ts | 16 +- .../openapi/src/lib/model/inputCreateOwner.ts | 39 +- .../src/lib/model/inputCreatePublication.ts | 6 +- .../lib/model/inputCreatePublicationSystem.ts | 6 +- .../inputCreateResourceTagWithResourceTag.ts | 14 +- .../src/lib/model/inputCreateService.ts | 6 +- .../src/lib/model/inputCreateServiceUser.ts | 8 +- .../lib/model/inputCreateServicesPackage.ts | 6 +- .../lib/model/inputCreateSponsoredMember.ts | 14 +- .../lib/model/inputCreateSponsoredMember1.ts | 24 +- .../inputCreateSponsoredMemberFromCSV.ts | 38 +- .../src/lib/model/inputCreateThanks.ts | 6 +- .../src/lib/model/inputCreateVoWithVo.ts | 6 +- .../src/lib/model/inputDeleteGroups.ts | 14 +- .../src/lib/model/inputDeleteResourceTag.ts | 6 +- .../src/lib/model/inputEntitylessAttribute.ts | 14 +- .../src/lib/model/inputFormItemData.ts | 14 +- .../src/lib/model/inputFormItemData1.ts | 14 +- .../inputGetAllResourcesByResourceTag.ts | 14 +- .../src/lib/model/inputGetMessagesPage.ts | 6 +- .../model/inputGetPaginatedApplications.ts | 8 +- .../src/lib/model/inputGetPaginatedGroups.ts | 10 +- .../src/lib/model/inputGetPaginatedMembers.ts | 10 +- .../lib/model/inputGetPaginatedSubgroups.ts | 10 +- .../src/lib/model/inputGetPaginatedUsers.ts | 8 +- .../src/lib/model/inputLockPublications.ts | 8 +- .../inputRemoveResourceTagFromResource.ts | 14 +- .../openapi/src/lib/model/inputSendMessage.ts | 22 +- .../openapi/src/lib/model/inputSetBan.ts | 6 +- .../lib/model/inputSetBanForUserOnFacility.ts | 6 +- .../lib/model/inputSetFacilityAttribute.ts | 14 +- .../lib/model/inputSetFacilityAttributes.ts | 14 +- ...cilityResourceGroupUserMemberAttributes.ts | 46 +- ...SetFacilityResourceUserMemberAttributes.ts | 38 +- .../model/inputSetFacilityUserAttributes.ts | 22 +- .../src/lib/model/inputSetGroupAttribute.ts | 14 +- .../src/lib/model/inputSetGroupAttributes.ts | 14 +- .../model/inputSetGroupResourceAttribute.ts | 22 +- .../model/inputSetGroupResourceAttributes.ts | 22 +- .../src/lib/model/inputSetHostAttribute.ts | 14 +- .../src/lib/model/inputSetHostAttributes.ts | 14 +- .../src/lib/model/inputSetMemberAttribute.ts | 14 +- .../src/lib/model/inputSetMemberAttributes.ts | 14 +- .../lib/model/inputSetMemberGroupAttribute.ts | 22 +- .../model/inputSetMemberGroupAttributes.ts | 22 +- .../inputSetMemberGroupWithUserAttributes.ts | 24 +- ...inputSetMemberResourceAndUserAttributes.ts | 24 +- .../model/inputSetMemberResourceAttribute.ts | 22 +- .../model/inputSetMemberResourceAttributes.ts | 22 +- .../model/inputSetMemberWithUserAttributes.ts | 16 +- .../lib/model/inputSetResourceAttribute.ts | 14 +- .../lib/model/inputSetResourceAttributes.ts | 14 +- .../model/inputSetResourceGroupAttributes.ts | 22 +- ...nputSetResourceGroupWithGroupAttributes.ts | 24 +- .../src/lib/model/inputSetSendingEnabled.ts | 8 +- .../src/lib/model/inputSetSponsoredMember.ts | 16 +- .../src/lib/model/inputSetUserAttribute.ts | 14 +- .../src/lib/model/inputSetUserAttributes.ts | 14 +- .../model/inputSetUserExtSourceAttribute.ts | 14 +- .../model/inputSetUserExtSourceAttributes.ts | 14 +- .../model/inputSetUserFacilityAttribute.ts | 22 +- .../model/inputSetUserFacilityAttributes.ts | 22 +- .../src/lib/model/inputSetVoAttribute.ts | 14 +- .../src/lib/model/inputSetVoAttributes.ts | 14 +- .../openapi/src/lib/model/inputSetVoBan.ts | 6 +- .../src/lib/model/inputSpecificMember.ts | 12 +- .../src/lib/model/inputSubmitApplication.ts | 8 +- .../lib/model/inputUpdateApplicationMail.ts | 6 +- .../openapi/src/lib/model/inputUpdateBan.ts | 6 +- .../lib/model/inputUpdateBanForFacility.ts | 6 +- .../src/lib/model/inputUpdateCategory.ts | 6 +- .../src/lib/model/inputUpdateFacility.ts | 6 +- .../openapi/src/lib/model/inputUpdateForm.ts | 6 +- .../lib/model/inputUpdateFormItemsForGroup.ts | 14 +- .../lib/model/inputUpdateFormItemsForVo.ts | 14 +- .../openapi/src/lib/model/inputUpdateGroup.ts | 6 +- .../src/lib/model/inputUpdatePublication.ts | 6 +- .../lib/model/inputUpdatePublicationSystem.ts | 6 +- .../src/lib/model/inputUpdateResource.ts | 6 +- .../src/lib/model/inputUpdateResourceTag.ts | 6 +- .../src/lib/model/inputUpdateService.ts | 6 +- .../lib/model/inputUpdateServicesPackage.ts | 6 +- .../openapi/src/lib/model/inputUpdateUser.ts | 6 +- .../openapi/src/lib/model/inputUpdateVo.ts | 6 +- libs/perun/openapi/src/lib/model/itemTexts.ts | 14 +- libs/perun/openapi/src/lib/model/mailText.ts | 10 +- libs/perun/openapi/src/lib/model/mailType.ts | 28 +- libs/perun/openapi/src/lib/model/member.ts | 20 +- .../openapi/src/lib/model/memberCandidate.ts | 10 +- .../src/lib/model/memberGroupStatus.ts | 6 +- .../src/lib/model/memberWithSponsors.ts | 8 +- .../src/lib/model/membersOrderColumn.ts | 6 +- .../openapi/src/lib/model/membersPageQuery.ts | 20 +- .../openapi/src/lib/model/namespaceRules.ts | 18 +- libs/perun/openapi/src/lib/model/newApps.ts | 12 +- libs/perun/openapi/src/lib/model/owner.ts | 21 +- .../src/lib/model/paginatedAuditMessages.ts | 12 +- .../lib/model/paginatedRichApplications.ts | 12 +- .../src/lib/model/paginatedRichGroups.ts | 12 +- .../src/lib/model/paginatedRichMembers.ts | 12 +- .../src/lib/model/paginatedRichUsers.ts | 12 +- .../openapi/src/lib/model/perunAppsConfig.ts | 6 +- libs/perun/openapi/src/lib/model/perunBean.ts | 8 +- .../openapi/src/lib/model/perunException.ts | 10 +- .../openapi/src/lib/model/perunPolicy.ts | 10 +- .../openapi/src/lib/model/perunPrincipal.ts | 22 +- .../openapi/src/lib/model/publication.ts | 32 +- .../src/lib/model/publicationForGUI.ts | 10 +- .../src/lib/model/publicationSystem.ts | 16 +- libs/perun/openapi/src/lib/model/rTMessage.ts | 8 +- libs/perun/openapi/src/lib/model/resource.ts | 14 +- .../openapi/src/lib/model/resourceState.ts | 8 +- .../openapi/src/lib/model/resourceTag.ts | 8 +- .../openapi/src/lib/model/richApplication.ts | 6 +- .../openapi/src/lib/model/richDestination.ts | 10 +- .../openapi/src/lib/model/richFacility.ts | 6 +- libs/perun/openapi/src/lib/model/richGroup.ts | 6 +- .../perun/openapi/src/lib/model/richMember.ts | 12 +- .../openapi/src/lib/model/richResource.ts | 10 +- libs/perun/openapi/src/lib/model/richUser.ts | 8 +- .../src/lib/model/richUserExtSource.ts | 8 +- .../src/lib/model/roleManagementRules.ts | 16 +- .../perun/openapi/src/lib/model/roleObject.ts | 16 +- .../openapi/src/lib/model/securityTeam.ts | 8 +- libs/perun/openapi/src/lib/model/service.ts | 16 +- .../src/lib/model/serviceAttributes.ts | 8 +- .../openapi/src/lib/model/serviceForGUI.ts | 6 +- .../openapi/src/lib/model/serviceState.ts | 18 +- .../openapi/src/lib/model/servicesPackage.ts | 8 +- .../setRoleWithGroupComplementaryObject.ts | 16 +- .../setRoleWithUserComplementaryObject.ts | 16 +- .../openapi/src/lib/model/simpleAttribute.ts | 12 +- .../openapi/src/lib/model/sortingOrder.ts | 6 +- libs/perun/openapi/src/lib/model/sponsor.ts | 20 +- .../src/lib/model/sponsoredUserData.ts | 22 +- libs/perun/openapi/src/lib/model/task.ts | 38 +- .../lib/model/taskAndDestinationIdObject.ts | 20 +- .../lib/model/taskAndDestinationNameObject.ts | 28 +- .../openapi/src/lib/model/taskIdObject.ts | 12 +- .../perun/openapi/src/lib/model/taskResult.ts | 22 +- .../src/lib/model/taskResultIdObject.ts | 12 +- .../openapi/src/lib/model/taskResultStatus.ts | 10 +- .../perun/openapi/src/lib/model/taskStatus.ts | 34 +- libs/perun/openapi/src/lib/model/thanks.ts | 14 +- .../openapi/src/lib/model/thanksForGUI.ts | 6 +- libs/perun/openapi/src/lib/model/type.ts | 49 +- .../unsetRoleWithGroupComplementaryObject.ts | 16 +- .../unsetRoleWithUserComplementaryObject.ts | 16 +- libs/perun/openapi/src/lib/model/user.ts | 24 +- .../openapi/src/lib/model/userExtSource.ts | 22 +- .../openapi/src/lib/model/usersOrderColumn.ts | 6 +- .../openapi/src/lib/model/usersPageQuery.ts | 26 +- libs/perun/openapi/src/lib/model/vo.ts | 8 +- .../openapi/src/lib/model/voAdminRoles.ts | 8 +- .../openapi/src/lib/model/voMemberStatuses.ts | 10 +- libs/perun/openapi/src/lib/variables.ts | 10 +- .../services/src/lib/dynamicDataSource.ts | 2 +- 257 files changed, 68393 insertions(+), 50495 deletions(-) diff --git a/apps/admin-gui/src/app/vos/components/applications-dynamic-list/applications-dynamic-list.component.html b/apps/admin-gui/src/app/vos/components/applications-dynamic-list/applications-dynamic-list.component.html index 0842649d5..6f98064be 100644 --- a/apps/admin-gui/src/app/vos/components/applications-dynamic-list/applications-dynamic-list.component.html +++ b/apps/admin-gui/src/app/vos/components/applications-dynamic-list/applications-dynamic-list.component.html @@ -108,27 +108,13 @@ - - - + + + + + diff --git a/apps/admin-gui/src/app/vos/components/applications-dynamic-list/applications-dynamic-list.component.ts b/apps/admin-gui/src/app/vos/components/applications-dynamic-list/applications-dynamic-list.component.ts index 48b3584b0..ec2e72579 100644 --- a/apps/admin-gui/src/app/vos/components/applications-dynamic-list/applications-dynamic-list.component.ts +++ b/apps/admin-gui/src/app/vos/components/applications-dynamic-list/applications-dynamic-list.component.ts @@ -80,7 +80,7 @@ export class ApplicationsDynamicListComponent implements OnInit, OnChanges, Afte refreshTable = false; @Input() - showMoreData = false; + parsedColumns: string[] = []; dataSource: DynamicDataSource; @@ -103,6 +103,7 @@ export class ApplicationsDynamicListComponent implements OnInit, OnChanges, Afte this.dynamicPaginatingService, this.authResolver ); + this.dataSource.loadApplications( this.tableConfigService.getTablePageSize(this.tableId), 0, @@ -117,6 +118,16 @@ export class ApplicationsDynamicListComponent implements OnInit, OnChanges, Afte this.group?.id ?? null, this.getVoId() ); + + this.dataSource.loading$.subscribe((val) => { + if (val) return; + if (!this.displayedColumns.includes('fedInfo')) { + this.parsedColumns = []; + return; + } + const data = this.dataSource.getData()[0]; + this.parseColumns(data.formData); + }); } ngOnChanges() { @@ -303,4 +314,23 @@ export class ApplicationsDynamicListComponent implements OnInit, OnChanges, Afte getFormDataString(data: ApplicationFormItemData) { return this.stringify(data.formItem); } + + parseColumns(array: Array) { + array.forEach((val) => { + if (!this.displayedColumns.includes(val.shortname)) { + this.displayedColumns.push(val.shortname); + } + if (!this.parsedColumns.includes(val.shortname)) { + this.parsedColumns.push(val.shortname); + } + }); + } + + getValue(array: Array, colName: string) { + const filter = array.filter((value) => value.shortname === colName); + if (filter.length === 0) { + return ''; + } + return filter[0].value ?? filter[0].prefilledValue; + } } diff --git a/apps/admin-gui/src/app/vos/pages/vo-detail-page/vo-applications/vo-applications.component.ts b/apps/admin-gui/src/app/vos/pages/vo-detail-page/vo-applications/vo-applications.component.ts index f7bc09677..0f1272443 100644 --- a/apps/admin-gui/src/app/vos/pages/vo-detail-page/vo-applications/vo-applications.component.ts +++ b/apps/admin-gui/src/app/vos/pages/vo-detail-page/vo-applications/vo-applications.component.ts @@ -51,7 +51,6 @@ export class VoApplicationsComponent implements OnInit { 'modifiedBy', 'modifiedAt', 'fedInfo', - 'formData' ]; currentColumns: string[] = []; filterValue = ''; diff --git a/libs/perun/openapi/src/lib/api.module.ts b/libs/perun/openapi/src/lib/api.module.ts index 28e7ab21a..980895001 100644 --- a/libs/perun/openapi/src/lib/api.module.ts +++ b/libs/perun/openapi/src/lib/api.module.ts @@ -2,7 +2,6 @@ import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core import { Configuration } from './configuration'; import { HttpClient } from '@angular/common/http'; - import { AttributesManagerService } from './api/attributesManager.service'; import { AuditMessagesManagerService } from './api/auditMessagesManager.service'; import { AuthzResolverService } from './api/authzResolver.service'; @@ -25,9 +24,9 @@ import { UtilsService } from './api/utils.service'; import { VosManagerService } from './api/vosManager.service'; @NgModule({ - imports: [], + imports: [], declarations: [], - exports: [], + exports: [], providers: [ AttributesManagerService, AuditMessagesManagerService, @@ -48,24 +47,26 @@ import { VosManagerService } from './api/vosManager.service'; TasksManagerService, UsersManagerService, UtilsService, - VosManagerService ] + VosManagerService, + ], }) export class ApiModule { - public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders { - return { - ngModule: ApiModule, - providers: [ { provide: Configuration, useFactory: configurationFactory } ] - }; - } + public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders { + return { + ngModule: ApiModule, + providers: [{ provide: Configuration, useFactory: configurationFactory }], + }; + } - constructor( @Optional() @SkipSelf() parentModule: ApiModule, - @Optional() http: HttpClient) { - if (parentModule) { - throw new Error('ApiModule is already loaded. Import in your base AppModule only.'); - } - if (!http) { - throw new Error('You need to import the HttpClientModule in your AppModule! \n' + - 'See also https://github.com/angular/angular/issues/20575'); - } + constructor(@Optional() @SkipSelf() parentModule: ApiModule, @Optional() http: HttpClient) { + if (parentModule) { + throw new Error('ApiModule is already loaded. Import in your base AppModule only.'); + } + if (!http) { + throw new Error( + 'You need to import the HttpClientModule in your AppModule! \n' + + 'See also https://github.com/angular/angular/issues/20575' + ); } + } } diff --git a/libs/perun/openapi/src/lib/api/api.ts b/libs/perun/openapi/src/lib/api/api.ts index 1c66c72f4..47a721102 100644 --- a/libs/perun/openapi/src/lib/api/api.ts +++ b/libs/perun/openapi/src/lib/api/api.ts @@ -38,4 +38,25 @@ export * from './utils.service'; import { UtilsService } from './utils.service'; export * from './vosManager.service'; import { VosManagerService } from './vosManager.service'; -export const APIS = [AttributesManagerService, AuditMessagesManagerService, AuthzResolverService, CabinetManagerService, DatabaseManagerService, ExtSourcesManagerService, FacilitiesManagerService, FacilitiesManagerByFacilityNameService, GroupsManagerService, IntegrationManagerService, MembersManagerService, OwnersManagerService, RTMessagesManagerService, RegistrarManagerService, ResourcesManagerService, ServicesManagerService, TasksManagerService, UsersManagerService, UtilsService, VosManagerService]; +export const APIS = [ + AttributesManagerService, + AuditMessagesManagerService, + AuthzResolverService, + CabinetManagerService, + DatabaseManagerService, + ExtSourcesManagerService, + FacilitiesManagerService, + FacilitiesManagerByFacilityNameService, + GroupsManagerService, + IntegrationManagerService, + MembersManagerService, + OwnersManagerService, + RTMessagesManagerService, + RegistrarManagerService, + ResourcesManagerService, + ServicesManagerService, + TasksManagerService, + UsersManagerService, + UtilsService, + VosManagerService, +]; diff --git a/libs/perun/openapi/src/lib/api/attributesManager.service.ts b/libs/perun/openapi/src/lib/api/attributesManager.service.ts index a48da15bf..fe6b7aca9 100644 --- a/libs/perun/openapi/src/lib/api/attributesManager.service.ts +++ b/libs/perun/openapi/src/lib/api/attributesManager.service.ts @@ -11,11 +11,17 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { Attribute } from '../model/attribute'; import { AttributeDefinition } from '../model/attributeDefinition'; @@ -61,10710 +67,15001 @@ import { InputSetVoAttribute } from '../model/inputSetVoAttribute'; import { InputSetVoAttributes } from '../model/inputSetVoAttributes'; import { PerunException } from '../model/perunException'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - - +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class AttributesManagerService { - - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - - - /** - * Converts attribute to nonunique - unmarks unique flag from attribute definition, and deletes all values from a special table with unique constraint that ensures that all values remain unique. - * @param attributeDefinition id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public convertAttributeToNonunique(attributeDefinition: number, observe?: 'body', reportProgress?: boolean): Observable; - public convertAttributeToNonunique(attributeDefinition: number, observe?: 'response', reportProgress?: boolean): Observable>; - public convertAttributeToNonunique(attributeDefinition: number, observe?: 'events', reportProgress?: boolean): Observable>; - public convertAttributeToNonunique(attributeDefinition: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (attributeDefinition === null || attributeDefinition === undefined) { - throw new Error('Required parameter attributeDefinition was null or undefined when calling convertAttributeToNonunique.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (attributeDefinition !== undefined && attributeDefinition !== null) { - queryParameters = queryParameters.set('attributeDefinition', attributeDefinition); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/convertAttributeToNonunique`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Converts attribute to unique - marks its definition as unique and ensures that all its values are unique. Entityless attributes cannot be converted to unique, only attributes attached to PerunBeans or pairs of PerunBeans. - * @param attributeDefinition id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public convertAttributeToUnique(attributeDefinition: number, observe?: 'body', reportProgress?: boolean): Observable; - public convertAttributeToUnique(attributeDefinition: number, observe?: 'response', reportProgress?: boolean): Observable>; - public convertAttributeToUnique(attributeDefinition: number, observe?: 'events', reportProgress?: boolean): Observable>; - public convertAttributeToUnique(attributeDefinition: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (attributeDefinition === null || attributeDefinition === undefined) { - throw new Error('Required parameter attributeDefinition was null or undefined when calling convertAttributeToUnique.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (attributeDefinition !== undefined && attributeDefinition !== null) { - queryParameters = queryParameters.set('attributeDefinition', attributeDefinition); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/convertAttributeToUnique`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Creates AttributeDefinition. - * @param inputCreateAttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createAttributeDefinition(inputCreateAttributeDefinition: InputCreateAttributeDefinition, observe?: 'body', reportProgress?: boolean): Observable; - public createAttributeDefinition(inputCreateAttributeDefinition: InputCreateAttributeDefinition, observe?: 'response', reportProgress?: boolean): Observable>; - public createAttributeDefinition(inputCreateAttributeDefinition: InputCreateAttributeDefinition, observe?: 'events', reportProgress?: boolean): Observable>; - public createAttributeDefinition(inputCreateAttributeDefinition: InputCreateAttributeDefinition, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputCreateAttributeDefinition === null || inputCreateAttributeDefinition === undefined) { - throw new Error('Required parameter inputCreateAttributeDefinition was null or undefined when calling createAttributeDefinition.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/createAttribute`, - inputCreateAttributeDefinition, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Deletes attribute definition from Perun including all values set for any entity. - * @param attribute id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteAttributeDefinition(attribute: number, observe?: 'body', reportProgress?: boolean): Observable; - public deleteAttributeDefinition(attribute: number, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteAttributeDefinition(attribute: number, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteAttributeDefinition(attribute: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (attribute === null || attribute === undefined) { - throw new Error('Required parameter attribute was null or undefined when calling deleteAttributeDefinition.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (attribute !== undefined && attribute !== null) { - queryParameters = queryParameters.set('attribute', attribute); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/deleteAttribute`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Deletes attribute definitions from Perun including all values set for any entity. - * @param attributes list of attribute ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteAttributeDefinitions(attributes: Array, observe?: 'body', reportProgress?: boolean): Observable; - public deleteAttributeDefinitions(attributes: Array, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteAttributeDefinitions(attributes: Array, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteAttributeDefinitions(attributes: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (attributes === null || attributes === undefined) { - throw new Error('Required parameter attributes was null or undefined when calling deleteAttributeDefinitions.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/deleteAttributes`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns all AttributeDefinitions. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllAttributeDefinitions(observe?: 'body', reportProgress?: boolean): Observable>; - public getAllAttributeDefinitions(observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllAttributeDefinitions(observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllAttributeDefinitions(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributesDefinition`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns an Attribute by its name or id. - * This method cannot be fully described correctly in OpenID, because it cannot describe allowed combinations of parameters. One of attributeName, attributeId is required. The other parameters specify ids that can be combined in the following ways: (facility), (user), (user,facility), (vo), (member), (group), (resource), (member,group), (member,resource), (group,resource),(userExtSource), (host), (key) Use the specialized methods getFacilityAttributeByName(), getMemberResourceAttributeById() etc. - * @param attributeName full name of attribute (namespace + \':\' + friendlyName) - * @param attributeId id of attribute - * @param facility id of Facility - * @param user id of User - * @param vo id of Vo - * @param resource id of Resource - * @param member id of Member - * @param group id of Group - * @param host id of Host - * @param userExtSource id of UserExtSource - * @param key key for entityless attribute - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAttribute(attributeName?: string, attributeId?: number, facility?: number, user?: number, vo?: number, resource?: number, member?: number, group?: number, host?: number, userExtSource?: number, key?: string, observe?: 'body', reportProgress?: boolean): Observable; - public getAttribute(attributeName?: string, attributeId?: number, facility?: number, user?: number, vo?: number, resource?: number, member?: number, group?: number, host?: number, userExtSource?: number, key?: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getAttribute(attributeName?: string, attributeId?: number, facility?: number, user?: number, vo?: number, resource?: number, member?: number, group?: number, host?: number, userExtSource?: number, key?: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getAttribute(attributeName?: string, attributeId?: number, facility?: number, user?: number, vo?: number, resource?: number, member?: number, group?: number, host?: number, userExtSource?: number, key?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (attributeName !== undefined && attributeName !== null) { - queryParameters = queryParameters.set('attributeName', attributeName); - } - if (attributeId !== undefined && attributeId !== null) { - queryParameters = queryParameters.set('attributeId', attributeId); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (host !== undefined && host !== null) { - queryParameters = queryParameters.set('host', host); - } - if (userExtSource !== undefined && userExtSource !== null) { - queryParameters = queryParameters.set('userExtSource', userExtSource); - } - if (key !== undefined && key !== null) { - queryParameters = queryParameters.set('key', key); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/any`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns an AttributeDefinition by its id. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAttributeDefinitionById(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public getAttributeDefinitionById(id: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getAttributeDefinitionById(id: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getAttributeDefinitionById(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getAttributeDefinitionById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttributeDefinitionById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns an AttributeDefinition by its name. - * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAttributeDefinitionByName(attributeName: string, observe?: 'body', reportProgress?: boolean): Observable; - public getAttributeDefinitionByName(attributeName: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getAttributeDefinitionByName(attributeName: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getAttributeDefinitionByName(attributeName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (attributeName === null || attributeName === undefined) { - throw new Error('Required parameter attributeName was null or undefined when calling getAttributeDefinitionByName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (attributeName !== undefined && attributeName !== null) { - queryParameters = queryParameters.set('attributeName', attributeName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttributeDefinition`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns all AttributeDefinitions in a namespace. - * @param namespace name of namespace to obtain attribute definitions from - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAttributeDefinitionsByNamespace(namespace: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getAttributeDefinitionsByNamespace(namespace: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAttributeDefinitionsByNamespace(namespace: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAttributeDefinitionsByNamespace(namespace: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling getAttributeDefinitionsByNamespace.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (namespace !== undefined && namespace !== null) { - queryParameters = queryParameters.set('namespace', namespace); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributesDefinitionByNamespace`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Generates text file describing dependencies between attribute modules. The format of text file can be specified by parameter. Modules that has no dependency relations are omitted. - * @param format Currently supported formats are DOT and TGF. - * @param attrName Attribute name which dependencies will be found. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAttributeModulesDependenciesForAttributeGraphText(format: 'DOT' | 'TGF', attrName: string, observe?: 'body', reportProgress?: boolean): Observable; - public getAttributeModulesDependenciesForAttributeGraphText(format: 'DOT' | 'TGF', attrName: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getAttributeModulesDependenciesForAttributeGraphText(format: 'DOT' | 'TGF', attrName: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getAttributeModulesDependenciesForAttributeGraphText(format: 'DOT' | 'TGF', attrName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (format === null || format === undefined) { - throw new Error('Required parameter format was null or undefined when calling getAttributeModulesDependenciesForAttributeGraphText.'); - } - if (attrName === null || attrName === undefined) { - throw new Error('Required parameter attrName was null or undefined when calling getAttributeModulesDependenciesForAttributeGraphText.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (format !== undefined && format !== null) { - queryParameters = queryParameters.set('format', format); - } - if (attrName !== undefined && attrName !== null) { - queryParameters = queryParameters.set('attrName', attrName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttributeModulesDependenciesGraphText/for-attribute`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Generates text file describing dependencies between attribute modules. The format of text file can be specified by parameter. Modules that has no dependency relations are omitted. - * @param format Currently supported formats are DOT and TGF. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAttributeModulesDependenciesGraphText(format: 'DOT' | 'TGF', observe?: 'body', reportProgress?: boolean): Observable; - public getAttributeModulesDependenciesGraphText(format: 'DOT' | 'TGF', observe?: 'response', reportProgress?: boolean): Observable>; - public getAttributeModulesDependenciesGraphText(format: 'DOT' | 'TGF', observe?: 'events', reportProgress?: boolean): Observable>; - public getAttributeModulesDependenciesGraphText(format: 'DOT' | 'TGF', observe: any = 'body', reportProgress: boolean = false ): Observable { - if (format === null || format === undefined) { - throw new Error('Required parameter format was null or undefined when calling getAttributeModulesDependenciesGraphText.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (format !== undefined && format !== null) { - queryParameters = queryParameters.set('format', format); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttributeModulesDependenciesGraphText`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Gets attribute policy collections for an attribute definition with given id. - * @param attributeId id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAttributePolicyCollections(attributeId: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAttributePolicyCollections(attributeId: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAttributePolicyCollections(attributeId: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAttributePolicyCollections(attributeId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (attributeId === null || attributeId === undefined) { - throw new Error('Required parameter attributeId was null or undefined when calling getAttributePolicyCollections.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (attributeId !== undefined && attributeId !== null) { - queryParameters = queryParameters.set('attributeId', attributeId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributePolicyCollections`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Gets AttributeRights for specified Attribute. Rights specify which Role can do particular actions (read / write) with Attribute. Method always return rights for following roles: VOADMIN, GROUPADMIN, FACILITYADMIN, SELF. - * @param attributeId id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAttributeRights(attributeId: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAttributeRights(attributeId: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAttributeRights(attributeId: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAttributeRights(attributeId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (attributeId === null || attributeId === undefined) { - throw new Error('Required parameter attributeId was null or undefined when calling getAttributeRights.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (attributeId !== undefined && attributeId !== null) { - queryParameters = queryParameters.set('attributeId', attributeId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributeRights`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns all AttributeDefinitions for every entity and possible combination of entities with rights. Only attribute definition of attributes user can read (or write) you will get. Combination of entities is based on provided parameters, which are optional (at least one must be present). - * @param member id of Member - * @param user id of User - * @param vo id of Vo - * @param group id of Group - * @param resource id of Resource - * @param facility id of Facility - * @param host id of Host - * @param userExtSource id of UserExtSource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAttributesDefinitionWithRights(member?: number, user?: number, vo?: number, group?: number, resource?: number, facility?: number, host?: number, userExtSource?: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAttributesDefinitionWithRights(member?: number, user?: number, vo?: number, group?: number, resource?: number, facility?: number, host?: number, userExtSource?: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAttributesDefinitionWithRights(member?: number, user?: number, vo?: number, group?: number, resource?: number, facility?: number, host?: number, userExtSource?: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAttributesDefinitionWithRights(member?: number, user?: number, vo?: number, group?: number, resource?: number, facility?: number, host?: number, userExtSource?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (host !== undefined && host !== null) { - queryParameters = queryParameters.set('host', host); - } - if (userExtSource !== undefined && userExtSource !== null) { - queryParameters = queryParameters.set('userExtSource', userExtSource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/urlinjsonout/attributesManager/getAttributesDefinitionWithRights`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns an entityless Attribute by its name. - * This is an overloaded method getAttribute, specialized for entityless key and attribute name. - * @param key key for entityless attribute - * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getEntitylessAttributeByName(key: string, attributeName: string, observe?: 'body', reportProgress?: boolean): Observable; - public getEntitylessAttributeByName(key: string, attributeName: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getEntitylessAttributeByName(key: string, attributeName: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getEntitylessAttributeByName(key: string, attributeName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (key === null || key === undefined) { - throw new Error('Required parameter key was null or undefined when calling getEntitylessAttributeByName.'); - } - if (attributeName === null || attributeName === undefined) { - throw new Error('Required parameter attributeName was null or undefined when calling getEntitylessAttributeByName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (key !== undefined && key !== null) { - queryParameters = queryParameters.set('key', key); - } - if (attributeName !== undefined && attributeName !== null) { - queryParameters = queryParameters.set('attributeName', attributeName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/name-entityless`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all entityless attributes with subject equaled String key. - * @param key key for entityless attributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getEntitylessAttributesByKey(key: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getEntitylessAttributesByKey(key: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getEntitylessAttributesByKey(key: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getEntitylessAttributesByKey(key: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (key === null || key === undefined) { - throw new Error('Required parameter key was null or undefined when calling getEntitylessAttributesByKey.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (key !== undefined && key !== null) { - queryParameters = queryParameters.set('key', key); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/key`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns all entityless attributes with attrName. - * @param attrName full name of attribute definition (namespace + \':\' + friendlyName) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getEntitylessAttributesByName(attrName: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getEntitylessAttributesByName(attrName: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getEntitylessAttributesByName(attrName: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getEntitylessAttributesByName(attrName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (attrName === null || attrName === undefined) { - throw new Error('Required parameter attrName was null or undefined when calling getEntitylessAttributesByName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (attrName !== undefined && attrName !== null) { - queryParameters = queryParameters.set('attrName', attrName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getEntitylessAttributes`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get entityless attributes mapped by their keys. - * @param attrName full name of attribute definition (namespace + \':\' + friendlyName) - * @param keys key for entityless attribute - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getEntitylessAttributesWithKeys(attrName: string, keys?: Array, observe?: 'body', reportProgress?: boolean): Observable<{ [key: string]: Attribute; }>; - public getEntitylessAttributesWithKeys(attrName: string, keys?: Array, observe?: 'response', reportProgress?: boolean): Observable>; - public getEntitylessAttributesWithKeys(attrName: string, keys?: Array, observe?: 'events', reportProgress?: boolean): Observable>; - public getEntitylessAttributesWithKeys(attrName: string, keys?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (attrName === null || attrName === undefined) { - throw new Error('Required parameter attrName was null or undefined when calling getEntitylessAttributesWithKeys.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (attrName !== undefined && attrName !== null) { - queryParameters = queryParameters.set('attrName', attrName); - } - if (keys) { - keys.forEach((element) => { - queryParameters = queryParameters.append('keys[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get<{ [key: string]: Attribute; }>(`${this.configuration.basePath}/json/attributesManager/getEntitylessAttributesWithKeys`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns list of Keys which fits the attributeDefinition. - * @param attributeDefinition id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getEntitylessKeys(attributeDefinition: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getEntitylessKeys(attributeDefinition: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getEntitylessKeys(attributeDefinition: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getEntitylessKeys(attributeDefinition: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (attributeDefinition === null || attributeDefinition === undefined) { - throw new Error('Required parameter attributeDefinition was null or undefined when calling getEntitylessKeys.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (attributeDefinition !== undefined && attributeDefinition !== null) { - queryParameters = queryParameters.set('attributeDefinition', attributeDefinition); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getEntitylessKeys`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns a facility Attribute by its id. - * This is an overloaded method getAttribute, specialized for facility and attribute id. - * @param facility id of Facility - * @param attributeId id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityAttributeById(facility: number, attributeId: number, observe?: 'body', reportProgress?: boolean): Observable; - public getFacilityAttributeById(facility: number, attributeId: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getFacilityAttributeById(facility: number, attributeId: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getFacilityAttributeById(facility: number, attributeId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getFacilityAttributeById.'); - } - if (attributeId === null || attributeId === undefined) { - throw new Error('Required parameter attributeId was null or undefined when calling getFacilityAttributeById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (attributeId !== undefined && attributeId !== null) { - queryParameters = queryParameters.set('attributeId', attributeId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/id-facility`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns a facility Attribute by its name. - * This is an overloaded method getAttribute, specialized for facility and attribute name. - * @param facility id of Facility - * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityAttributeByName(facility: number, attributeName: string, observe?: 'body', reportProgress?: boolean): Observable; - public getFacilityAttributeByName(facility: number, attributeName: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getFacilityAttributeByName(facility: number, attributeName: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getFacilityAttributeByName(facility: number, attributeName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getFacilityAttributeByName.'); - } - if (attributeName === null || attributeName === undefined) { - throw new Error('Required parameter attributeName was null or undefined when calling getFacilityAttributeByName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (attributeName !== undefined && attributeName !== null) { - queryParameters = queryParameters.set('attributeName', attributeName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/name-facility`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns all non-empty Facility attributes for selected Facility. - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityAttributes(facility: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getFacilityAttributes(facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getFacilityAttributes(facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getFacilityAttributes(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getFacilityAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/f`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns all specified Facility attributes for selected Facility. - * @param facility id of Facility - * @param attrNames list of attribute names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityAttributesByNames(facility: number, attrNames: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getFacilityAttributesByNames(facility: number, attrNames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getFacilityAttributesByNames(facility: number, attrNames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getFacilityAttributesByNames(facility: number, attrNames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getFacilityAttributesByNames.'); - } - if (attrNames === null || attrNames === undefined) { - throw new Error('Required parameter attrNames was null or undefined when calling getFacilityAttributesByNames.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/f-names`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all non-empty member, user, member-resource and user-facility attributes. - * @param facility id of Facility - * @param resource id of Resource - * @param user id of User - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityResourceUserMemberAttributes(facility: number, resource: number, user: number, member: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getFacilityResourceUserMemberAttributes(facility: number, resource: number, user: number, member: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getFacilityResourceUserMemberAttributes(facility: number, resource: number, user: number, member: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getFacilityResourceUserMemberAttributes(facility: number, resource: number, user: number, member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getFacilityResourceUserMemberAttributes.'); - } - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getFacilityResourceUserMemberAttributes.'); - } - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getFacilityResourceUserMemberAttributes.'); - } - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getFacilityResourceUserMemberAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/f-r-u-m`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all non-empty attributes associated with the user on the facility. - * @param facility id of Facility - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityUserAttributes(facility: number, user: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getFacilityUserAttributes(facility: number, user: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getFacilityUserAttributes(facility: number, user: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getFacilityUserAttributes(facility: number, user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getFacilityUserAttributes.'); - } - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getFacilityUserAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/f-u`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns a group Attribute by its id. - * This is an overloaded method getAttribute, specialized for group and attribute id. - * @param group id of Group - * @param attributeId id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupAttributeById(group: number, attributeId: number, observe?: 'body', reportProgress?: boolean): Observable; - public getGroupAttributeById(group: number, attributeId: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getGroupAttributeById(group: number, attributeId: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getGroupAttributeById(group: number, attributeId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getGroupAttributeById.'); - } - if (attributeId === null || attributeId === undefined) { - throw new Error('Required parameter attributeId was null or undefined when calling getGroupAttributeById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (attributeId !== undefined && attributeId !== null) { - queryParameters = queryParameters.set('attributeId', attributeId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/id-group`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns a group Attribute by its name. - * This is an overloaded method getAttribute, specialized for group and attribute name. - * @param group id of Group - * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupAttributeByName(group: number, attributeName: string, observe?: 'body', reportProgress?: boolean): Observable; - public getGroupAttributeByName(group: number, attributeName: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getGroupAttributeByName(group: number, attributeName: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getGroupAttributeByName(group: number, attributeName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getGroupAttributeByName.'); - } - if (attributeName === null || attributeName === undefined) { - throw new Error('Required parameter attributeName was null or undefined when calling getGroupAttributeByName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (attributeName !== undefined && attributeName !== null) { - queryParameters = queryParameters.set('attributeName', attributeName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/name-group`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all non-empty attributes associated with the group. - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupAttributes(group: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getGroupAttributes(group: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getGroupAttributes(group: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getGroupAttributes(group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getGroupAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/g`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all attributes associated with the group which have name in list attrNames (empty too). Virtual attribute too. - * @param group id of Group - * @param attrNames list of attribute names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupAttributesByNames(group: number, attrNames: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getGroupAttributesByNames(group: number, attrNames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getGroupAttributesByNames(group: number, attrNames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getGroupAttributesByNames(group: number, attrNames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getGroupAttributesByNames.'); - } - if (attrNames === null || attrNames === undefined) { - throw new Error('Required parameter attrNames was null or undefined when calling getGroupAttributesByNames.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/g-names`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns a group_resource Attribute by its id. - * This is an overloaded method getAttribute, specialized for group, resource and attribute id. - * @param group id of Group - * @param resource id of Resource - * @param attributeId id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupResourceAttributeById(group: number, resource: number, attributeId: number, observe?: 'body', reportProgress?: boolean): Observable; - public getGroupResourceAttributeById(group: number, resource: number, attributeId: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getGroupResourceAttributeById(group: number, resource: number, attributeId: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getGroupResourceAttributeById(group: number, resource: number, attributeId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getGroupResourceAttributeById.'); - } - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getGroupResourceAttributeById.'); - } - if (attributeId === null || attributeId === undefined) { - throw new Error('Required parameter attributeId was null or undefined when calling getGroupResourceAttributeById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (attributeId !== undefined && attributeId !== null) { - queryParameters = queryParameters.set('attributeId', attributeId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/id-group-resource`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns a group_resource Attribute by its name. - * This is an overloaded method getAttribute, specialized for group, resource and attribute name. - * @param group id of Group - * @param resource id of Resource - * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupResourceAttributeByName(group: number, resource: number, attributeName: string, observe?: 'body', reportProgress?: boolean): Observable; - public getGroupResourceAttributeByName(group: number, resource: number, attributeName: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getGroupResourceAttributeByName(group: number, resource: number, attributeName: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getGroupResourceAttributeByName(group: number, resource: number, attributeName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getGroupResourceAttributeByName.'); - } - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getGroupResourceAttributeByName.'); - } - if (attributeName === null || attributeName === undefined) { - throw new Error('Required parameter attributeName was null or undefined when calling getGroupResourceAttributeByName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (attributeName !== undefined && attributeName !== null) { - queryParameters = queryParameters.set('attributeName', attributeName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/name-group-resource`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns all non-empty Group-Resource attributes for selected Group and Resource. - * @param group id of Group - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupResourceAttributes(group: number, resource: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getGroupResourceAttributes(group: number, resource: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getGroupResourceAttributes(group: number, resource: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getGroupResourceAttributes(group: number, resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getGroupResourceAttributes.'); - } - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getGroupResourceAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/group-resource`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns a host Attribute by its id. - * This is an overloaded method getAttribute, specialized for host and attribute id. - * @param host id of Host - * @param attributeId id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getHostAttributeById(host: number, attributeId: number, observe?: 'body', reportProgress?: boolean): Observable; - public getHostAttributeById(host: number, attributeId: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getHostAttributeById(host: number, attributeId: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getHostAttributeById(host: number, attributeId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (host === null || host === undefined) { - throw new Error('Required parameter host was null or undefined when calling getHostAttributeById.'); - } - if (attributeId === null || attributeId === undefined) { - throw new Error('Required parameter attributeId was null or undefined when calling getHostAttributeById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (host !== undefined && host !== null) { - queryParameters = queryParameters.set('host', host); - } - if (attributeId !== undefined && attributeId !== null) { - queryParameters = queryParameters.set('attributeId', attributeId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/id-host`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns a host Attribute by its name. - * This is an overloaded method getAttribute, specialized for host and attribute name. - * @param host id of Host - * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getHostAttributeByName(host: number, attributeName: string, observe?: 'body', reportProgress?: boolean): Observable; - public getHostAttributeByName(host: number, attributeName: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getHostAttributeByName(host: number, attributeName: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getHostAttributeByName(host: number, attributeName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (host === null || host === undefined) { - throw new Error('Required parameter host was null or undefined when calling getHostAttributeByName.'); - } - if (attributeName === null || attributeName === undefined) { - throw new Error('Required parameter attributeName was null or undefined when calling getHostAttributeByName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (host !== undefined && host !== null) { - queryParameters = queryParameters.set('host', host); - } - if (attributeName !== undefined && attributeName !== null) { - queryParameters = queryParameters.set('attributeName', attributeName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/name-host`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all non-empty attributes associated with the host. - * @param host id of Host - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getHostAttributes(host: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getHostAttributes(host: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getHostAttributes(host: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getHostAttributes(host: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (host === null || host === undefined) { - throw new Error('Required parameter host was null or undefined when calling getHostAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (host !== undefined && host !== null) { - queryParameters = queryParameters.set('host', host); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/h`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all non-empty attributes associated with the host which have name in list attrNames (empty too). Empty list attrNames will return no attributes. - * @param host id of Host - * @param attrNames list of attribute names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getHostAttributesByNames(host: number, attrNames: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getHostAttributesByNames(host: number, attrNames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getHostAttributesByNames(host: number, attrNames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getHostAttributesByNames(host: number, attrNames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (host === null || host === undefined) { - throw new Error('Required parameter host was null or undefined when calling getHostAttributesByNames.'); - } - if (attrNames === null || attrNames === undefined) { - throw new Error('Required parameter attrNames was null or undefined when calling getHostAttributesByNames.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (host !== undefined && host !== null) { - queryParameters = queryParameters.set('host', host); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/h-names`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all users logins as Attributes. Meaning it returns all non-empty User attributes with URN starting with: \"urn:perun:user:attribute-def:def:login-namespace:\". - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getLogins(user: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getLogins(user: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getLogins(user: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getLogins(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getLogins.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getLogins`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all non-empty attributes associated with the member and if workWithUserAttributes is true, get all non-empty attributes associated with user, who is this member. - * @param member id of Member - * @param workWithUserAttributes flag to work with user attributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberAndUserAttributes(member: number, workWithUserAttributes: boolean, observe?: 'body', reportProgress?: boolean): Observable>; - public getMemberAndUserAttributes(member: number, workWithUserAttributes: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; - public getMemberAndUserAttributes(member: number, workWithUserAttributes: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; - public getMemberAndUserAttributes(member: number, workWithUserAttributes: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getMemberAndUserAttributes.'); - } - if (workWithUserAttributes === null || workWithUserAttributes === undefined) { - throw new Error('Required parameter workWithUserAttributes was null or undefined when calling getMemberAndUserAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { - queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/m-wu`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all attributes associated with the member which have name in list attrNames (empty too). Virtual attributes too. If workWithUserAttribute is true, return also all user attributes in list of attrNames (with virtual attributes too). - * @param member id of Member - * @param attrNames list of attribute names List<String> - * @param workWithUserAttributes flag to work with user attributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberAndUserAttributesByNames(member: number, attrNames: Array, workWithUserAttributes: boolean, observe?: 'body', reportProgress?: boolean): Observable>; - public getMemberAndUserAttributesByNames(member: number, attrNames: Array, workWithUserAttributes: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; - public getMemberAndUserAttributesByNames(member: number, attrNames: Array, workWithUserAttributes: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; - public getMemberAndUserAttributesByNames(member: number, attrNames: Array, workWithUserAttributes: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getMemberAndUserAttributesByNames.'); - } - if (attrNames === null || attrNames === undefined) { - throw new Error('Required parameter attrNames was null or undefined when calling getMemberAndUserAttributesByNames.'); - } - if (workWithUserAttributes === null || workWithUserAttributes === undefined) { - throw new Error('Required parameter workWithUserAttributes was null or undefined when calling getMemberAndUserAttributesByNames.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { - queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/m-names-wu`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns a member Attribute by its id. - * This is an overloaded method getAttribute, specialized for member and attribute id. - * @param member id of Member - * @param attributeId id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberAttributeById(member: number, attributeId: number, observe?: 'body', reportProgress?: boolean): Observable; - public getMemberAttributeById(member: number, attributeId: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getMemberAttributeById(member: number, attributeId: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getMemberAttributeById(member: number, attributeId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getMemberAttributeById.'); - } - if (attributeId === null || attributeId === undefined) { - throw new Error('Required parameter attributeId was null or undefined when calling getMemberAttributeById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (attributeId !== undefined && attributeId !== null) { - queryParameters = queryParameters.set('attributeId', attributeId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/id-member`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns a member Attribute by its name. - * This is an overloaded method getAttribute, specialized for member and attribute name. - * @param member id of Member - * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberAttributeByName(member: number, attributeName: string, observe?: 'body', reportProgress?: boolean): Observable; - public getMemberAttributeByName(member: number, attributeName: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getMemberAttributeByName(member: number, attributeName: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getMemberAttributeByName(member: number, attributeName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getMemberAttributeByName.'); - } - if (attributeName === null || attributeName === undefined) { - throw new Error('Required parameter attributeName was null or undefined when calling getMemberAttributeByName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (attributeName !== undefined && attributeName !== null) { - queryParameters = queryParameters.set('attributeName', attributeName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/name-member`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all non-empty attributes associated with the member. - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberAttributes(member: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getMemberAttributes(member: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getMemberAttributes(member: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getMemberAttributes(member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getMemberAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/m`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all attributes associated with the member which have name in list attrNames (empty too). Virtual attribute too. - * @param member id of Member - * @param attrNames list of attribute names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberAttributesByNames(member: number, attrNames: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getMemberAttributesByNames(member: number, attrNames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getMemberAttributesByNames(member: number, attrNames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getMemberAttributesByNames(member: number, attrNames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getMemberAttributesByNames.'); - } - if (attrNames === null || attrNames === undefined) { - throw new Error('Required parameter attrNames was null or undefined when calling getMemberAttributesByNames.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/m-names`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all attributes associated with the member in the group which have name in list attrNames (empty too). If workWithUserAttribute is true, return also all user attributes in list of attrNames (with virtual attributes too). - * @param member id of Member - * @param group id of Group - * @param attrNames list of attribute names List<String> - * @param workWithUserAttributes flag to work with user attributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberGroupAndUserAttributesByNames(member: number, group: number, attrNames: Array, workWithUserAttributes: boolean, observe?: 'body', reportProgress?: boolean): Observable>; - public getMemberGroupAndUserAttributesByNames(member: number, group: number, attrNames: Array, workWithUserAttributes: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; - public getMemberGroupAndUserAttributesByNames(member: number, group: number, attrNames: Array, workWithUserAttributes: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; - public getMemberGroupAndUserAttributesByNames(member: number, group: number, attrNames: Array, workWithUserAttributes: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getMemberGroupAndUserAttributesByNames.'); - } - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getMemberGroupAndUserAttributesByNames.'); - } - if (attrNames === null || attrNames === undefined) { - throw new Error('Required parameter attrNames was null or undefined when calling getMemberGroupAndUserAttributesByNames.'); - } - if (workWithUserAttributes === null || workWithUserAttributes === undefined) { - throw new Error('Required parameter workWithUserAttributes was null or undefined when calling getMemberGroupAndUserAttributesByNames.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { - queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/m-g-names-wu`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns a member_group Attribute by its id. - * This is an overloaded method getAttribute, specialized for member, group and attribute id. - * @param member id of Member - * @param group id of Group - * @param attributeId id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberGroupAttributeById(member: number, group: number, attributeId: number, observe?: 'body', reportProgress?: boolean): Observable; - public getMemberGroupAttributeById(member: number, group: number, attributeId: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getMemberGroupAttributeById(member: number, group: number, attributeId: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getMemberGroupAttributeById(member: number, group: number, attributeId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getMemberGroupAttributeById.'); - } - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getMemberGroupAttributeById.'); - } - if (attributeId === null || attributeId === undefined) { - throw new Error('Required parameter attributeId was null or undefined when calling getMemberGroupAttributeById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (attributeId !== undefined && attributeId !== null) { - queryParameters = queryParameters.set('attributeId', attributeId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/id-member-group`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns a member_group Attribute by its name. - * This is an overloaded method getAttribute, specialized for member, group and attribute name. - * @param member id of Member - * @param group id of Group - * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberGroupAttributeByName(member: number, group: number, attributeName: string, observe?: 'body', reportProgress?: boolean): Observable; - public getMemberGroupAttributeByName(member: number, group: number, attributeName: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getMemberGroupAttributeByName(member: number, group: number, attributeName: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getMemberGroupAttributeByName(member: number, group: number, attributeName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getMemberGroupAttributeByName.'); - } - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getMemberGroupAttributeByName.'); - } - if (attributeName === null || attributeName === undefined) { - throw new Error('Required parameter attributeName was null or undefined when calling getMemberGroupAttributeByName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (attributeName !== undefined && attributeName !== null) { - queryParameters = queryParameters.set('attributeName', attributeName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/name-member-group`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all non-empty attributes associated with the member in the group. - * @param member id of Member - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberGroupAttributes(member: number, group: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getMemberGroupAttributes(member: number, group: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getMemberGroupAttributes(member: number, group: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getMemberGroupAttributes(member: number, group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getMemberGroupAttributes.'); - } - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getMemberGroupAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/m-g`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all attributes (empty and virtual too)associated with the member in the group which have name in list attrNames. - * @param member id of Member - * @param group id of Group - * @param attrNames list of attribute names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberGroupAttributesByNames(member: number, group: number, attrNames: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getMemberGroupAttributesByNames(member: number, group: number, attrNames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getMemberGroupAttributesByNames(member: number, group: number, attrNames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getMemberGroupAttributesByNames(member: number, group: number, attrNames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getMemberGroupAttributesByNames.'); - } - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getMemberGroupAttributesByNames.'); - } - if (attrNames === null || attrNames === undefined) { - throw new Error('Required parameter attrNames was null or undefined when calling getMemberGroupAttributesByNames.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/m-g-names`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Gets all non-empty attributes associated with the member on the resource and if workWithUserAttributes is true, gets also all non-empty user, user-facility and member attributes. - * @param member id of Member - * @param resource id of Resource - * @param workWithUserAttributes flag to work with user attributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberResourceAndUserFacilityAttributes(member: number, resource: number, workWithUserAttributes: boolean, observe?: 'body', reportProgress?: boolean): Observable>; - public getMemberResourceAndUserFacilityAttributes(member: number, resource: number, workWithUserAttributes: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; - public getMemberResourceAndUserFacilityAttributes(member: number, resource: number, workWithUserAttributes: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; - public getMemberResourceAndUserFacilityAttributes(member: number, resource: number, workWithUserAttributes: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getMemberResourceAndUserFacilityAttributes.'); - } - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getMemberResourceAndUserFacilityAttributes.'); - } - if (workWithUserAttributes === null || workWithUserAttributes === undefined) { - throw new Error('Required parameter workWithUserAttributes was null or undefined when calling getMemberResourceAndUserFacilityAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { - queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/m-r-wu`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Gets selected non-empty attributes associated with the member and the resource. It returns member and member-resource attributes and also user and user-facility attributes if workWithUserAttributes is true. Attributes are selected by list of attr_names. Empty list means all attributes. - * @param member id of Member - * @param resource id of Resource - * @param attrNames list of attribute names List<String> - * @param workWithUserAttributes flag to work with user attributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberResourceAndUserFacilityAttributesByNames(member: number, resource: number, attrNames: Array, workWithUserAttributes: boolean, observe?: 'body', reportProgress?: boolean): Observable>; - public getMemberResourceAndUserFacilityAttributesByNames(member: number, resource: number, attrNames: Array, workWithUserAttributes: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; - public getMemberResourceAndUserFacilityAttributesByNames(member: number, resource: number, attrNames: Array, workWithUserAttributes: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; - public getMemberResourceAndUserFacilityAttributesByNames(member: number, resource: number, attrNames: Array, workWithUserAttributes: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getMemberResourceAndUserFacilityAttributesByNames.'); - } - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getMemberResourceAndUserFacilityAttributesByNames.'); - } - if (attrNames === null || attrNames === undefined) { - throw new Error('Required parameter attrNames was null or undefined when calling getMemberResourceAndUserFacilityAttributesByNames.'); - } - if (workWithUserAttributes === null || workWithUserAttributes === undefined) { - throw new Error('Required parameter workWithUserAttributes was null or undefined when calling getMemberResourceAndUserFacilityAttributesByNames.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { - queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/m-r-names-wu`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns a member_resource Attribute by its id. - * This is an overloaded method getAttribute, specialized for member, resource and attribute id. - * @param member id of Member - * @param resource id of Resource - * @param attributeId id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberResourceAttributeById(member: number, resource: number, attributeId: number, observe?: 'body', reportProgress?: boolean): Observable; - public getMemberResourceAttributeById(member: number, resource: number, attributeId: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getMemberResourceAttributeById(member: number, resource: number, attributeId: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getMemberResourceAttributeById(member: number, resource: number, attributeId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getMemberResourceAttributeById.'); - } - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getMemberResourceAttributeById.'); - } - if (attributeId === null || attributeId === undefined) { - throw new Error('Required parameter attributeId was null or undefined when calling getMemberResourceAttributeById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (attributeId !== undefined && attributeId !== null) { - queryParameters = queryParameters.set('attributeId', attributeId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/id-member-resource`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns a member_resource Attribute by its name. - * This is an overloaded method getAttribute, specialized for member, resource and attribute name. - * @param member id of Member - * @param resource id of Resource - * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberResourceAttributeByName(member: number, resource: number, attributeName: string, observe?: 'body', reportProgress?: boolean): Observable; - public getMemberResourceAttributeByName(member: number, resource: number, attributeName: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getMemberResourceAttributeByName(member: number, resource: number, attributeName: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getMemberResourceAttributeByName(member: number, resource: number, attributeName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getMemberResourceAttributeByName.'); - } - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getMemberResourceAttributeByName.'); - } - if (attributeName === null || attributeName === undefined) { - throw new Error('Required parameter attributeName was null or undefined when calling getMemberResourceAttributeByName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (attributeName !== undefined && attributeName !== null) { - queryParameters = queryParameters.set('attributeName', attributeName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/name-member-resource`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all non-empty attributes associated with the member on the resource. - * @param member id of Member - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberResourceAttributes(member: number, resource: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getMemberResourceAttributes(member: number, resource: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getMemberResourceAttributes(member: number, resource: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getMemberResourceAttributes(member: number, resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getMemberResourceAttributes.'); - } - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getMemberResourceAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/m-r`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns required attributes definition for a Service. - * @param service id of Service - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRequiredAttributesDefinition(service: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getRequiredAttributesDefinition(service: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getRequiredAttributesDefinition(service: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getRequiredAttributesDefinition(service: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling getRequiredAttributesDefinition.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getRequiredAttributesDefinition`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns required facility attributes. - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRequiredAttributesFacility(facility: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getRequiredAttributesFacility(facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getRequiredAttributesFacility(facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getRequiredAttributesFacility(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getRequiredAttributesFacility.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/f`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns facility attributes required by specified service. - * @param service id of Service - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRequiredAttributesFacilityService(service: number, facility: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getRequiredAttributesFacilityService(service: number, facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getRequiredAttributesFacilityService(service: number, facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getRequiredAttributesFacilityService(service: number, facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling getRequiredAttributesFacilityService.'); - } - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getRequiredAttributesFacilityService.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/s-f`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns facility attributes required by specified list of services. - * @param services list of Service ids List<Integer> - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRequiredAttributesFacilityServices(services: Array, facility: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getRequiredAttributesFacilityServices(services: Array, facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getRequiredAttributesFacilityServices(services: Array, facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getRequiredAttributesFacilityServices(services: Array, facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (services === null || services === undefined) { - throw new Error('Required parameter services was null or undefined when calling getRequiredAttributesFacilityServices.'); - } - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getRequiredAttributesFacilityServices.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (services) { - services.forEach((element) => { - queryParameters = queryParameters.append('services[]', element); - }) - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/ss-f`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns group-resource attributes required by specified service. - * @param service id of Service - * @param resource id of Resource - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRequiredAttributesGroupResourceService(service: number, resource: number, group: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getRequiredAttributesGroupResourceService(service: number, resource: number, group: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getRequiredAttributesGroupResourceService(service: number, resource: number, group: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getRequiredAttributesGroupResourceService(service: number, resource: number, group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling getRequiredAttributesGroupResourceService.'); - } - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getRequiredAttributesGroupResourceService.'); - } - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getRequiredAttributesGroupResourceService.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/s-r-g`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns required host attributes. - * @param service id of Service - * @param host id of Host - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRequiredAttributesHostService(service: number, host: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getRequiredAttributesHostService(service: number, host: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getRequiredAttributesHostService(service: number, host: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getRequiredAttributesHostService(service: number, host: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling getRequiredAttributesHostService.'); - } - if (host === null || host === undefined) { - throw new Error('Required parameter host was null or undefined when calling getRequiredAttributesHostService.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (host !== undefined && host !== null) { - queryParameters = queryParameters.set('host', host); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/s-h`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns required member attributes. - * @param member id of Member - * @param workWithUserAttributes flag to work with user attributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRequiredAttributesMember(member: number, workWithUserAttributes?: boolean, observe?: 'body', reportProgress?: boolean): Observable>; - public getRequiredAttributesMember(member: number, workWithUserAttributes?: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; - public getRequiredAttributesMember(member: number, workWithUserAttributes?: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; - public getRequiredAttributesMember(member: number, workWithUserAttributes?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getRequiredAttributesMember.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { - queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/m`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns required member-group attributes. If workWithUserAttributes == TRUE, then returns also user attributes. - * @param member id of Member - * @param group id of Group - * @param workWithUserAttributes flag to work with user attributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRequiredAttributesMemberGroup(member: number, group: number, workWithUserAttributes?: boolean, observe?: 'body', reportProgress?: boolean): Observable>; - public getRequiredAttributesMemberGroup(member: number, group: number, workWithUserAttributes?: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; - public getRequiredAttributesMemberGroup(member: number, group: number, workWithUserAttributes?: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; - public getRequiredAttributesMemberGroup(member: number, group: number, workWithUserAttributes?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getRequiredAttributesMemberGroup.'); - } - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getRequiredAttributesMemberGroup.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { - queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/m-g`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns member, member-group and member-resource attributes required by specified service. If workWithUserAttributes == TRUE, then returns also user and user-facility attributes. - * @param service id of Service - * @param resource id of Resource - * @param group id of Group - * @param member id of Member - * @param workWithUserAttributes flag to work with user attributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRequiredAttributesMemberGroupResourceService(service: number, resource: number, group: number, member: number, workWithUserAttributes?: boolean, observe?: 'body', reportProgress?: boolean): Observable>; - public getRequiredAttributesMemberGroupResourceService(service: number, resource: number, group: number, member: number, workWithUserAttributes?: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; - public getRequiredAttributesMemberGroupResourceService(service: number, resource: number, group: number, member: number, workWithUserAttributes?: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; - public getRequiredAttributesMemberGroupResourceService(service: number, resource: number, group: number, member: number, workWithUserAttributes?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling getRequiredAttributesMemberGroupResourceService.'); - } - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getRequiredAttributesMemberGroupResourceService.'); - } - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getRequiredAttributesMemberGroupResourceService.'); - } - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getRequiredAttributesMemberGroupResourceService.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { - queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/s-r-g-m`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns member-group attributes required by specified service. If workWithUserAttributes == TRUE, then returns also member and user attributes. - * @param service id of Service - * @param group id of Group - * @param member id of Member - * @param workWithUserAttributes flag to work with user attributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRequiredAttributesMemberGroupService(service: number, group: number, member: number, workWithUserAttributes?: boolean, observe?: 'body', reportProgress?: boolean): Observable>; - public getRequiredAttributesMemberGroupService(service: number, group: number, member: number, workWithUserAttributes?: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; - public getRequiredAttributesMemberGroupService(service: number, group: number, member: number, workWithUserAttributes?: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; - public getRequiredAttributesMemberGroupService(service: number, group: number, member: number, workWithUserAttributes?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling getRequiredAttributesMemberGroupService.'); - } - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getRequiredAttributesMemberGroupService.'); - } - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getRequiredAttributesMemberGroupService.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { - queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/s-g-m`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns member-resource attributes required by specified list of services. If workWithUserAttributes == TRUE, then returns also user attributes. - * @param member id of Member - * @param resource id of Resource - * @param workWithUserAttributes flag to work with user attributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRequiredAttributesMemberResource(member: number, resource: number, workWithUserAttributes?: boolean, observe?: 'body', reportProgress?: boolean): Observable>; - public getRequiredAttributesMemberResource(member: number, resource: number, workWithUserAttributes?: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; - public getRequiredAttributesMemberResource(member: number, resource: number, workWithUserAttributes?: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; - public getRequiredAttributesMemberResource(member: number, resource: number, workWithUserAttributes?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getRequiredAttributesMemberResource.'); - } - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getRequiredAttributesMemberResource.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { - queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/m-r`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns member and member-resource attributes required by the specified service. If workWithUserAttributes == TRUE, then returns also user attributes. - * @param service id of Service - * @param resource id of Resource - * @param member id of Member - * @param workWithUserAttributes flag to work with user attributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRequiredAttributesMemberResourceService(service: number, resource: number, member: number, workWithUserAttributes?: boolean, observe?: 'body', reportProgress?: boolean): Observable>; - public getRequiredAttributesMemberResourceService(service: number, resource: number, member: number, workWithUserAttributes?: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; - public getRequiredAttributesMemberResourceService(service: number, resource: number, member: number, workWithUserAttributes?: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; - public getRequiredAttributesMemberResourceService(service: number, resource: number, member: number, workWithUserAttributes?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling getRequiredAttributesMemberResourceService.'); - } - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getRequiredAttributesMemberResourceService.'); - } - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getRequiredAttributesMemberResourceService.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { - queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/s-r-m`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns required resource attributes. - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRequiredAttributesResource(resource: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getRequiredAttributesResource(resource: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getRequiredAttributesResource(resource: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getRequiredAttributesResource(resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getRequiredAttributesResource.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/r`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns resource attributes required by specified service. - * @param service id of Service - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRequiredAttributesResourceService(service: number, resource: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getRequiredAttributesResourceService(service: number, resource: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getRequiredAttributesResourceService(service: number, resource: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getRequiredAttributesResourceService(service: number, resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling getRequiredAttributesResourceService.'); - } - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getRequiredAttributesResourceService.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/s-r`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns resource attributes required by specified list of services. - * @param services list of Service ids List<Integer> - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRequiredAttributesResourceServices(services: Array, resource: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getRequiredAttributesResourceServices(services: Array, resource: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getRequiredAttributesResourceServices(services: Array, resource: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getRequiredAttributesResourceServices(services: Array, resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (services === null || services === undefined) { - throw new Error('Required parameter services was null or undefined when calling getRequiredAttributesResourceServices.'); - } - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getRequiredAttributesResourceServices.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (services) { - services.forEach((element) => { - queryParameters = queryParameters.append('services[]', element); - }) - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/ss-r`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns required user attributes. - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRequiredAttributesUser(user: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getRequiredAttributesUser(user: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getRequiredAttributesUser(user: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getRequiredAttributesUser(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getRequiredAttributesUser.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/u`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns required user-facility attributes. - * @param user id of User - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRequiredAttributesUserFacility(user: number, facility: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getRequiredAttributesUserFacility(user: number, facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getRequiredAttributesUserFacility(user: number, facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getRequiredAttributesUserFacility(user: number, facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getRequiredAttributesUserFacility.'); - } - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getRequiredAttributesUserFacility.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/u-f`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns required vo attributes. - * @param service id of Service - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRequiredAttributesVoService(service: number, vo: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getRequiredAttributesVoService(service: number, vo: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getRequiredAttributesVoService(service: number, vo: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getRequiredAttributesVoService(service: number, vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling getRequiredAttributesVoService.'); - } - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getRequiredAttributesVoService.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/s-v`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns a resource Attribute by its id. - * This is an overloaded method getAttribute, specialized for resource and attribute id. - * @param resource id of Resource - * @param attributeId id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourceAttributeById(resource: number, attributeId: number, observe?: 'body', reportProgress?: boolean): Observable; - public getResourceAttributeById(resource: number, attributeId: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getResourceAttributeById(resource: number, attributeId: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getResourceAttributeById(resource: number, attributeId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getResourceAttributeById.'); - } - if (attributeId === null || attributeId === undefined) { - throw new Error('Required parameter attributeId was null or undefined when calling getResourceAttributeById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (attributeId !== undefined && attributeId !== null) { - queryParameters = queryParameters.set('attributeId', attributeId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/id-resource`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns a resource Attribute by its name. - * This is an overloaded method getAttribute, specialized for resource and attribute name. - * @param resource id of Resource - * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourceAttributeByName(resource: number, attributeName: string, observe?: 'body', reportProgress?: boolean): Observable; - public getResourceAttributeByName(resource: number, attributeName: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getResourceAttributeByName(resource: number, attributeName: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getResourceAttributeByName(resource: number, attributeName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getResourceAttributeByName.'); - } - if (attributeName === null || attributeName === undefined) { - throw new Error('Required parameter attributeName was null or undefined when calling getResourceAttributeByName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (attributeName !== undefined && attributeName !== null) { - queryParameters = queryParameters.set('attributeName', attributeName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/name-resource`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all non-empty attributes associated with the resource. - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourceAttributes(resource: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getResourceAttributes(resource: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getResourceAttributes(resource: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getResourceAttributes(resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getResourceAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/r`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all attributes associated with the resource which have name in list attrNames (empty too). Virtual attributes too. - * @param resource id of Resource - * @param attrNames list of attribute names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourceAttributesByNames(resource: number, attrNames: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getResourceAttributesByNames(resource: number, attrNames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getResourceAttributesByNames(resource: number, attrNames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getResourceAttributesByNames(resource: number, attrNames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getResourceAttributesByNames.'); - } - if (attrNames === null || attrNames === undefined) { - throw new Error('Required parameter attrNames was null or undefined when calling getResourceAttributesByNames.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/r-names`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all non-empty attributes associated with the group and resource. Virtual attributes too. If workWithGroupAttributes is true, return also all group attributes. - * @param resource id of Resource - * @param group id of Group - * @param workWithGroupAttributes flag to work with group attributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourceGroupAndGroupAttributes(resource: number, group: number, workWithGroupAttributes: boolean, observe?: 'body', reportProgress?: boolean): Observable>; - public getResourceGroupAndGroupAttributes(resource: number, group: number, workWithGroupAttributes: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; - public getResourceGroupAndGroupAttributes(resource: number, group: number, workWithGroupAttributes: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; - public getResourceGroupAndGroupAttributes(resource: number, group: number, workWithGroupAttributes: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getResourceGroupAndGroupAttributes.'); - } - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getResourceGroupAndGroupAttributes.'); - } - if (workWithGroupAttributes === null || workWithGroupAttributes === undefined) { - throw new Error('Required parameter workWithGroupAttributes was null or undefined when calling getResourceGroupAndGroupAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (workWithGroupAttributes !== undefined && workWithGroupAttributes !== null) { - queryParameters = queryParameters.set('workWithGroupAttributes', workWithGroupAttributes); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/r-g-wg`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all attributes associated with the group and the resource which have their name in list attrNames (empty too). Virtual attributes too. If workWithGroupAttributes is true, return also all group attributes in list of attrNames (with virtual attributes too). - * @param resource id of Resource - * @param group id of Group - * @param attrNames list of attribute names List<String> - * @param workWithGroupAttributes flag to work with group attributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourceGroupAndGroupAttributesByNames(resource: number, group: number, attrNames: Array, workWithGroupAttributes: boolean, observe?: 'body', reportProgress?: boolean): Observable>; - public getResourceGroupAndGroupAttributesByNames(resource: number, group: number, attrNames: Array, workWithGroupAttributes: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; - public getResourceGroupAndGroupAttributesByNames(resource: number, group: number, attrNames: Array, workWithGroupAttributes: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; - public getResourceGroupAndGroupAttributesByNames(resource: number, group: number, attrNames: Array, workWithGroupAttributes: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getResourceGroupAndGroupAttributesByNames.'); - } - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getResourceGroupAndGroupAttributesByNames.'); - } - if (attrNames === null || attrNames === undefined) { - throw new Error('Required parameter attrNames was null or undefined when calling getResourceGroupAndGroupAttributesByNames.'); - } - if (workWithGroupAttributes === null || workWithGroupAttributes === undefined) { - throw new Error('Required parameter workWithGroupAttributes was null or undefined when calling getResourceGroupAndGroupAttributesByNames.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - if (workWithGroupAttributes !== undefined && workWithGroupAttributes !== null) { - queryParameters = queryParameters.set('workWithGroupAttributes', workWithGroupAttributes); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/r-g-names-wg`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all non-empty attributes associated with the group on resource. - * @param resource id of Resource - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourceGroupAttributes(resource: number, group: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getResourceGroupAttributes(resource: number, group: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getResourceGroupAttributes(resource: number, group: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getResourceGroupAttributes(resource: number, group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getResourceGroupAttributes.'); - } - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getResourceGroupAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/r-g`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all attributes by the list of attrNames if they are in one of these namespaces: - member - group - member-group - resource - member-resource - group-resource - user (get from member object) - facility (get from resource object) - user-facility Returns all attributes even if they are empty or virtual. - * @param resource id of Resource - * @param group id of Group - * @param member id of Member - * @param attrNames list of attribute names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourceGroupMemberAttributesByNames(resource: number, group: number, member: number, attrNames: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getResourceGroupMemberAttributesByNames(resource: number, group: number, member: number, attrNames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getResourceGroupMemberAttributesByNames(resource: number, group: number, member: number, attrNames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getResourceGroupMemberAttributesByNames(resource: number, group: number, member: number, attrNames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getResourceGroupMemberAttributesByNames.'); - } - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getResourceGroupMemberAttributesByNames.'); - } - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getResourceGroupMemberAttributesByNames.'); - } - if (attrNames === null || attrNames === undefined) { - throw new Error('Required parameter attrNames was null or undefined when calling getResourceGroupMemberAttributesByNames.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/r-g-m-names`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns a user Attribute by its id. - * This is an overloaded method getAttribute, specialized for user and attribute id. - * @param user id of User - * @param attributeId id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserAttributeById(user: number, attributeId: number, observe?: 'body', reportProgress?: boolean): Observable; - public getUserAttributeById(user: number, attributeId: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getUserAttributeById(user: number, attributeId: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getUserAttributeById(user: number, attributeId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getUserAttributeById.'); - } - if (attributeId === null || attributeId === undefined) { - throw new Error('Required parameter attributeId was null or undefined when calling getUserAttributeById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (attributeId !== undefined && attributeId !== null) { - queryParameters = queryParameters.set('attributeId', attributeId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/id-user`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns a user Attribute by its name. - * This is an overloaded method getAttribute, specialized for user and attribute name. - * @param user id of User - * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserAttributeByName(user: number, attributeName: string, observe?: 'body', reportProgress?: boolean): Observable; - public getUserAttributeByName(user: number, attributeName: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getUserAttributeByName(user: number, attributeName: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getUserAttributeByName(user: number, attributeName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getUserAttributeByName.'); - } - if (attributeName === null || attributeName === undefined) { - throw new Error('Required parameter attributeName was null or undefined when calling getUserAttributeByName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (attributeName !== undefined && attributeName !== null) { - queryParameters = queryParameters.set('attributeName', attributeName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/name-user`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all non-empty attributes associated with the user. - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserAttributes(user: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getUserAttributes(user: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getUserAttributes(user: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getUserAttributes(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getUserAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/u`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all attributes associated with the user which have name in list attrNames (empty too). - * @param user id of User - * @param attrNames list of attribute names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserAttributesByNames(user: number, attrNames: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getUserAttributesByNames(user: number, attrNames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getUserAttributesByNames(user: number, attrNames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getUserAttributesByNames(user: number, attrNames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getUserAttributesByNames.'); - } - if (attrNames === null || attrNames === undefined) { - throw new Error('Required parameter attrNames was null or undefined when calling getUserAttributesByNames.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/u-names`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns a UserExtSource Attribute by its id. - * This is an overloaded method getAttribute, specialized for UserExtSource and attribute id. - * @param userExtSource id of UserExtSource - * @param attributeId id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserExtSourceAttributeById(userExtSource: number, attributeId: number, observe?: 'body', reportProgress?: boolean): Observable; - public getUserExtSourceAttributeById(userExtSource: number, attributeId: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getUserExtSourceAttributeById(userExtSource: number, attributeId: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getUserExtSourceAttributeById(userExtSource: number, attributeId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (userExtSource === null || userExtSource === undefined) { - throw new Error('Required parameter userExtSource was null or undefined when calling getUserExtSourceAttributeById.'); - } - if (attributeId === null || attributeId === undefined) { - throw new Error('Required parameter attributeId was null or undefined when calling getUserExtSourceAttributeById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (userExtSource !== undefined && userExtSource !== null) { - queryParameters = queryParameters.set('userExtSource', userExtSource); - } - if (attributeId !== undefined && attributeId !== null) { - queryParameters = queryParameters.set('attributeId', attributeId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/id-ues`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns a UserExtSource Attribute by its name. - * This is an overloaded method getAttribute, specialized for UserExtSource and attribute name. - * @param userExtSource id of UserExtSource - * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserExtSourceAttributeByName(userExtSource: number, attributeName: string, observe?: 'body', reportProgress?: boolean): Observable; - public getUserExtSourceAttributeByName(userExtSource: number, attributeName: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getUserExtSourceAttributeByName(userExtSource: number, attributeName: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getUserExtSourceAttributeByName(userExtSource: number, attributeName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (userExtSource === null || userExtSource === undefined) { - throw new Error('Required parameter userExtSource was null or undefined when calling getUserExtSourceAttributeByName.'); - } - if (attributeName === null || attributeName === undefined) { - throw new Error('Required parameter attributeName was null or undefined when calling getUserExtSourceAttributeByName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (userExtSource !== undefined && userExtSource !== null) { - queryParameters = queryParameters.set('userExtSource', userExtSource); - } - if (attributeName !== undefined && attributeName !== null) { - queryParameters = queryParameters.set('attributeName', attributeName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/name-ues`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all non-empty attributes associated with the UserExtSource. - * @param userExtSource id of UserExtSource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserExtSourceAttributes(userExtSource: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getUserExtSourceAttributes(userExtSource: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getUserExtSourceAttributes(userExtSource: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getUserExtSourceAttributes(userExtSource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (userExtSource === null || userExtSource === undefined) { - throw new Error('Required parameter userExtSource was null or undefined when calling getUserExtSourceAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (userExtSource !== undefined && userExtSource !== null) { - queryParameters = queryParameters.set('userExtSource', userExtSource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/ues`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all attributes associated with the userExtSource which have name in list attrNames (empty too). - * @param userExtSource id of UserExtSource - * @param attrNames list of attribute names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserExtSourceAttributesByNames(userExtSource: number, attrNames: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getUserExtSourceAttributesByNames(userExtSource: number, attrNames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getUserExtSourceAttributesByNames(userExtSource: number, attrNames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getUserExtSourceAttributesByNames(userExtSource: number, attrNames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (userExtSource === null || userExtSource === undefined) { - throw new Error('Required parameter userExtSource was null or undefined when calling getUserExtSourceAttributesByNames.'); - } - if (attrNames === null || attrNames === undefined) { - throw new Error('Required parameter attrNames was null or undefined when calling getUserExtSourceAttributesByNames.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (userExtSource !== undefined && userExtSource !== null) { - queryParameters = queryParameters.set('userExtSource', userExtSource); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/ues-names`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns a user_facility Attribute by its id. - * This is an overloaded method getAttribute, specialized for user, facility and attribute id. - * @param user id of User - * @param facility id of Facility - * @param attributeId id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserFacilityAttributeById(user: number, facility: number, attributeId: number, observe?: 'body', reportProgress?: boolean): Observable; - public getUserFacilityAttributeById(user: number, facility: number, attributeId: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getUserFacilityAttributeById(user: number, facility: number, attributeId: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getUserFacilityAttributeById(user: number, facility: number, attributeId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getUserFacilityAttributeById.'); - } - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getUserFacilityAttributeById.'); - } - if (attributeId === null || attributeId === undefined) { - throw new Error('Required parameter attributeId was null or undefined when calling getUserFacilityAttributeById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (attributeId !== undefined && attributeId !== null) { - queryParameters = queryParameters.set('attributeId', attributeId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/id-user_facility`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns a user_facility Attribute by its name. - * This is an overloaded method getAttribute, specialized for user, facility and attribute name. - * @param user id of User - * @param facility id of Facility - * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserFacilityAttributeByName(user: number, facility: number, attributeName: string, observe?: 'body', reportProgress?: boolean): Observable; - public getUserFacilityAttributeByName(user: number, facility: number, attributeName: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getUserFacilityAttributeByName(user: number, facility: number, attributeName: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getUserFacilityAttributeByName(user: number, facility: number, attributeName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getUserFacilityAttributeByName.'); - } - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getUserFacilityAttributeByName.'); - } - if (attributeName === null || attributeName === undefined) { - throw new Error('Required parameter attributeName was null or undefined when calling getUserFacilityAttributeByName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (attributeName !== undefined && attributeName !== null) { - queryParameters = queryParameters.set('attributeName', attributeName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/name-user_facility`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns all non-empty User-Facility attributes for selected User and Facility. - * @param user id of User - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserFacilityAttributes(user: number, facility: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getUserFacilityAttributes(user: number, facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getUserFacilityAttributes(user: number, facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getUserFacilityAttributes(user: number, facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getUserFacilityAttributes.'); - } - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getUserFacilityAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/user-facility`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns a Vo Attribute by its id. - * This is an overloaded method getAttribute, specialized for virtual organization and attribute id. - * @param vo id of Vo - * @param attributeId id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVoAttributeById(vo: number, attributeId: number, observe?: 'body', reportProgress?: boolean): Observable; - public getVoAttributeById(vo: number, attributeId: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getVoAttributeById(vo: number, attributeId: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getVoAttributeById(vo: number, attributeId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getVoAttributeById.'); - } - if (attributeId === null || attributeId === undefined) { - throw new Error('Required parameter attributeId was null or undefined when calling getVoAttributeById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (attributeId !== undefined && attributeId !== null) { - queryParameters = queryParameters.set('attributeId', attributeId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/id-vo`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns a Vo Attribute by its name. - * This is an overloaded method getAttribute, specialized for virtual organization and attribute name. - * @param vo id of Vo - * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVoAttributeByName(vo: number, attributeName: string, observe?: 'body', reportProgress?: boolean): Observable; - public getVoAttributeByName(vo: number, attributeName: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getVoAttributeByName(vo: number, attributeName: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getVoAttributeByName(vo: number, attributeName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getVoAttributeByName.'); - } - if (attributeName === null || attributeName === undefined) { - throw new Error('Required parameter attributeName was null or undefined when calling getVoAttributeByName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (attributeName !== undefined && attributeName !== null) { - queryParameters = queryParameters.set('attributeName', attributeName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/attributesManager/getAttribute/name-vo`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all attributes associated with the vo. - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVoAttributes(vo: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getVoAttributes(vo: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getVoAttributes(vo: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getVoAttributes(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getVoAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/vo`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all attributes associated with the vo which have name in list attrNames (empty too). - * @param vo id of Vo - * @param attrNames list of attribute names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVoAttributesByNames(vo: number, attrNames: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getVoAttributesByNames(vo: number, attrNames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getVoAttributesByNames(vo: number, attrNames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getVoAttributesByNames(vo: number, attrNames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getVoAttributesByNames.'); - } - if (attrNames === null || attrNames === undefined) { - throw new Error('Required parameter attrNames was null or undefined when calling getVoAttributesByNames.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/attributesManager/getAttributes/vo-names`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove attributes of namespace facility, resource, group, user and member - * @param facility id of Facility - * @param resource id of Resource - * @param group id of Group - * @param user id of User - * @param member id of Member - * @param attributes list of attribute ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeAttributesForFacilityResourceGroupUserMember(facility: number, resource: number, group: number, user: number, member: number, attributes: Array, observe?: 'body', reportProgress?: boolean): Observable; - public removeAttributesForFacilityResourceGroupUserMember(facility: number, resource: number, group: number, user: number, member: number, attributes: Array, observe?: 'response', reportProgress?: boolean): Observable>; - public removeAttributesForFacilityResourceGroupUserMember(facility: number, resource: number, group: number, user: number, member: number, attributes: Array, observe?: 'events', reportProgress?: boolean): Observable>; - public removeAttributesForFacilityResourceGroupUserMember(facility: number, resource: number, group: number, user: number, member: number, attributes: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling removeAttributesForFacilityResourceGroupUserMember.'); - } - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling removeAttributesForFacilityResourceGroupUserMember.'); - } - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling removeAttributesForFacilityResourceGroupUserMember.'); - } - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling removeAttributesForFacilityResourceGroupUserMember.'); - } - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling removeAttributesForFacilityResourceGroupUserMember.'); - } - if (attributes === null || attributes === undefined) { - throw new Error('Required parameter attributes was null or undefined when calling removeAttributesForFacilityResourceGroupUserMember.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/f-r-g-u-m`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove attributes of namespace facility, resource, user and member - * @param facility id of Facility - * @param resource id of Resource - * @param user id of User - * @param member id of Member - * @param attributes list of attribute ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeAttributesForFacilityResourceUserMember(facility: number, resource: number, user: number, member: number, attributes: Array, observe?: 'body', reportProgress?: boolean): Observable; - public removeAttributesForFacilityResourceUserMember(facility: number, resource: number, user: number, member: number, attributes: Array, observe?: 'response', reportProgress?: boolean): Observable>; - public removeAttributesForFacilityResourceUserMember(facility: number, resource: number, user: number, member: number, attributes: Array, observe?: 'events', reportProgress?: boolean): Observable>; - public removeAttributesForFacilityResourceUserMember(facility: number, resource: number, user: number, member: number, attributes: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling removeAttributesForFacilityResourceUserMember.'); - } - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling removeAttributesForFacilityResourceUserMember.'); - } - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling removeAttributesForFacilityResourceUserMember.'); - } - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling removeAttributesForFacilityResourceUserMember.'); - } - if (attributes === null || attributes === undefined) { - throw new Error('Required parameter attributes was null or undefined when calling removeAttributesForFacilityResourceUserMember.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/f-r-u-m`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove entityless attribute - * @param key key of an entityless attribute - * @param attribute id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeEntitylessAttribute(key: string, attribute: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeEntitylessAttribute(key: string, attribute: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeEntitylessAttribute(key: string, attribute: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeEntitylessAttribute(key: string, attribute: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (key === null || key === undefined) { - throw new Error('Required parameter key was null or undefined when calling removeEntitylessAttribute.'); - } - if (attribute === null || attribute === undefined) { - throw new Error('Required parameter attribute was null or undefined when calling removeEntitylessAttribute.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (key !== undefined && key !== null) { - queryParameters = queryParameters.set('key', key); - } - if (attribute !== undefined && attribute !== null) { - queryParameters = queryParameters.set('attribute', attribute); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/e`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove facility attribute - * @param facility id of Facility - * @param attribute id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeFacilityAttribute(facility: number, attribute: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeFacilityAttribute(facility: number, attribute: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeFacilityAttribute(facility: number, attribute: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeFacilityAttribute(facility: number, attribute: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling removeFacilityAttribute.'); - } - if (attribute === null || attribute === undefined) { - throw new Error('Required parameter attribute was null or undefined when calling removeFacilityAttribute.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (attribute !== undefined && attribute !== null) { - queryParameters = queryParameters.set('attribute', attribute); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/f`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove attributes of namespace facility - * @param facility id of Facility - * @param attributes list of attribute ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeFacilityAttributes(facility: number, attributes: Array, observe?: 'body', reportProgress?: boolean): Observable; - public removeFacilityAttributes(facility: number, attributes: Array, observe?: 'response', reportProgress?: boolean): Observable>; - public removeFacilityAttributes(facility: number, attributes: Array, observe?: 'events', reportProgress?: boolean): Observable>; - public removeFacilityAttributes(facility: number, attributes: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling removeFacilityAttributes.'); - } - if (attributes === null || attributes === undefined) { - throw new Error('Required parameter attributes was null or undefined when calling removeFacilityAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/f`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove group attribute - * @param group id of Group - * @param attribute id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeGroupAttribute(group: number, attribute: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeGroupAttribute(group: number, attribute: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeGroupAttribute(group: number, attribute: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeGroupAttribute(group: number, attribute: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling removeGroupAttribute.'); - } - if (attribute === null || attribute === undefined) { - throw new Error('Required parameter attribute was null or undefined when calling removeGroupAttribute.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (attribute !== undefined && attribute !== null) { - queryParameters = queryParameters.set('attribute', attribute); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/g`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove attributes of namespace group - * @param group id of Group - * @param attributes list of attribute ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeGroupAttributes(group: number, attributes: Array, observe?: 'body', reportProgress?: boolean): Observable; - public removeGroupAttributes(group: number, attributes: Array, observe?: 'response', reportProgress?: boolean): Observable>; - public removeGroupAttributes(group: number, attributes: Array, observe?: 'events', reportProgress?: boolean): Observable>; - public removeGroupAttributes(group: number, attributes: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling removeGroupAttributes.'); - } - if (attributes === null || attributes === undefined) { - throw new Error('Required parameter attributes was null or undefined when calling removeGroupAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/g`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove group-resource attribute - * @param group id of Group - * @param resource id of Resource - * @param attribute id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeGroupResourceAttribute(group: number, resource: number, attribute: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeGroupResourceAttribute(group: number, resource: number, attribute: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeGroupResourceAttribute(group: number, resource: number, attribute: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeGroupResourceAttribute(group: number, resource: number, attribute: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling removeGroupResourceAttribute.'); - } - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling removeGroupResourceAttribute.'); - } - if (attribute === null || attribute === undefined) { - throw new Error('Required parameter attribute was null or undefined when calling removeGroupResourceAttribute.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (attribute !== undefined && attribute !== null) { - queryParameters = queryParameters.set('attribute', attribute); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/g-r`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove attributes of namespace group-resource - * @param group id of Group - * @param resource id of Resource - * @param attributes list of attribute ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeGroupResourceAttributes(group: number, resource: number, attributes: Array, observe?: 'body', reportProgress?: boolean): Observable; - public removeGroupResourceAttributes(group: number, resource: number, attributes: Array, observe?: 'response', reportProgress?: boolean): Observable>; - public removeGroupResourceAttributes(group: number, resource: number, attributes: Array, observe?: 'events', reportProgress?: boolean): Observable>; - public removeGroupResourceAttributes(group: number, resource: number, attributes: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling removeGroupResourceAttributes.'); - } - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling removeGroupResourceAttributes.'); - } - if (attributes === null || attributes === undefined) { - throw new Error('Required parameter attributes was null or undefined when calling removeGroupResourceAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/g-r`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove attributes of namespace group-resource - * @param group id of Group - * @param resource id of Resource - * @param attributes list of attribute ids List<Integer> - * @param workWithGroupAttributes flag to work with group attributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeGroupResourceAttributesWorkWithGroupAttributes(group: number, resource: number, attributes: Array, workWithGroupAttributes: boolean, observe?: 'body', reportProgress?: boolean): Observable; - public removeGroupResourceAttributesWorkWithGroupAttributes(group: number, resource: number, attributes: Array, workWithGroupAttributes: boolean, observe?: 'response', reportProgress?: boolean): Observable>; - public removeGroupResourceAttributesWorkWithGroupAttributes(group: number, resource: number, attributes: Array, workWithGroupAttributes: boolean, observe?: 'events', reportProgress?: boolean): Observable>; - public removeGroupResourceAttributesWorkWithGroupAttributes(group: number, resource: number, attributes: Array, workWithGroupAttributes: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling removeGroupResourceAttributesWorkWithGroupAttributes.'); - } - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling removeGroupResourceAttributesWorkWithGroupAttributes.'); - } - if (attributes === null || attributes === undefined) { - throw new Error('Required parameter attributes was null or undefined when calling removeGroupResourceAttributesWorkWithGroupAttributes.'); - } - if (workWithGroupAttributes === null || workWithGroupAttributes === undefined) { - throw new Error('Required parameter workWithGroupAttributes was null or undefined when calling removeGroupResourceAttributesWorkWithGroupAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }) - } - if (workWithGroupAttributes !== undefined && workWithGroupAttributes !== null) { - queryParameters = queryParameters.set('workWithGroupAttributes', workWithGroupAttributes); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/g-r-workWithGroupAttributes`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove host attribute - * @param host id of Host - * @param attribute id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeHostAttribute(host: number, attribute: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeHostAttribute(host: number, attribute: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeHostAttribute(host: number, attribute: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeHostAttribute(host: number, attribute: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (host === null || host === undefined) { - throw new Error('Required parameter host was null or undefined when calling removeHostAttribute.'); - } - if (attribute === null || attribute === undefined) { - throw new Error('Required parameter attribute was null or undefined when calling removeHostAttribute.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (host !== undefined && host !== null) { - queryParameters = queryParameters.set('host', host); - } - if (attribute !== undefined && attribute !== null) { - queryParameters = queryParameters.set('attribute', attribute); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/h`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove attributes of namespace host - * @param host id of Host - * @param attributes list of attribute ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeHostAttributes(host: number, attributes: Array, observe?: 'body', reportProgress?: boolean): Observable; - public removeHostAttributes(host: number, attributes: Array, observe?: 'response', reportProgress?: boolean): Observable>; - public removeHostAttributes(host: number, attributes: Array, observe?: 'events', reportProgress?: boolean): Observable>; - public removeHostAttributes(host: number, attributes: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (host === null || host === undefined) { - throw new Error('Required parameter host was null or undefined when calling removeHostAttributes.'); - } - if (attributes === null || attributes === undefined) { - throw new Error('Required parameter attributes was null or undefined when calling removeHostAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (host !== undefined && host !== null) { - queryParameters = queryParameters.set('host', host); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/h`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove member attribute - * @param member id of Member - * @param attribute id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeMemberAttribute(member: number, attribute: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeMemberAttribute(member: number, attribute: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeMemberAttribute(member: number, attribute: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeMemberAttribute(member: number, attribute: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling removeMemberAttribute.'); - } - if (attribute === null || attribute === undefined) { - throw new Error('Required parameter attribute was null or undefined when calling removeMemberAttribute.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (attribute !== undefined && attribute !== null) { - queryParameters = queryParameters.set('attribute', attribute); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/m`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove attributes of namespace member - * @param member id of Member - * @param attributes list of attribute ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeMemberAttributes(member: number, attributes: Array, observe?: 'body', reportProgress?: boolean): Observable; - public removeMemberAttributes(member: number, attributes: Array, observe?: 'response', reportProgress?: boolean): Observable>; - public removeMemberAttributes(member: number, attributes: Array, observe?: 'events', reportProgress?: boolean): Observable>; - public removeMemberAttributes(member: number, attributes: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling removeMemberAttributes.'); - } - if (attributes === null || attributes === undefined) { - throw new Error('Required parameter attributes was null or undefined when calling removeMemberAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/m`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove attributes of namespace member - * @param member id of Member - * @param attributes list of attribute ids List<Integer> - * @param workWithUserAttributes flag to work with user attributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeMemberAttributesWorkWithUserAttributes(member: number, attributes: Array, workWithUserAttributes: boolean, observe?: 'body', reportProgress?: boolean): Observable; - public removeMemberAttributesWorkWithUserAttributes(member: number, attributes: Array, workWithUserAttributes: boolean, observe?: 'response', reportProgress?: boolean): Observable>; - public removeMemberAttributesWorkWithUserAttributes(member: number, attributes: Array, workWithUserAttributes: boolean, observe?: 'events', reportProgress?: boolean): Observable>; - public removeMemberAttributesWorkWithUserAttributes(member: number, attributes: Array, workWithUserAttributes: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling removeMemberAttributesWorkWithUserAttributes.'); - } - if (attributes === null || attributes === undefined) { - throw new Error('Required parameter attributes was null or undefined when calling removeMemberAttributesWorkWithUserAttributes.'); - } - if (workWithUserAttributes === null || workWithUserAttributes === undefined) { - throw new Error('Required parameter workWithUserAttributes was null or undefined when calling removeMemberAttributesWorkWithUserAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }) - } - if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { - queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/m-workWithUserAttributes`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove member-group attribute - * @param member id of Member - * @param group id of Group - * @param attribute id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeMemberGroupAttribute(member: number, group: number, attribute: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeMemberGroupAttribute(member: number, group: number, attribute: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeMemberGroupAttribute(member: number, group: number, attribute: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeMemberGroupAttribute(member: number, group: number, attribute: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling removeMemberGroupAttribute.'); - } - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling removeMemberGroupAttribute.'); - } - if (attribute === null || attribute === undefined) { - throw new Error('Required parameter attribute was null or undefined when calling removeMemberGroupAttribute.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (attribute !== undefined && attribute !== null) { - queryParameters = queryParameters.set('attribute', attribute); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/m-g`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove attributes of namespace member-group - * @param member id of Member - * @param group id of Group - * @param attributes list of attribute ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeMemberGroupAttributes(member: number, group: number, attributes: Array, observe?: 'body', reportProgress?: boolean): Observable; - public removeMemberGroupAttributes(member: number, group: number, attributes: Array, observe?: 'response', reportProgress?: boolean): Observable>; - public removeMemberGroupAttributes(member: number, group: number, attributes: Array, observe?: 'events', reportProgress?: boolean): Observable>; - public removeMemberGroupAttributes(member: number, group: number, attributes: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling removeMemberGroupAttributes.'); - } - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling removeMemberGroupAttributes.'); - } - if (attributes === null || attributes === undefined) { - throw new Error('Required parameter attributes was null or undefined when calling removeMemberGroupAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/m-g`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove attributes of namespace member-group - * @param member id of Member - * @param group id of Group - * @param attributes list of attribute ids List<Integer> - * @param workWithUserAttributes flag to work with user attributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeMemberGroupAttributesWorkWithUserAttributes(member: number, group: number, attributes: Array, workWithUserAttributes: boolean, observe?: 'body', reportProgress?: boolean): Observable; - public removeMemberGroupAttributesWorkWithUserAttributes(member: number, group: number, attributes: Array, workWithUserAttributes: boolean, observe?: 'response', reportProgress?: boolean): Observable>; - public removeMemberGroupAttributesWorkWithUserAttributes(member: number, group: number, attributes: Array, workWithUserAttributes: boolean, observe?: 'events', reportProgress?: boolean): Observable>; - public removeMemberGroupAttributesWorkWithUserAttributes(member: number, group: number, attributes: Array, workWithUserAttributes: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling removeMemberGroupAttributesWorkWithUserAttributes.'); - } - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling removeMemberGroupAttributesWorkWithUserAttributes.'); - } - if (attributes === null || attributes === undefined) { - throw new Error('Required parameter attributes was null or undefined when calling removeMemberGroupAttributesWorkWithUserAttributes.'); - } - if (workWithUserAttributes === null || workWithUserAttributes === undefined) { - throw new Error('Required parameter workWithUserAttributes was null or undefined when calling removeMemberGroupAttributesWorkWithUserAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }) - } - if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { - queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/m-g-workWithUserAttributes`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove member-resource attribute - * @param member id of Member - * @param resource id of Resource - * @param attribute id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeMemberResourceAttribute(member: number, resource: number, attribute: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeMemberResourceAttribute(member: number, resource: number, attribute: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeMemberResourceAttribute(member: number, resource: number, attribute: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeMemberResourceAttribute(member: number, resource: number, attribute: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling removeMemberResourceAttribute.'); - } - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling removeMemberResourceAttribute.'); - } - if (attribute === null || attribute === undefined) { - throw new Error('Required parameter attribute was null or undefined when calling removeMemberResourceAttribute.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (attribute !== undefined && attribute !== null) { - queryParameters = queryParameters.set('attribute', attribute); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/m-r`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove attributes of namespace member-resource - * @param member id of Member - * @param resource id of Resource - * @param attributes list of attribute ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeMemberResourceAttributes(member: number, resource: number, attributes: Array, observe?: 'body', reportProgress?: boolean): Observable; - public removeMemberResourceAttributes(member: number, resource: number, attributes: Array, observe?: 'response', reportProgress?: boolean): Observable>; - public removeMemberResourceAttributes(member: number, resource: number, attributes: Array, observe?: 'events', reportProgress?: boolean): Observable>; - public removeMemberResourceAttributes(member: number, resource: number, attributes: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling removeMemberResourceAttributes.'); - } - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling removeMemberResourceAttributes.'); - } - if (attributes === null || attributes === undefined) { - throw new Error('Required parameter attributes was null or undefined when calling removeMemberResourceAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/m-r`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove resource attribute - * @param resource id of Resource - * @param attribute id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeResourceAttribute(resource: number, attribute: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeResourceAttribute(resource: number, attribute: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeResourceAttribute(resource: number, attribute: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeResourceAttribute(resource: number, attribute: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling removeResourceAttribute.'); - } - if (attribute === null || attribute === undefined) { - throw new Error('Required parameter attribute was null or undefined when calling removeResourceAttribute.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (attribute !== undefined && attribute !== null) { - queryParameters = queryParameters.set('attribute', attribute); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/r`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove attributes of namespace resource - * @param resource id of Resource - * @param attributes list of attribute ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeResourceAttributes(resource: number, attributes: Array, observe?: 'body', reportProgress?: boolean): Observable; - public removeResourceAttributes(resource: number, attributes: Array, observe?: 'response', reportProgress?: boolean): Observable>; - public removeResourceAttributes(resource: number, attributes: Array, observe?: 'events', reportProgress?: boolean): Observable>; - public removeResourceAttributes(resource: number, attributes: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling removeResourceAttributes.'); - } - if (attributes === null || attributes === undefined) { - throw new Error('Required parameter attributes was null or undefined when calling removeResourceAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/r`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove attributes of namespace userExtSource - * @param userExtSource id of UserExtSource - * @param attributes list of attribute ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeUesAttributes(userExtSource: number, attributes: Array, observe?: 'body', reportProgress?: boolean): Observable; - public removeUesAttributes(userExtSource: number, attributes: Array, observe?: 'response', reportProgress?: boolean): Observable>; - public removeUesAttributes(userExtSource: number, attributes: Array, observe?: 'events', reportProgress?: boolean): Observable>; - public removeUesAttributes(userExtSource: number, attributes: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (userExtSource === null || userExtSource === undefined) { - throw new Error('Required parameter userExtSource was null or undefined when calling removeUesAttributes.'); - } - if (attributes === null || attributes === undefined) { - throw new Error('Required parameter attributes was null or undefined when calling removeUesAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (userExtSource !== undefined && userExtSource !== null) { - queryParameters = queryParameters.set('userExtSource', userExtSource); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/ues`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove user attribute - * @param user id of User - * @param attribute id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeUserAttribute(user: number, attribute: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeUserAttribute(user: number, attribute: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeUserAttribute(user: number, attribute: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeUserAttribute(user: number, attribute: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling removeUserAttribute.'); - } - if (attribute === null || attribute === undefined) { - throw new Error('Required parameter attribute was null or undefined when calling removeUserAttribute.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (attribute !== undefined && attribute !== null) { - queryParameters = queryParameters.set('attribute', attribute); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/u`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove attributes of namespace user - * @param user id of User - * @param attributes list of attribute ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeUserAttributes(user: number, attributes: Array, observe?: 'body', reportProgress?: boolean): Observable; - public removeUserAttributes(user: number, attributes: Array, observe?: 'response', reportProgress?: boolean): Observable>; - public removeUserAttributes(user: number, attributes: Array, observe?: 'events', reportProgress?: boolean): Observable>; - public removeUserAttributes(user: number, attributes: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling removeUserAttributes.'); - } - if (attributes === null || attributes === undefined) { - throw new Error('Required parameter attributes was null or undefined when calling removeUserAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/u`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove userExtSource attribute - * @param userExtSource id of UserExtSource - * @param attribute id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeUserExtSourceAttribute(userExtSource: number, attribute: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeUserExtSourceAttribute(userExtSource: number, attribute: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeUserExtSourceAttribute(userExtSource: number, attribute: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeUserExtSourceAttribute(userExtSource: number, attribute: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (userExtSource === null || userExtSource === undefined) { - throw new Error('Required parameter userExtSource was null or undefined when calling removeUserExtSourceAttribute.'); - } - if (attribute === null || attribute === undefined) { - throw new Error('Required parameter attribute was null or undefined when calling removeUserExtSourceAttribute.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (userExtSource !== undefined && userExtSource !== null) { - queryParameters = queryParameters.set('userExtSource', userExtSource); - } - if (attribute !== undefined && attribute !== null) { - queryParameters = queryParameters.set('attribute', attribute); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/ues`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove user facility attribute - * @param user id of User - * @param facility id of Facility - * @param attribute id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeUserFacilityAttribute(user: number, facility: number, attribute: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeUserFacilityAttribute(user: number, facility: number, attribute: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeUserFacilityAttribute(user: number, facility: number, attribute: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeUserFacilityAttribute(user: number, facility: number, attribute: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling removeUserFacilityAttribute.'); - } - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling removeUserFacilityAttribute.'); - } - if (attribute === null || attribute === undefined) { - throw new Error('Required parameter attribute was null or undefined when calling removeUserFacilityAttribute.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (attribute !== undefined && attribute !== null) { - queryParameters = queryParameters.set('attribute', attribute); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/u-f`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove attributes of namespace user-facility - * @param user id of User - * @param facility id of Facility - * @param attributes list of attribute ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeUserFacilityAttributes(user: number, facility: number, attributes: Array, observe?: 'body', reportProgress?: boolean): Observable; - public removeUserFacilityAttributes(user: number, facility: number, attributes: Array, observe?: 'response', reportProgress?: boolean): Observable>; - public removeUserFacilityAttributes(user: number, facility: number, attributes: Array, observe?: 'events', reportProgress?: boolean): Observable>; - public removeUserFacilityAttributes(user: number, facility: number, attributes: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling removeUserFacilityAttributes.'); - } - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling removeUserFacilityAttributes.'); - } - if (attributes === null || attributes === undefined) { - throw new Error('Required parameter attributes was null or undefined when calling removeUserFacilityAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/u-f`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove vo attribute - * @param vo id of Vo - * @param attribute id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeVoAttribute(vo: number, attribute: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeVoAttribute(vo: number, attribute: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeVoAttribute(vo: number, attribute: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeVoAttribute(vo: number, attribute: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling removeVoAttribute.'); - } - if (attribute === null || attribute === undefined) { - throw new Error('Required parameter attribute was null or undefined when calling removeVoAttribute.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (attribute !== undefined && attribute !== null) { - queryParameters = queryParameters.set('attribute', attribute); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/v`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove attributes of namespace vo - * @param vo id of Vo - * @param attributes list of attribute ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeVoAttributes(vo: number, attributes: Array, observe?: 'body', reportProgress?: boolean): Observable; - public removeVoAttributes(vo: number, attributes: Array, observe?: 'response', reportProgress?: boolean): Observable>; - public removeVoAttributes(vo: number, attributes: Array, observe?: 'events', reportProgress?: boolean): Observable>; - public removeVoAttributes(vo: number, attributes: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling removeVoAttributes.'); - } - if (attributes === null || attributes === undefined) { - throw new Error('Required parameter attributes was null or undefined when calling removeVoAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/v`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Deletes old attribute policy collections and sets attribute policy collections for an attribute definition provided in given policy collections. - * @param inputAttributePolicyCollections - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setAttributePolicyCollections(inputAttributePolicyCollections: InputAttributePolicyCollections, observe?: 'body', reportProgress?: boolean): Observable; - public setAttributePolicyCollections(inputAttributePolicyCollections: InputAttributePolicyCollections, observe?: 'response', reportProgress?: boolean): Observable>; - public setAttributePolicyCollections(inputAttributePolicyCollections: InputAttributePolicyCollections, observe?: 'events', reportProgress?: boolean): Observable>; - public setAttributePolicyCollections(inputAttributePolicyCollections: InputAttributePolicyCollections, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputAttributePolicyCollections === null || inputAttributePolicyCollections === undefined) { - throw new Error('Required parameter inputAttributePolicyCollections was null or undefined when calling setAttributePolicyCollections.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributePolicyCollections`, - inputAttributePolicyCollections, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Sets all AttributeRights in the list given as a parameter. Allowed Roles to set rights for are: VOADMIN, GROUPADMIN, FACILITYADMIN, SELF. - * @param inputAttributeRights - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setAttributeRights(inputAttributeRights: InputAttributeRights, observe?: 'body', reportProgress?: boolean): Observable; - public setAttributeRights(inputAttributeRights: InputAttributeRights, observe?: 'response', reportProgress?: boolean): Observable>; - public setAttributeRights(inputAttributeRights: InputAttributeRights, observe?: 'events', reportProgress?: boolean): Observable>; - public setAttributeRights(inputAttributeRights: InputAttributeRights, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputAttributeRights === null || inputAttributeRights === undefined) { - throw new Error('Required parameter inputAttributeRights was null or undefined when calling setAttributeRights.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributeRights`, - inputAttributeRights, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Sets entityless Attribute. - * @param inputEntitylessAttribute - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setEntitylessAttribute(inputEntitylessAttribute: InputEntitylessAttribute, observe?: 'body', reportProgress?: boolean): Observable; - public setEntitylessAttribute(inputEntitylessAttribute: InputEntitylessAttribute, observe?: 'response', reportProgress?: boolean): Observable>; - public setEntitylessAttribute(inputEntitylessAttribute: InputEntitylessAttribute, observe?: 'events', reportProgress?: boolean): Observable>; - public setEntitylessAttribute(inputEntitylessAttribute: InputEntitylessAttribute, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputEntitylessAttribute === null || inputEntitylessAttribute === undefined) { - throw new Error('Required parameter inputEntitylessAttribute was null or undefined when calling setEntitylessAttribute.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttribute/entityless`, - inputEntitylessAttribute, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Sets Attribute for Facility. - * @param inputSetFacilityAttribute - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setFacilityAttribute(inputSetFacilityAttribute: InputSetFacilityAttribute, observe?: 'body', reportProgress?: boolean): Observable; - public setFacilityAttribute(inputSetFacilityAttribute: InputSetFacilityAttribute, observe?: 'response', reportProgress?: boolean): Observable>; - public setFacilityAttribute(inputSetFacilityAttribute: InputSetFacilityAttribute, observe?: 'events', reportProgress?: boolean): Observable>; - public setFacilityAttribute(inputSetFacilityAttribute: InputSetFacilityAttribute, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetFacilityAttribute === null || inputSetFacilityAttribute === undefined) { - throw new Error('Required parameter inputSetFacilityAttribute was null or undefined when calling setFacilityAttribute.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttribute/facility`, - inputSetFacilityAttribute, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Store the attributes associated with the facility. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). - * @param inputSetFacilityAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setFacilityAttributes(inputSetFacilityAttributes: InputSetFacilityAttributes, observe?: 'body', reportProgress?: boolean): Observable; - public setFacilityAttributes(inputSetFacilityAttributes: InputSetFacilityAttributes, observe?: 'response', reportProgress?: boolean): Observable>; - public setFacilityAttributes(inputSetFacilityAttributes: InputSetFacilityAttributes, observe?: 'events', reportProgress?: boolean): Observable>; - public setFacilityAttributes(inputSetFacilityAttributes: InputSetFacilityAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetFacilityAttributes === null || inputSetFacilityAttributes === undefined) { - throw new Error('Required parameter inputSetFacilityAttributes was null or undefined when calling setFacilityAttributes.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/f`, - inputSetFacilityAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Store the member, user, member-group, member-resource and user-facility attributes. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). Group and group-resource attributes are not supported in this context. - * @param inputSetFacilityResourceGroupUserMemberAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setFacilityResourceGroupUserMemberAttributes(inputSetFacilityResourceGroupUserMemberAttributes: InputSetFacilityResourceGroupUserMemberAttributes, observe?: 'body', reportProgress?: boolean): Observable; - public setFacilityResourceGroupUserMemberAttributes(inputSetFacilityResourceGroupUserMemberAttributes: InputSetFacilityResourceGroupUserMemberAttributes, observe?: 'response', reportProgress?: boolean): Observable>; - public setFacilityResourceGroupUserMemberAttributes(inputSetFacilityResourceGroupUserMemberAttributes: InputSetFacilityResourceGroupUserMemberAttributes, observe?: 'events', reportProgress?: boolean): Observable>; - public setFacilityResourceGroupUserMemberAttributes(inputSetFacilityResourceGroupUserMemberAttributes: InputSetFacilityResourceGroupUserMemberAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetFacilityResourceGroupUserMemberAttributes === null || inputSetFacilityResourceGroupUserMemberAttributes === undefined) { - throw new Error('Required parameter inputSetFacilityResourceGroupUserMemberAttributes was null or undefined when calling setFacilityResourceGroupUserMemberAttributes.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/f-r-g-u-m`, - inputSetFacilityResourceGroupUserMemberAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Store the member, user, member-resource and user-facility attributes. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). - * @param inputSetFacilityResourceUserMemberAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setFacilityResourceUserMemberAttributes(inputSetFacilityResourceUserMemberAttributes: InputSetFacilityResourceUserMemberAttributes, observe?: 'body', reportProgress?: boolean): Observable; - public setFacilityResourceUserMemberAttributes(inputSetFacilityResourceUserMemberAttributes: InputSetFacilityResourceUserMemberAttributes, observe?: 'response', reportProgress?: boolean): Observable>; - public setFacilityResourceUserMemberAttributes(inputSetFacilityResourceUserMemberAttributes: InputSetFacilityResourceUserMemberAttributes, observe?: 'events', reportProgress?: boolean): Observable>; - public setFacilityResourceUserMemberAttributes(inputSetFacilityResourceUserMemberAttributes: InputSetFacilityResourceUserMemberAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetFacilityResourceUserMemberAttributes === null || inputSetFacilityResourceUserMemberAttributes === undefined) { - throw new Error('Required parameter inputSetFacilityResourceUserMemberAttributes was null or undefined when calling setFacilityResourceUserMemberAttributes.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/f-r-u-m`, - inputSetFacilityResourceUserMemberAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Store the attributes associated with the facility and user combination. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). - * @param inputSetFacilityUserAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setFacilityUserAttributes(inputSetFacilityUserAttributes: InputSetFacilityUserAttributes, observe?: 'body', reportProgress?: boolean): Observable; - public setFacilityUserAttributes(inputSetFacilityUserAttributes: InputSetFacilityUserAttributes, observe?: 'response', reportProgress?: boolean): Observable>; - public setFacilityUserAttributes(inputSetFacilityUserAttributes: InputSetFacilityUserAttributes, observe?: 'events', reportProgress?: boolean): Observable>; - public setFacilityUserAttributes(inputSetFacilityUserAttributes: InputSetFacilityUserAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetFacilityUserAttributes === null || inputSetFacilityUserAttributes === undefined) { - throw new Error('Required parameter inputSetFacilityUserAttributes was null or undefined when calling setFacilityUserAttributes.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/f-u`, - inputSetFacilityUserAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Sets Attribute for Group. - * @param inputSetGroupAttribute - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setGroupAttribute(inputSetGroupAttribute: InputSetGroupAttribute, observe?: 'body', reportProgress?: boolean): Observable; - public setGroupAttribute(inputSetGroupAttribute: InputSetGroupAttribute, observe?: 'response', reportProgress?: boolean): Observable>; - public setGroupAttribute(inputSetGroupAttribute: InputSetGroupAttribute, observe?: 'events', reportProgress?: boolean): Observable>; - public setGroupAttribute(inputSetGroupAttribute: InputSetGroupAttribute, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetGroupAttribute === null || inputSetGroupAttribute === undefined) { - throw new Error('Required parameter inputSetGroupAttribute was null or undefined when calling setGroupAttribute.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttribute/group`, - inputSetGroupAttribute, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Store the attributes associated with the group. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). - * @param inputSetGroupAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setGroupAttributes(inputSetGroupAttributes: InputSetGroupAttributes, observe?: 'body', reportProgress?: boolean): Observable; - public setGroupAttributes(inputSetGroupAttributes: InputSetGroupAttributes, observe?: 'response', reportProgress?: boolean): Observable>; - public setGroupAttributes(inputSetGroupAttributes: InputSetGroupAttributes, observe?: 'events', reportProgress?: boolean): Observable>; - public setGroupAttributes(inputSetGroupAttributes: InputSetGroupAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetGroupAttributes === null || inputSetGroupAttributes === undefined) { - throw new Error('Required parameter inputSetGroupAttributes was null or undefined when calling setGroupAttributes.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/g`, - inputSetGroupAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Sets Attribute for Group and Resource. - * @param inputSetGroupResourceAttribute - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setGroupResourceAttribute(inputSetGroupResourceAttribute: InputSetGroupResourceAttribute, observe?: 'body', reportProgress?: boolean): Observable; - public setGroupResourceAttribute(inputSetGroupResourceAttribute: InputSetGroupResourceAttribute, observe?: 'response', reportProgress?: boolean): Observable>; - public setGroupResourceAttribute(inputSetGroupResourceAttribute: InputSetGroupResourceAttribute, observe?: 'events', reportProgress?: boolean): Observable>; - public setGroupResourceAttribute(inputSetGroupResourceAttribute: InputSetGroupResourceAttribute, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetGroupResourceAttribute === null || inputSetGroupResourceAttribute === undefined) { - throw new Error('Required parameter inputSetGroupResourceAttribute was null or undefined when calling setGroupResourceAttribute.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttribute/group-resource`, - inputSetGroupResourceAttribute, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Sets Attributes for Group and Resource. - * @param inputSetGroupResourceAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setGroupResourceAttributes(inputSetGroupResourceAttributes: InputSetGroupResourceAttributes, observe?: 'body', reportProgress?: boolean): Observable; - public setGroupResourceAttributes(inputSetGroupResourceAttributes: InputSetGroupResourceAttributes, observe?: 'response', reportProgress?: boolean): Observable>; - public setGroupResourceAttributes(inputSetGroupResourceAttributes: InputSetGroupResourceAttributes, observe?: 'events', reportProgress?: boolean): Observable>; - public setGroupResourceAttributes(inputSetGroupResourceAttributes: InputSetGroupResourceAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetGroupResourceAttributes === null || inputSetGroupResourceAttributes === undefined) { - throw new Error('Required parameter inputSetGroupResourceAttributes was null or undefined when calling setGroupResourceAttributes.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/group-resource`, - inputSetGroupResourceAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Sets Attribute for Host. - * @param inputSetHostAttribute - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setHostAttribute(inputSetHostAttribute: InputSetHostAttribute, observe?: 'body', reportProgress?: boolean): Observable; - public setHostAttribute(inputSetHostAttribute: InputSetHostAttribute, observe?: 'response', reportProgress?: boolean): Observable>; - public setHostAttribute(inputSetHostAttribute: InputSetHostAttribute, observe?: 'events', reportProgress?: boolean): Observable>; - public setHostAttribute(inputSetHostAttribute: InputSetHostAttribute, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetHostAttribute === null || inputSetHostAttribute === undefined) { - throw new Error('Required parameter inputSetHostAttribute was null or undefined when calling setHostAttribute.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttribute/host`, - inputSetHostAttribute, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Store the attributes associated with the host. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). - * @param inputSetHostAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setHostAttributes(inputSetHostAttributes: InputSetHostAttributes, observe?: 'body', reportProgress?: boolean): Observable; - public setHostAttributes(inputSetHostAttributes: InputSetHostAttributes, observe?: 'response', reportProgress?: boolean): Observable>; - public setHostAttributes(inputSetHostAttributes: InputSetHostAttributes, observe?: 'events', reportProgress?: boolean): Observable>; - public setHostAttributes(inputSetHostAttributes: InputSetHostAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetHostAttributes === null || inputSetHostAttributes === undefined) { - throw new Error('Required parameter inputSetHostAttributes was null or undefined when calling setHostAttributes.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/h`, - inputSetHostAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Sets Attribute for Member. - * @param inputSetMemberAttribute - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setMemberAttribute(inputSetMemberAttribute: InputSetMemberAttribute, observe?: 'body', reportProgress?: boolean): Observable; - public setMemberAttribute(inputSetMemberAttribute: InputSetMemberAttribute, observe?: 'response', reportProgress?: boolean): Observable>; - public setMemberAttribute(inputSetMemberAttribute: InputSetMemberAttribute, observe?: 'events', reportProgress?: boolean): Observable>; - public setMemberAttribute(inputSetMemberAttribute: InputSetMemberAttribute, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetMemberAttribute === null || inputSetMemberAttribute === undefined) { - throw new Error('Required parameter inputSetMemberAttribute was null or undefined when calling setMemberAttribute.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttribute/member`, - inputSetMemberAttribute, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Store the attributes associated with the member. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). - * @param inputSetMemberAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setMemberAttributes(inputSetMemberAttributes: InputSetMemberAttributes, observe?: 'body', reportProgress?: boolean): Observable; - public setMemberAttributes(inputSetMemberAttributes: InputSetMemberAttributes, observe?: 'response', reportProgress?: boolean): Observable>; - public setMemberAttributes(inputSetMemberAttributes: InputSetMemberAttributes, observe?: 'events', reportProgress?: boolean): Observable>; - public setMemberAttributes(inputSetMemberAttributes: InputSetMemberAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetMemberAttributes === null || inputSetMemberAttributes === undefined) { - throw new Error('Required parameter inputSetMemberAttributes was null or undefined when calling setMemberAttributes.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/m`, - inputSetMemberAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Sets Attribute for Member and Group. - * @param inputSetMemberGroupAttribute - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setMemberGroupAttribute(inputSetMemberGroupAttribute: InputSetMemberGroupAttribute, observe?: 'body', reportProgress?: boolean): Observable; - public setMemberGroupAttribute(inputSetMemberGroupAttribute: InputSetMemberGroupAttribute, observe?: 'response', reportProgress?: boolean): Observable>; - public setMemberGroupAttribute(inputSetMemberGroupAttribute: InputSetMemberGroupAttribute, observe?: 'events', reportProgress?: boolean): Observable>; - public setMemberGroupAttribute(inputSetMemberGroupAttribute: InputSetMemberGroupAttribute, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetMemberGroupAttribute === null || inputSetMemberGroupAttribute === undefined) { - throw new Error('Required parameter inputSetMemberGroupAttribute was null or undefined when calling setMemberGroupAttribute.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttribute/member-group`, - inputSetMemberGroupAttribute, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Store the attributes associated with the member and group combination. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). - * @param inputSetMemberGroupAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setMemberGroupAttributes(inputSetMemberGroupAttributes: InputSetMemberGroupAttributes, observe?: 'body', reportProgress?: boolean): Observable; - public setMemberGroupAttributes(inputSetMemberGroupAttributes: InputSetMemberGroupAttributes, observe?: 'response', reportProgress?: boolean): Observable>; - public setMemberGroupAttributes(inputSetMemberGroupAttributes: InputSetMemberGroupAttributes, observe?: 'events', reportProgress?: boolean): Observable>; - public setMemberGroupAttributes(inputSetMemberGroupAttributes: InputSetMemberGroupAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetMemberGroupAttributes === null || inputSetMemberGroupAttributes === undefined) { - throw new Error('Required parameter inputSetMemberGroupAttributes was null or undefined when calling setMemberGroupAttributes.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/m-g`, - inputSetMemberGroupAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Store the attributes associated with the member and group combination. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). If workWithUserAttributes is true, the method stores also the attributes associated with user and member. - * @param inputSetMemberGroupWithUserAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setMemberGroupWithUserAttributes(inputSetMemberGroupWithUserAttributes: InputSetMemberGroupWithUserAttributes, observe?: 'body', reportProgress?: boolean): Observable; - public setMemberGroupWithUserAttributes(inputSetMemberGroupWithUserAttributes: InputSetMemberGroupWithUserAttributes, observe?: 'response', reportProgress?: boolean): Observable>; - public setMemberGroupWithUserAttributes(inputSetMemberGroupWithUserAttributes: InputSetMemberGroupWithUserAttributes, observe?: 'events', reportProgress?: boolean): Observable>; - public setMemberGroupWithUserAttributes(inputSetMemberGroupWithUserAttributes: InputSetMemberGroupWithUserAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetMemberGroupWithUserAttributes === null || inputSetMemberGroupWithUserAttributes === undefined) { - throw new Error('Required parameter inputSetMemberGroupWithUserAttributes was null or undefined when calling setMemberGroupWithUserAttributes.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/m-g-wu`, - inputSetMemberGroupWithUserAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Store the attributes associated with the resource and member combination. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). If workWithUserAttributes is true, the method stores also the attributes associated with user, user-facility and member. - * @param inputSetMemberResourceAndUserAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setMemberResourceAndUserAttributes(inputSetMemberResourceAndUserAttributes: InputSetMemberResourceAndUserAttributes, observe?: 'body', reportProgress?: boolean): Observable; - public setMemberResourceAndUserAttributes(inputSetMemberResourceAndUserAttributes: InputSetMemberResourceAndUserAttributes, observe?: 'response', reportProgress?: boolean): Observable>; - public setMemberResourceAndUserAttributes(inputSetMemberResourceAndUserAttributes: InputSetMemberResourceAndUserAttributes, observe?: 'events', reportProgress?: boolean): Observable>; - public setMemberResourceAndUserAttributes(inputSetMemberResourceAndUserAttributes: InputSetMemberResourceAndUserAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetMemberResourceAndUserAttributes === null || inputSetMemberResourceAndUserAttributes === undefined) { - throw new Error('Required parameter inputSetMemberResourceAndUserAttributes was null or undefined when calling setMemberResourceAndUserAttributes.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/m-r-wu`, - inputSetMemberResourceAndUserAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Sets Attribute for Member and Resource. - * @param inputSetMemberResourceAttribute - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setMemberResourceAttribute(inputSetMemberResourceAttribute: InputSetMemberResourceAttribute, observe?: 'body', reportProgress?: boolean): Observable; - public setMemberResourceAttribute(inputSetMemberResourceAttribute: InputSetMemberResourceAttribute, observe?: 'response', reportProgress?: boolean): Observable>; - public setMemberResourceAttribute(inputSetMemberResourceAttribute: InputSetMemberResourceAttribute, observe?: 'events', reportProgress?: boolean): Observable>; - public setMemberResourceAttribute(inputSetMemberResourceAttribute: InputSetMemberResourceAttribute, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetMemberResourceAttribute === null || inputSetMemberResourceAttribute === undefined) { - throw new Error('Required parameter inputSetMemberResourceAttribute was null or undefined when calling setMemberResourceAttribute.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttribute/member-resource`, - inputSetMemberResourceAttribute, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Store the attributes associated with the resource and member combination. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). - * @param inputSetMemberResourceAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setMemberResourceAttributes(inputSetMemberResourceAttributes: InputSetMemberResourceAttributes, observe?: 'body', reportProgress?: boolean): Observable; - public setMemberResourceAttributes(inputSetMemberResourceAttributes: InputSetMemberResourceAttributes, observe?: 'response', reportProgress?: boolean): Observable>; - public setMemberResourceAttributes(inputSetMemberResourceAttributes: InputSetMemberResourceAttributes, observe?: 'events', reportProgress?: boolean): Observable>; - public setMemberResourceAttributes(inputSetMemberResourceAttributes: InputSetMemberResourceAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetMemberResourceAttributes === null || inputSetMemberResourceAttributes === undefined) { - throw new Error('Required parameter inputSetMemberResourceAttributes was null or undefined when calling setMemberResourceAttributes.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/m-r`, - inputSetMemberResourceAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Store the attributes associated with member and user (which we get from this member) if workWithUserAttributes is true. - * @param inputSetMemberWithUserAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setMemberWithUserAttributes(inputSetMemberWithUserAttributes: InputSetMemberWithUserAttributes, observe?: 'body', reportProgress?: boolean): Observable; - public setMemberWithUserAttributes(inputSetMemberWithUserAttributes: InputSetMemberWithUserAttributes, observe?: 'response', reportProgress?: boolean): Observable>; - public setMemberWithUserAttributes(inputSetMemberWithUserAttributes: InputSetMemberWithUserAttributes, observe?: 'events', reportProgress?: boolean): Observable>; - public setMemberWithUserAttributes(inputSetMemberWithUserAttributes: InputSetMemberWithUserAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetMemberWithUserAttributes === null || inputSetMemberWithUserAttributes === undefined) { - throw new Error('Required parameter inputSetMemberWithUserAttributes was null or undefined when calling setMemberWithUserAttributes.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/m-wu`, - inputSetMemberWithUserAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Sets Attribute for Resource. - * @param inputSetResourceAttribute - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setResourceAttribute(inputSetResourceAttribute: InputSetResourceAttribute, observe?: 'body', reportProgress?: boolean): Observable; - public setResourceAttribute(inputSetResourceAttribute: InputSetResourceAttribute, observe?: 'response', reportProgress?: boolean): Observable>; - public setResourceAttribute(inputSetResourceAttribute: InputSetResourceAttribute, observe?: 'events', reportProgress?: boolean): Observable>; - public setResourceAttribute(inputSetResourceAttribute: InputSetResourceAttribute, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetResourceAttribute === null || inputSetResourceAttribute === undefined) { - throw new Error('Required parameter inputSetResourceAttribute was null or undefined when calling setResourceAttribute.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttribute/resource`, - inputSetResourceAttribute, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Store the attributes associated with the resource. - * @param inputSetResourceAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setResourceAttributes(inputSetResourceAttributes: InputSetResourceAttributes, observe?: 'body', reportProgress?: boolean): Observable; - public setResourceAttributes(inputSetResourceAttributes: InputSetResourceAttributes, observe?: 'response', reportProgress?: boolean): Observable>; - public setResourceAttributes(inputSetResourceAttributes: InputSetResourceAttributes, observe?: 'events', reportProgress?: boolean): Observable>; - public setResourceAttributes(inputSetResourceAttributes: InputSetResourceAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetResourceAttributes === null || inputSetResourceAttributes === undefined) { - throw new Error('Required parameter inputSetResourceAttributes was null or undefined when calling setResourceAttributes.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/r`, - inputSetResourceAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Store the attributes associated with the group on resource. - * @param inputSetResourceGroupAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setResourceGroupAttributes(inputSetResourceGroupAttributes: InputSetResourceGroupAttributes, observe?: 'body', reportProgress?: boolean): Observable; - public setResourceGroupAttributes(inputSetResourceGroupAttributes: InputSetResourceGroupAttributes, observe?: 'response', reportProgress?: boolean): Observable>; - public setResourceGroupAttributes(inputSetResourceGroupAttributes: InputSetResourceGroupAttributes, observe?: 'events', reportProgress?: boolean): Observable>; - public setResourceGroupAttributes(inputSetResourceGroupAttributes: InputSetResourceGroupAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetResourceGroupAttributes === null || inputSetResourceGroupAttributes === undefined) { - throw new Error('Required parameter inputSetResourceGroupAttributes was null or undefined when calling setResourceGroupAttributes.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/r-g`, - inputSetResourceGroupAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Store the attributes associated with group and resource, if workWithUserAttributes is true then also from group itself. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). - * @param inputSetResourceGroupWithGroupAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setResourceGroupWithGroupAttributes(inputSetResourceGroupWithGroupAttributes: InputSetResourceGroupWithGroupAttributes, observe?: 'body', reportProgress?: boolean): Observable; - public setResourceGroupWithGroupAttributes(inputSetResourceGroupWithGroupAttributes: InputSetResourceGroupWithGroupAttributes, observe?: 'response', reportProgress?: boolean): Observable>; - public setResourceGroupWithGroupAttributes(inputSetResourceGroupWithGroupAttributes: InputSetResourceGroupWithGroupAttributes, observe?: 'events', reportProgress?: boolean): Observable>; - public setResourceGroupWithGroupAttributes(inputSetResourceGroupWithGroupAttributes: InputSetResourceGroupWithGroupAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetResourceGroupWithGroupAttributes === null || inputSetResourceGroupWithGroupAttributes === undefined) { - throw new Error('Required parameter inputSetResourceGroupWithGroupAttributes was null or undefined when calling setResourceGroupWithGroupAttributes.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/r-g-wg`, - inputSetResourceGroupWithGroupAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Sets Attribute for User. - * @param inputSetUserAttribute - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setUserAttribute(inputSetUserAttribute: InputSetUserAttribute, observe?: 'body', reportProgress?: boolean): Observable; - public setUserAttribute(inputSetUserAttribute: InputSetUserAttribute, observe?: 'response', reportProgress?: boolean): Observable>; - public setUserAttribute(inputSetUserAttribute: InputSetUserAttribute, observe?: 'events', reportProgress?: boolean): Observable>; - public setUserAttribute(inputSetUserAttribute: InputSetUserAttribute, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetUserAttribute === null || inputSetUserAttribute === undefined) { - throw new Error('Required parameter inputSetUserAttribute was null or undefined when calling setUserAttribute.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttribute/user`, - inputSetUserAttribute, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Store the attributes associated with the user. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). - * @param inputSetUserAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setUserAttributes(inputSetUserAttributes: InputSetUserAttributes, observe?: 'body', reportProgress?: boolean): Observable; - public setUserAttributes(inputSetUserAttributes: InputSetUserAttributes, observe?: 'response', reportProgress?: boolean): Observable>; - public setUserAttributes(inputSetUserAttributes: InputSetUserAttributes, observe?: 'events', reportProgress?: boolean): Observable>; - public setUserAttributes(inputSetUserAttributes: InputSetUserAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetUserAttributes === null || inputSetUserAttributes === undefined) { - throw new Error('Required parameter inputSetUserAttributes was null or undefined when calling setUserAttributes.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/u`, - inputSetUserAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Sets Attribute for UserExtSource. - * @param inputSetUserExtSourceAttribute - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setUserExtSourceAttribute(inputSetUserExtSourceAttribute: InputSetUserExtSourceAttribute, observe?: 'body', reportProgress?: boolean): Observable; - public setUserExtSourceAttribute(inputSetUserExtSourceAttribute: InputSetUserExtSourceAttribute, observe?: 'response', reportProgress?: boolean): Observable>; - public setUserExtSourceAttribute(inputSetUserExtSourceAttribute: InputSetUserExtSourceAttribute, observe?: 'events', reportProgress?: boolean): Observable>; - public setUserExtSourceAttribute(inputSetUserExtSourceAttribute: InputSetUserExtSourceAttribute, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetUserExtSourceAttribute === null || inputSetUserExtSourceAttribute === undefined) { - throw new Error('Required parameter inputSetUserExtSourceAttribute was null or undefined when calling setUserExtSourceAttribute.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttribute/userExtSource`, - inputSetUserExtSourceAttribute, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Store the attributes associated with the UserExtSource. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). - * @param inputSetUserExtSourceAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setUserExtSourceAttributes(inputSetUserExtSourceAttributes: InputSetUserExtSourceAttributes, observe?: 'body', reportProgress?: boolean): Observable; - public setUserExtSourceAttributes(inputSetUserExtSourceAttributes: InputSetUserExtSourceAttributes, observe?: 'response', reportProgress?: boolean): Observable>; - public setUserExtSourceAttributes(inputSetUserExtSourceAttributes: InputSetUserExtSourceAttributes, observe?: 'events', reportProgress?: boolean): Observable>; - public setUserExtSourceAttributes(inputSetUserExtSourceAttributes: InputSetUserExtSourceAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetUserExtSourceAttributes === null || inputSetUserExtSourceAttributes === undefined) { - throw new Error('Required parameter inputSetUserExtSourceAttributes was null or undefined when calling setUserExtSourceAttributes.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/ues`, - inputSetUserExtSourceAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Sets Attribute for User and Facility. - * @param inputSetUserFacilityAttribute - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setUserFacilityAttribute(inputSetUserFacilityAttribute: InputSetUserFacilityAttribute, observe?: 'body', reportProgress?: boolean): Observable; - public setUserFacilityAttribute(inputSetUserFacilityAttribute: InputSetUserFacilityAttribute, observe?: 'response', reportProgress?: boolean): Observable>; - public setUserFacilityAttribute(inputSetUserFacilityAttribute: InputSetUserFacilityAttribute, observe?: 'events', reportProgress?: boolean): Observable>; - public setUserFacilityAttribute(inputSetUserFacilityAttribute: InputSetUserFacilityAttribute, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetUserFacilityAttribute === null || inputSetUserFacilityAttribute === undefined) { - throw new Error('Required parameter inputSetUserFacilityAttribute was null or undefined when calling setUserFacilityAttribute.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttribute/facility-user`, - inputSetUserFacilityAttribute, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Sets Attributes for User and Facility. - * @param inputSetUserFacilityAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setUserFacilityAttributes(inputSetUserFacilityAttributes: InputSetUserFacilityAttributes, observe?: 'body', reportProgress?: boolean): Observable; - public setUserFacilityAttributes(inputSetUserFacilityAttributes: InputSetUserFacilityAttributes, observe?: 'response', reportProgress?: boolean): Observable>; - public setUserFacilityAttributes(inputSetUserFacilityAttributes: InputSetUserFacilityAttributes, observe?: 'events', reportProgress?: boolean): Observable>; - public setUserFacilityAttributes(inputSetUserFacilityAttributes: InputSetUserFacilityAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetUserFacilityAttributes === null || inputSetUserFacilityAttributes === undefined) { - throw new Error('Required parameter inputSetUserFacilityAttributes was null or undefined when calling setUserFacilityAttributes.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/facility-user`, - inputSetUserFacilityAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Sets Attribute for Vo. - * @param inputSetVoAttribute - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setVoAttribute(inputSetVoAttribute: InputSetVoAttribute, observe?: 'body', reportProgress?: boolean): Observable; - public setVoAttribute(inputSetVoAttribute: InputSetVoAttribute, observe?: 'response', reportProgress?: boolean): Observable>; - public setVoAttribute(inputSetVoAttribute: InputSetVoAttribute, observe?: 'events', reportProgress?: boolean): Observable>; - public setVoAttribute(inputSetVoAttribute: InputSetVoAttribute, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetVoAttribute === null || inputSetVoAttribute === undefined) { - throw new Error('Required parameter inputSetVoAttribute was null or undefined when calling setVoAttribute.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttribute/vo`, - inputSetVoAttribute, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Store the attributes associated with the vo. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). - * @param inputSetVoAttributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setVoAttributes(inputSetVoAttributes: InputSetVoAttributes, observe?: 'body', reportProgress?: boolean): Observable; - public setVoAttributes(inputSetVoAttributes: InputSetVoAttributes, observe?: 'response', reportProgress?: boolean): Observable>; - public setVoAttributes(inputSetVoAttributes: InputSetVoAttributes, observe?: 'events', reportProgress?: boolean): Observable>; - public setVoAttributes(inputSetVoAttributes: InputSetVoAttributes, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetVoAttributes === null || inputSetVoAttributes === undefined) { - throw new Error('Required parameter inputSetVoAttributes was null or undefined when calling setVoAttributes.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/setAttributes/vo`, - inputSetVoAttributes, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Updates AttributeDefinition in Perun based on provided object. Update is done on AttributeDefinition selected by its <code>id</code>. - * @param inputAttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateAttributeDefinition(inputAttributeDefinition: InputAttributeDefinition, observe?: 'body', reportProgress?: boolean): Observable; - public updateAttributeDefinition(inputAttributeDefinition: InputAttributeDefinition, observe?: 'response', reportProgress?: boolean): Observable>; - public updateAttributeDefinition(inputAttributeDefinition: InputAttributeDefinition, observe?: 'events', reportProgress?: boolean): Observable>; - public updateAttributeDefinition(inputAttributeDefinition: InputAttributeDefinition, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputAttributeDefinition === null || inputAttributeDefinition === undefined) { - throw new Error('Required parameter inputAttributeDefinition was null or undefined when calling updateAttributeDefinition.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/attributesManager/updateAttributeDefinition`, - inputAttributeDefinition, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string, + @Optional() configuration: Configuration + ) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + /** + * Converts attribute to nonunique - unmarks unique flag from attribute definition, and deletes all values from a special table with unique constraint that ensures that all values remain unique. + * @param attributeDefinition id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public convertAttributeToNonunique( + attributeDefinition: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public convertAttributeToNonunique( + attributeDefinition: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public convertAttributeToNonunique( + attributeDefinition: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public convertAttributeToNonunique( + attributeDefinition: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (attributeDefinition === null || attributeDefinition === undefined) { + throw new Error( + 'Required parameter attributeDefinition was null or undefined when calling convertAttributeToNonunique.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (attributeDefinition !== undefined && attributeDefinition !== null) { + queryParameters = queryParameters.set('attributeDefinition', attributeDefinition); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/attributesManager/convertAttributeToNonunique`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Converts attribute to unique - marks its definition as unique and ensures that all its values are unique. Entityless attributes cannot be converted to unique, only attributes attached to PerunBeans or pairs of PerunBeans. + * @param attributeDefinition id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public convertAttributeToUnique( + attributeDefinition: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public convertAttributeToUnique( + attributeDefinition: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public convertAttributeToUnique( + attributeDefinition: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public convertAttributeToUnique( + attributeDefinition: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (attributeDefinition === null || attributeDefinition === undefined) { + throw new Error( + 'Required parameter attributeDefinition was null or undefined when calling convertAttributeToUnique.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (attributeDefinition !== undefined && attributeDefinition !== null) { + queryParameters = queryParameters.set('attributeDefinition', attributeDefinition); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/attributesManager/convertAttributeToUnique`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Creates AttributeDefinition. + * @param inputCreateAttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createAttributeDefinition( + inputCreateAttributeDefinition: InputCreateAttributeDefinition, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public createAttributeDefinition( + inputCreateAttributeDefinition: InputCreateAttributeDefinition, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public createAttributeDefinition( + inputCreateAttributeDefinition: InputCreateAttributeDefinition, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public createAttributeDefinition( + inputCreateAttributeDefinition: InputCreateAttributeDefinition, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputCreateAttributeDefinition === null || inputCreateAttributeDefinition === undefined) { + throw new Error( + 'Required parameter inputCreateAttributeDefinition was null or undefined when calling createAttributeDefinition.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/createAttribute`, + inputCreateAttributeDefinition, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Deletes attribute definition from Perun including all values set for any entity. + * @param attribute id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteAttributeDefinition( + attribute: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public deleteAttributeDefinition( + attribute: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public deleteAttributeDefinition( + attribute: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public deleteAttributeDefinition( + attribute: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (attribute === null || attribute === undefined) { + throw new Error( + 'Required parameter attribute was null or undefined when calling deleteAttributeDefinition.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (attribute !== undefined && attribute !== null) { + queryParameters = queryParameters.set('attribute', attribute); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/attributesManager/deleteAttribute`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Deletes attribute definitions from Perun including all values set for any entity. + * @param attributes list of attribute ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteAttributeDefinitions( + attributes: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public deleteAttributeDefinitions( + attributes: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public deleteAttributeDefinitions( + attributes: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public deleteAttributeDefinitions( + attributes: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (attributes === null || attributes === undefined) { + throw new Error( + 'Required parameter attributes was null or undefined when calling deleteAttributeDefinitions.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/attributesManager/deleteAttributes`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns all AttributeDefinitions. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllAttributeDefinitions( + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAllAttributeDefinitions( + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllAttributeDefinitions( + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAllAttributeDefinitions( + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributesDefinition`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns an Attribute by its name or id. + * This method cannot be fully described correctly in OpenID, because it cannot describe allowed combinations of parameters. One of attributeName, attributeId is required. The other parameters specify ids that can be combined in the following ways: (facility), (user), (user,facility), (vo), (member), (group), (resource), (member,group), (member,resource), (group,resource),(userExtSource), (host), (key) Use the specialized methods getFacilityAttributeByName(), getMemberResourceAttributeById() etc. + * @param attributeName full name of attribute (namespace + \':\' + friendlyName) + * @param attributeId id of attribute + * @param facility id of Facility + * @param user id of User + * @param vo id of Vo + * @param resource id of Resource + * @param member id of Member + * @param group id of Group + * @param host id of Host + * @param userExtSource id of UserExtSource + * @param key key for entityless attribute + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAttribute( + attributeName?: string, + attributeId?: number, + facility?: number, + user?: number, + vo?: number, + resource?: number, + member?: number, + group?: number, + host?: number, + userExtSource?: number, + key?: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getAttribute( + attributeName?: string, + attributeId?: number, + facility?: number, + user?: number, + vo?: number, + resource?: number, + member?: number, + group?: number, + host?: number, + userExtSource?: number, + key?: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getAttribute( + attributeName?: string, + attributeId?: number, + facility?: number, + user?: number, + vo?: number, + resource?: number, + member?: number, + group?: number, + host?: number, + userExtSource?: number, + key?: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getAttribute( + attributeName?: string, + attributeId?: number, + facility?: number, + user?: number, + vo?: number, + resource?: number, + member?: number, + group?: number, + host?: number, + userExtSource?: number, + key?: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (attributeName !== undefined && attributeName !== null) { + queryParameters = queryParameters.set('attributeName', attributeName); + } + if (attributeId !== undefined && attributeId !== null) { + queryParameters = queryParameters.set('attributeId', attributeId); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (host !== undefined && host !== null) { + queryParameters = queryParameters.set('host', host); + } + if (userExtSource !== undefined && userExtSource !== null) { + queryParameters = queryParameters.set('userExtSource', userExtSource); + } + if (key !== undefined && key !== null) { + queryParameters = queryParameters.set('key', key); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/attributesManager/getAttribute/any`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns an AttributeDefinition by its id. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAttributeDefinitionById( + id: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getAttributeDefinitionById( + id: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getAttributeDefinitionById( + id: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getAttributeDefinitionById( + id: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (id === null || id === undefined) { + throw new Error( + 'Required parameter id was null or undefined when calling getAttributeDefinitionById.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/attributesManager/getAttributeDefinitionById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns an AttributeDefinition by its name. + * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAttributeDefinitionByName( + attributeName: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getAttributeDefinitionByName( + attributeName: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getAttributeDefinitionByName( + attributeName: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getAttributeDefinitionByName( + attributeName: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (attributeName === null || attributeName === undefined) { + throw new Error( + 'Required parameter attributeName was null or undefined when calling getAttributeDefinitionByName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (attributeName !== undefined && attributeName !== null) { + queryParameters = queryParameters.set('attributeName', attributeName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/attributesManager/getAttributeDefinition`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns all AttributeDefinitions in a namespace. + * @param namespace name of namespace to obtain attribute definitions from + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAttributeDefinitionsByNamespace( + namespace: string, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAttributeDefinitionsByNamespace( + namespace: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAttributeDefinitionsByNamespace( + namespace: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAttributeDefinitionsByNamespace( + namespace: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (namespace === null || namespace === undefined) { + throw new Error( + 'Required parameter namespace was null or undefined when calling getAttributeDefinitionsByNamespace.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (namespace !== undefined && namespace !== null) { + queryParameters = queryParameters.set('namespace', namespace); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributesDefinitionByNamespace`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Generates text file describing dependencies between attribute modules. The format of text file can be specified by parameter. Modules that has no dependency relations are omitted. + * @param format Currently supported formats are DOT and TGF. + * @param attrName Attribute name which dependencies will be found. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAttributeModulesDependenciesForAttributeGraphText( + format: 'DOT' | 'TGF', + attrName: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getAttributeModulesDependenciesForAttributeGraphText( + format: 'DOT' | 'TGF', + attrName: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getAttributeModulesDependenciesForAttributeGraphText( + format: 'DOT' | 'TGF', + attrName: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getAttributeModulesDependenciesForAttributeGraphText( + format: 'DOT' | 'TGF', + attrName: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (format === null || format === undefined) { + throw new Error( + 'Required parameter format was null or undefined when calling getAttributeModulesDependenciesForAttributeGraphText.' + ); + } + if (attrName === null || attrName === undefined) { + throw new Error( + 'Required parameter attrName was null or undefined when calling getAttributeModulesDependenciesForAttributeGraphText.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (format !== undefined && format !== null) { + queryParameters = queryParameters.set('format', format); + } + if (attrName !== undefined && attrName !== null) { + queryParameters = queryParameters.set('attrName', attrName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/attributesManager/getAttributeModulesDependenciesGraphText/for-attribute`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Generates text file describing dependencies between attribute modules. The format of text file can be specified by parameter. Modules that has no dependency relations are omitted. + * @param format Currently supported formats are DOT and TGF. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAttributeModulesDependenciesGraphText( + format: 'DOT' | 'TGF', + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getAttributeModulesDependenciesGraphText( + format: 'DOT' | 'TGF', + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getAttributeModulesDependenciesGraphText( + format: 'DOT' | 'TGF', + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getAttributeModulesDependenciesGraphText( + format: 'DOT' | 'TGF', + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (format === null || format === undefined) { + throw new Error( + 'Required parameter format was null or undefined when calling getAttributeModulesDependenciesGraphText.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (format !== undefined && format !== null) { + queryParameters = queryParameters.set('format', format); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/attributesManager/getAttributeModulesDependenciesGraphText`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets attribute policy collections for an attribute definition with given id. + * @param attributeId id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAttributePolicyCollections( + attributeId: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAttributePolicyCollections( + attributeId: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAttributePolicyCollections( + attributeId: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAttributePolicyCollections( + attributeId: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (attributeId === null || attributeId === undefined) { + throw new Error( + 'Required parameter attributeId was null or undefined when calling getAttributePolicyCollections.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (attributeId !== undefined && attributeId !== null) { + queryParameters = queryParameters.set('attributeId', attributeId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributePolicyCollections`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets AttributeRights for specified Attribute. Rights specify which Role can do particular actions (read / write) with Attribute. Method always return rights for following roles: VOADMIN, GROUPADMIN, FACILITYADMIN, SELF. + * @param attributeId id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAttributeRights( + attributeId: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAttributeRights( + attributeId: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAttributeRights( + attributeId: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAttributeRights( + attributeId: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (attributeId === null || attributeId === undefined) { + throw new Error( + 'Required parameter attributeId was null or undefined when calling getAttributeRights.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (attributeId !== undefined && attributeId !== null) { + queryParameters = queryParameters.set('attributeId', attributeId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributeRights`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns all AttributeDefinitions for every entity and possible combination of entities with rights. Only attribute definition of attributes user can read (or write) you will get. Combination of entities is based on provided parameters, which are optional (at least one must be present). + * @param member id of Member + * @param user id of User + * @param vo id of Vo + * @param group id of Group + * @param resource id of Resource + * @param facility id of Facility + * @param host id of Host + * @param userExtSource id of UserExtSource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAttributesDefinitionWithRights( + member?: number, + user?: number, + vo?: number, + group?: number, + resource?: number, + facility?: number, + host?: number, + userExtSource?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAttributesDefinitionWithRights( + member?: number, + user?: number, + vo?: number, + group?: number, + resource?: number, + facility?: number, + host?: number, + userExtSource?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAttributesDefinitionWithRights( + member?: number, + user?: number, + vo?: number, + group?: number, + resource?: number, + facility?: number, + host?: number, + userExtSource?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAttributesDefinitionWithRights( + member?: number, + user?: number, + vo?: number, + group?: number, + resource?: number, + facility?: number, + host?: number, + userExtSource?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (host !== undefined && host !== null) { + queryParameters = queryParameters.set('host', host); + } + if (userExtSource !== undefined && userExtSource !== null) { + queryParameters = queryParameters.set('userExtSource', userExtSource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/urlinjsonout/attributesManager/getAttributesDefinitionWithRights`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns an entityless Attribute by its name. + * This is an overloaded method getAttribute, specialized for entityless key and attribute name. + * @param key key for entityless attribute + * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getEntitylessAttributeByName( + key: string, + attributeName: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getEntitylessAttributeByName( + key: string, + attributeName: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getEntitylessAttributeByName( + key: string, + attributeName: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getEntitylessAttributeByName( + key: string, + attributeName: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (key === null || key === undefined) { + throw new Error( + 'Required parameter key was null or undefined when calling getEntitylessAttributeByName.' + ); + } + if (attributeName === null || attributeName === undefined) { + throw new Error( + 'Required parameter attributeName was null or undefined when calling getEntitylessAttributeByName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (key !== undefined && key !== null) { + queryParameters = queryParameters.set('key', key); + } + if (attributeName !== undefined && attributeName !== null) { + queryParameters = queryParameters.set('attributeName', attributeName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/attributesManager/getAttribute/name-entityless`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all entityless attributes with subject equaled String key. + * @param key key for entityless attributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getEntitylessAttributesByKey( + key: string, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getEntitylessAttributesByKey( + key: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getEntitylessAttributesByKey( + key: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getEntitylessAttributesByKey( + key: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (key === null || key === undefined) { + throw new Error( + 'Required parameter key was null or undefined when calling getEntitylessAttributesByKey.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (key !== undefined && key !== null) { + queryParameters = queryParameters.set('key', key); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributes/key`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns all entityless attributes with attrName. + * @param attrName full name of attribute definition (namespace + \':\' + friendlyName) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getEntitylessAttributesByName( + attrName: string, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getEntitylessAttributesByName( + attrName: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getEntitylessAttributesByName( + attrName: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getEntitylessAttributesByName( + attrName: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (attrName === null || attrName === undefined) { + throw new Error( + 'Required parameter attrName was null or undefined when calling getEntitylessAttributesByName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (attrName !== undefined && attrName !== null) { + queryParameters = queryParameters.set('attrName', attrName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getEntitylessAttributes`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get entityless attributes mapped by their keys. + * @param attrName full name of attribute definition (namespace + \':\' + friendlyName) + * @param keys key for entityless attribute + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getEntitylessAttributesWithKeys( + attrName: string, + keys?: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable<{ [key: string]: Attribute }>; + public getEntitylessAttributesWithKeys( + attrName: string, + keys?: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getEntitylessAttributesWithKeys( + attrName: string, + keys?: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getEntitylessAttributesWithKeys( + attrName: string, + keys?: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (attrName === null || attrName === undefined) { + throw new Error( + 'Required parameter attrName was null or undefined when calling getEntitylessAttributesWithKeys.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (attrName !== undefined && attrName !== null) { + queryParameters = queryParameters.set('attrName', attrName); + } + if (keys) { + keys.forEach((element) => { + queryParameters = queryParameters.append('keys[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get<{ [key: string]: Attribute }>( + `${this.configuration.basePath}/json/attributesManager/getEntitylessAttributesWithKeys`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns list of Keys which fits the attributeDefinition. + * @param attributeDefinition id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getEntitylessKeys( + attributeDefinition: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getEntitylessKeys( + attributeDefinition: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getEntitylessKeys( + attributeDefinition: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getEntitylessKeys( + attributeDefinition: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (attributeDefinition === null || attributeDefinition === undefined) { + throw new Error( + 'Required parameter attributeDefinition was null or undefined when calling getEntitylessKeys.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (attributeDefinition !== undefined && attributeDefinition !== null) { + queryParameters = queryParameters.set('attributeDefinition', attributeDefinition); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getEntitylessKeys`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns a facility Attribute by its id. + * This is an overloaded method getAttribute, specialized for facility and attribute id. + * @param facility id of Facility + * @param attributeId id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityAttributeById( + facility: number, + attributeId: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getFacilityAttributeById( + facility: number, + attributeId: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getFacilityAttributeById( + facility: number, + attributeId: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getFacilityAttributeById( + facility: number, + attributeId: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getFacilityAttributeById.' + ); + } + if (attributeId === null || attributeId === undefined) { + throw new Error( + 'Required parameter attributeId was null or undefined when calling getFacilityAttributeById.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (attributeId !== undefined && attributeId !== null) { + queryParameters = queryParameters.set('attributeId', attributeId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/attributesManager/getAttribute/id-facility`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns a facility Attribute by its name. + * This is an overloaded method getAttribute, specialized for facility and attribute name. + * @param facility id of Facility + * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityAttributeByName( + facility: number, + attributeName: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getFacilityAttributeByName( + facility: number, + attributeName: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getFacilityAttributeByName( + facility: number, + attributeName: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getFacilityAttributeByName( + facility: number, + attributeName: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getFacilityAttributeByName.' + ); + } + if (attributeName === null || attributeName === undefined) { + throw new Error( + 'Required parameter attributeName was null or undefined when calling getFacilityAttributeByName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (attributeName !== undefined && attributeName !== null) { + queryParameters = queryParameters.set('attributeName', attributeName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/attributesManager/getAttribute/name-facility`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns all non-empty Facility attributes for selected Facility. + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityAttributes( + facility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getFacilityAttributes( + facility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getFacilityAttributes( + facility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getFacilityAttributes( + facility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getFacilityAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributes/f`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns all specified Facility attributes for selected Facility. + * @param facility id of Facility + * @param attrNames list of attribute names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityAttributesByNames( + facility: number, + attrNames: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getFacilityAttributesByNames( + facility: number, + attrNames: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getFacilityAttributesByNames( + facility: number, + attrNames: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getFacilityAttributesByNames( + facility: number, + attrNames: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getFacilityAttributesByNames.' + ); + } + if (attrNames === null || attrNames === undefined) { + throw new Error( + 'Required parameter attrNames was null or undefined when calling getFacilityAttributesByNames.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributes/f-names`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all non-empty member, user, member-resource and user-facility attributes. + * @param facility id of Facility + * @param resource id of Resource + * @param user id of User + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityResourceUserMemberAttributes( + facility: number, + resource: number, + user: number, + member: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getFacilityResourceUserMemberAttributes( + facility: number, + resource: number, + user: number, + member: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getFacilityResourceUserMemberAttributes( + facility: number, + resource: number, + user: number, + member: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getFacilityResourceUserMemberAttributes( + facility: number, + resource: number, + user: number, + member: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getFacilityResourceUserMemberAttributes.' + ); + } + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getFacilityResourceUserMemberAttributes.' + ); + } + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling getFacilityResourceUserMemberAttributes.' + ); + } + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getFacilityResourceUserMemberAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributes/f-r-u-m`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all non-empty attributes associated with the user on the facility. + * @param facility id of Facility + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityUserAttributes( + facility: number, + user: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getFacilityUserAttributes( + facility: number, + user: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getFacilityUserAttributes( + facility: number, + user: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getFacilityUserAttributes( + facility: number, + user: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getFacilityUserAttributes.' + ); + } + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling getFacilityUserAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributes/f-u`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns a group Attribute by its id. + * This is an overloaded method getAttribute, specialized for group and attribute id. + * @param group id of Group + * @param attributeId id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupAttributeById( + group: number, + attributeId: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getGroupAttributeById( + group: number, + attributeId: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getGroupAttributeById( + group: number, + attributeId: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getGroupAttributeById( + group: number, + attributeId: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getGroupAttributeById.' + ); + } + if (attributeId === null || attributeId === undefined) { + throw new Error( + 'Required parameter attributeId was null or undefined when calling getGroupAttributeById.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (attributeId !== undefined && attributeId !== null) { + queryParameters = queryParameters.set('attributeId', attributeId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/attributesManager/getAttribute/id-group`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns a group Attribute by its name. + * This is an overloaded method getAttribute, specialized for group and attribute name. + * @param group id of Group + * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupAttributeByName( + group: number, + attributeName: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getGroupAttributeByName( + group: number, + attributeName: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getGroupAttributeByName( + group: number, + attributeName: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getGroupAttributeByName( + group: number, + attributeName: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getGroupAttributeByName.' + ); + } + if (attributeName === null || attributeName === undefined) { + throw new Error( + 'Required parameter attributeName was null or undefined when calling getGroupAttributeByName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (attributeName !== undefined && attributeName !== null) { + queryParameters = queryParameters.set('attributeName', attributeName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/attributesManager/getAttribute/name-group`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all non-empty attributes associated with the group. + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupAttributes( + group: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getGroupAttributes( + group: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getGroupAttributes( + group: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getGroupAttributes( + group: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getGroupAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributes/g`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all attributes associated with the group which have name in list attrNames (empty too). Virtual attribute too. + * @param group id of Group + * @param attrNames list of attribute names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupAttributesByNames( + group: number, + attrNames: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getGroupAttributesByNames( + group: number, + attrNames: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getGroupAttributesByNames( + group: number, + attrNames: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getGroupAttributesByNames( + group: number, + attrNames: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getGroupAttributesByNames.' + ); + } + if (attrNames === null || attrNames === undefined) { + throw new Error( + 'Required parameter attrNames was null or undefined when calling getGroupAttributesByNames.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributes/g-names`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns a group_resource Attribute by its id. + * This is an overloaded method getAttribute, specialized for group, resource and attribute id. + * @param group id of Group + * @param resource id of Resource + * @param attributeId id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupResourceAttributeById( + group: number, + resource: number, + attributeId: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getGroupResourceAttributeById( + group: number, + resource: number, + attributeId: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getGroupResourceAttributeById( + group: number, + resource: number, + attributeId: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getGroupResourceAttributeById( + group: number, + resource: number, + attributeId: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getGroupResourceAttributeById.' + ); + } + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getGroupResourceAttributeById.' + ); + } + if (attributeId === null || attributeId === undefined) { + throw new Error( + 'Required parameter attributeId was null or undefined when calling getGroupResourceAttributeById.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (attributeId !== undefined && attributeId !== null) { + queryParameters = queryParameters.set('attributeId', attributeId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/attributesManager/getAttribute/id-group-resource`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns a group_resource Attribute by its name. + * This is an overloaded method getAttribute, specialized for group, resource and attribute name. + * @param group id of Group + * @param resource id of Resource + * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupResourceAttributeByName( + group: number, + resource: number, + attributeName: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getGroupResourceAttributeByName( + group: number, + resource: number, + attributeName: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getGroupResourceAttributeByName( + group: number, + resource: number, + attributeName: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getGroupResourceAttributeByName( + group: number, + resource: number, + attributeName: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getGroupResourceAttributeByName.' + ); + } + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getGroupResourceAttributeByName.' + ); + } + if (attributeName === null || attributeName === undefined) { + throw new Error( + 'Required parameter attributeName was null or undefined when calling getGroupResourceAttributeByName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (attributeName !== undefined && attributeName !== null) { + queryParameters = queryParameters.set('attributeName', attributeName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/attributesManager/getAttribute/name-group-resource`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns all non-empty Group-Resource attributes for selected Group and Resource. + * @param group id of Group + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupResourceAttributes( + group: number, + resource: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getGroupResourceAttributes( + group: number, + resource: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getGroupResourceAttributes( + group: number, + resource: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getGroupResourceAttributes( + group: number, + resource: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getGroupResourceAttributes.' + ); + } + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getGroupResourceAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributes/group-resource`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns a host Attribute by its id. + * This is an overloaded method getAttribute, specialized for host and attribute id. + * @param host id of Host + * @param attributeId id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getHostAttributeById( + host: number, + attributeId: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getHostAttributeById( + host: number, + attributeId: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getHostAttributeById( + host: number, + attributeId: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getHostAttributeById( + host: number, + attributeId: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (host === null || host === undefined) { + throw new Error( + 'Required parameter host was null or undefined when calling getHostAttributeById.' + ); + } + if (attributeId === null || attributeId === undefined) { + throw new Error( + 'Required parameter attributeId was null or undefined when calling getHostAttributeById.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (host !== undefined && host !== null) { + queryParameters = queryParameters.set('host', host); + } + if (attributeId !== undefined && attributeId !== null) { + queryParameters = queryParameters.set('attributeId', attributeId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/attributesManager/getAttribute/id-host`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns a host Attribute by its name. + * This is an overloaded method getAttribute, specialized for host and attribute name. + * @param host id of Host + * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getHostAttributeByName( + host: number, + attributeName: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getHostAttributeByName( + host: number, + attributeName: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getHostAttributeByName( + host: number, + attributeName: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getHostAttributeByName( + host: number, + attributeName: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (host === null || host === undefined) { + throw new Error( + 'Required parameter host was null or undefined when calling getHostAttributeByName.' + ); + } + if (attributeName === null || attributeName === undefined) { + throw new Error( + 'Required parameter attributeName was null or undefined when calling getHostAttributeByName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (host !== undefined && host !== null) { + queryParameters = queryParameters.set('host', host); + } + if (attributeName !== undefined && attributeName !== null) { + queryParameters = queryParameters.set('attributeName', attributeName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/attributesManager/getAttribute/name-host`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all non-empty attributes associated with the host. + * @param host id of Host + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getHostAttributes( + host: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getHostAttributes( + host: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getHostAttributes( + host: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getHostAttributes( + host: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (host === null || host === undefined) { + throw new Error( + 'Required parameter host was null or undefined when calling getHostAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (host !== undefined && host !== null) { + queryParameters = queryParameters.set('host', host); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributes/h`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all non-empty attributes associated with the host which have name in list attrNames (empty too). Empty list attrNames will return no attributes. + * @param host id of Host + * @param attrNames list of attribute names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getHostAttributesByNames( + host: number, + attrNames: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getHostAttributesByNames( + host: number, + attrNames: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getHostAttributesByNames( + host: number, + attrNames: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getHostAttributesByNames( + host: number, + attrNames: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (host === null || host === undefined) { + throw new Error( + 'Required parameter host was null or undefined when calling getHostAttributesByNames.' + ); + } + if (attrNames === null || attrNames === undefined) { + throw new Error( + 'Required parameter attrNames was null or undefined when calling getHostAttributesByNames.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (host !== undefined && host !== null) { + queryParameters = queryParameters.set('host', host); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributes/h-names`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all users logins as Attributes. Meaning it returns all non-empty User attributes with URN starting with: \"urn:perun:user:attribute-def:def:login-namespace:\". + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getLogins( + user: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getLogins( + user: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getLogins( + user: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getLogins( + user: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getLogins.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getLogins`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all non-empty attributes associated with the member and if workWithUserAttributes is true, get all non-empty attributes associated with user, who is this member. + * @param member id of Member + * @param workWithUserAttributes flag to work with user attributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberAndUserAttributes( + member: number, + workWithUserAttributes: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getMemberAndUserAttributes( + member: number, + workWithUserAttributes: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getMemberAndUserAttributes( + member: number, + workWithUserAttributes: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getMemberAndUserAttributes( + member: number, + workWithUserAttributes: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getMemberAndUserAttributes.' + ); + } + if (workWithUserAttributes === null || workWithUserAttributes === undefined) { + throw new Error( + 'Required parameter workWithUserAttributes was null or undefined when calling getMemberAndUserAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { + queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributes/m-wu`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all attributes associated with the member which have name in list attrNames (empty too). Virtual attributes too. If workWithUserAttribute is true, return also all user attributes in list of attrNames (with virtual attributes too). + * @param member id of Member + * @param attrNames list of attribute names List<String> + * @param workWithUserAttributes flag to work with user attributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberAndUserAttributesByNames( + member: number, + attrNames: Array, + workWithUserAttributes: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getMemberAndUserAttributesByNames( + member: number, + attrNames: Array, + workWithUserAttributes: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getMemberAndUserAttributesByNames( + member: number, + attrNames: Array, + workWithUserAttributes: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getMemberAndUserAttributesByNames( + member: number, + attrNames: Array, + workWithUserAttributes: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getMemberAndUserAttributesByNames.' + ); + } + if (attrNames === null || attrNames === undefined) { + throw new Error( + 'Required parameter attrNames was null or undefined when calling getMemberAndUserAttributesByNames.' + ); + } + if (workWithUserAttributes === null || workWithUserAttributes === undefined) { + throw new Error( + 'Required parameter workWithUserAttributes was null or undefined when calling getMemberAndUserAttributesByNames.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { + queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributes/m-names-wu`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns a member Attribute by its id. + * This is an overloaded method getAttribute, specialized for member and attribute id. + * @param member id of Member + * @param attributeId id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberAttributeById( + member: number, + attributeId: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getMemberAttributeById( + member: number, + attributeId: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getMemberAttributeById( + member: number, + attributeId: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getMemberAttributeById( + member: number, + attributeId: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getMemberAttributeById.' + ); + } + if (attributeId === null || attributeId === undefined) { + throw new Error( + 'Required parameter attributeId was null or undefined when calling getMemberAttributeById.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (attributeId !== undefined && attributeId !== null) { + queryParameters = queryParameters.set('attributeId', attributeId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/attributesManager/getAttribute/id-member`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns a member Attribute by its name. + * This is an overloaded method getAttribute, specialized for member and attribute name. + * @param member id of Member + * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberAttributeByName( + member: number, + attributeName: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getMemberAttributeByName( + member: number, + attributeName: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getMemberAttributeByName( + member: number, + attributeName: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getMemberAttributeByName( + member: number, + attributeName: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getMemberAttributeByName.' + ); + } + if (attributeName === null || attributeName === undefined) { + throw new Error( + 'Required parameter attributeName was null or undefined when calling getMemberAttributeByName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (attributeName !== undefined && attributeName !== null) { + queryParameters = queryParameters.set('attributeName', attributeName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/attributesManager/getAttribute/name-member`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all non-empty attributes associated with the member. + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberAttributes( + member: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getMemberAttributes( + member: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getMemberAttributes( + member: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getMemberAttributes( + member: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getMemberAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributes/m`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all attributes associated with the member which have name in list attrNames (empty too). Virtual attribute too. + * @param member id of Member + * @param attrNames list of attribute names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberAttributesByNames( + member: number, + attrNames: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getMemberAttributesByNames( + member: number, + attrNames: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getMemberAttributesByNames( + member: number, + attrNames: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getMemberAttributesByNames( + member: number, + attrNames: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getMemberAttributesByNames.' + ); + } + if (attrNames === null || attrNames === undefined) { + throw new Error( + 'Required parameter attrNames was null or undefined when calling getMemberAttributesByNames.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributes/m-names`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all attributes associated with the member in the group which have name in list attrNames (empty too). If workWithUserAttribute is true, return also all user attributes in list of attrNames (with virtual attributes too). + * @param member id of Member + * @param group id of Group + * @param attrNames list of attribute names List<String> + * @param workWithUserAttributes flag to work with user attributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberGroupAndUserAttributesByNames( + member: number, + group: number, + attrNames: Array, + workWithUserAttributes: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getMemberGroupAndUserAttributesByNames( + member: number, + group: number, + attrNames: Array, + workWithUserAttributes: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getMemberGroupAndUserAttributesByNames( + member: number, + group: number, + attrNames: Array, + workWithUserAttributes: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getMemberGroupAndUserAttributesByNames( + member: number, + group: number, + attrNames: Array, + workWithUserAttributes: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getMemberGroupAndUserAttributesByNames.' + ); + } + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getMemberGroupAndUserAttributesByNames.' + ); + } + if (attrNames === null || attrNames === undefined) { + throw new Error( + 'Required parameter attrNames was null or undefined when calling getMemberGroupAndUserAttributesByNames.' + ); + } + if (workWithUserAttributes === null || workWithUserAttributes === undefined) { + throw new Error( + 'Required parameter workWithUserAttributes was null or undefined when calling getMemberGroupAndUserAttributesByNames.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { + queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributes/m-g-names-wu`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns a member_group Attribute by its id. + * This is an overloaded method getAttribute, specialized for member, group and attribute id. + * @param member id of Member + * @param group id of Group + * @param attributeId id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberGroupAttributeById( + member: number, + group: number, + attributeId: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getMemberGroupAttributeById( + member: number, + group: number, + attributeId: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getMemberGroupAttributeById( + member: number, + group: number, + attributeId: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getMemberGroupAttributeById( + member: number, + group: number, + attributeId: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getMemberGroupAttributeById.' + ); + } + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getMemberGroupAttributeById.' + ); + } + if (attributeId === null || attributeId === undefined) { + throw new Error( + 'Required parameter attributeId was null or undefined when calling getMemberGroupAttributeById.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (attributeId !== undefined && attributeId !== null) { + queryParameters = queryParameters.set('attributeId', attributeId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/attributesManager/getAttribute/id-member-group`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns a member_group Attribute by its name. + * This is an overloaded method getAttribute, specialized for member, group and attribute name. + * @param member id of Member + * @param group id of Group + * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberGroupAttributeByName( + member: number, + group: number, + attributeName: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getMemberGroupAttributeByName( + member: number, + group: number, + attributeName: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getMemberGroupAttributeByName( + member: number, + group: number, + attributeName: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getMemberGroupAttributeByName( + member: number, + group: number, + attributeName: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getMemberGroupAttributeByName.' + ); + } + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getMemberGroupAttributeByName.' + ); + } + if (attributeName === null || attributeName === undefined) { + throw new Error( + 'Required parameter attributeName was null or undefined when calling getMemberGroupAttributeByName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (attributeName !== undefined && attributeName !== null) { + queryParameters = queryParameters.set('attributeName', attributeName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/attributesManager/getAttribute/name-member-group`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all non-empty attributes associated with the member in the group. + * @param member id of Member + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberGroupAttributes( + member: number, + group: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getMemberGroupAttributes( + member: number, + group: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getMemberGroupAttributes( + member: number, + group: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getMemberGroupAttributes( + member: number, + group: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getMemberGroupAttributes.' + ); + } + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getMemberGroupAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributes/m-g`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all attributes (empty and virtual too)associated with the member in the group which have name in list attrNames. + * @param member id of Member + * @param group id of Group + * @param attrNames list of attribute names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberGroupAttributesByNames( + member: number, + group: number, + attrNames: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getMemberGroupAttributesByNames( + member: number, + group: number, + attrNames: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getMemberGroupAttributesByNames( + member: number, + group: number, + attrNames: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getMemberGroupAttributesByNames( + member: number, + group: number, + attrNames: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getMemberGroupAttributesByNames.' + ); + } + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getMemberGroupAttributesByNames.' + ); + } + if (attrNames === null || attrNames === undefined) { + throw new Error( + 'Required parameter attrNames was null or undefined when calling getMemberGroupAttributesByNames.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributes/m-g-names`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets all non-empty attributes associated with the member on the resource and if workWithUserAttributes is true, gets also all non-empty user, user-facility and member attributes. + * @param member id of Member + * @param resource id of Resource + * @param workWithUserAttributes flag to work with user attributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberResourceAndUserFacilityAttributes( + member: number, + resource: number, + workWithUserAttributes: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getMemberResourceAndUserFacilityAttributes( + member: number, + resource: number, + workWithUserAttributes: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getMemberResourceAndUserFacilityAttributes( + member: number, + resource: number, + workWithUserAttributes: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getMemberResourceAndUserFacilityAttributes( + member: number, + resource: number, + workWithUserAttributes: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getMemberResourceAndUserFacilityAttributes.' + ); + } + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getMemberResourceAndUserFacilityAttributes.' + ); + } + if (workWithUserAttributes === null || workWithUserAttributes === undefined) { + throw new Error( + 'Required parameter workWithUserAttributes was null or undefined when calling getMemberResourceAndUserFacilityAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { + queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributes/m-r-wu`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets selected non-empty attributes associated with the member and the resource. It returns member and member-resource attributes and also user and user-facility attributes if workWithUserAttributes is true. Attributes are selected by list of attr_names. Empty list means all attributes. + * @param member id of Member + * @param resource id of Resource + * @param attrNames list of attribute names List<String> + * @param workWithUserAttributes flag to work with user attributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberResourceAndUserFacilityAttributesByNames( + member: number, + resource: number, + attrNames: Array, + workWithUserAttributes: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getMemberResourceAndUserFacilityAttributesByNames( + member: number, + resource: number, + attrNames: Array, + workWithUserAttributes: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getMemberResourceAndUserFacilityAttributesByNames( + member: number, + resource: number, + attrNames: Array, + workWithUserAttributes: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getMemberResourceAndUserFacilityAttributesByNames( + member: number, + resource: number, + attrNames: Array, + workWithUserAttributes: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getMemberResourceAndUserFacilityAttributesByNames.' + ); + } + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getMemberResourceAndUserFacilityAttributesByNames.' + ); + } + if (attrNames === null || attrNames === undefined) { + throw new Error( + 'Required parameter attrNames was null or undefined when calling getMemberResourceAndUserFacilityAttributesByNames.' + ); + } + if (workWithUserAttributes === null || workWithUserAttributes === undefined) { + throw new Error( + 'Required parameter workWithUserAttributes was null or undefined when calling getMemberResourceAndUserFacilityAttributesByNames.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { + queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributes/m-r-names-wu`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns a member_resource Attribute by its id. + * This is an overloaded method getAttribute, specialized for member, resource and attribute id. + * @param member id of Member + * @param resource id of Resource + * @param attributeId id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberResourceAttributeById( + member: number, + resource: number, + attributeId: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getMemberResourceAttributeById( + member: number, + resource: number, + attributeId: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getMemberResourceAttributeById( + member: number, + resource: number, + attributeId: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getMemberResourceAttributeById( + member: number, + resource: number, + attributeId: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getMemberResourceAttributeById.' + ); + } + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getMemberResourceAttributeById.' + ); + } + if (attributeId === null || attributeId === undefined) { + throw new Error( + 'Required parameter attributeId was null or undefined when calling getMemberResourceAttributeById.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (attributeId !== undefined && attributeId !== null) { + queryParameters = queryParameters.set('attributeId', attributeId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/attributesManager/getAttribute/id-member-resource`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns a member_resource Attribute by its name. + * This is an overloaded method getAttribute, specialized for member, resource and attribute name. + * @param member id of Member + * @param resource id of Resource + * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberResourceAttributeByName( + member: number, + resource: number, + attributeName: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getMemberResourceAttributeByName( + member: number, + resource: number, + attributeName: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getMemberResourceAttributeByName( + member: number, + resource: number, + attributeName: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getMemberResourceAttributeByName( + member: number, + resource: number, + attributeName: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getMemberResourceAttributeByName.' + ); + } + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getMemberResourceAttributeByName.' + ); + } + if (attributeName === null || attributeName === undefined) { + throw new Error( + 'Required parameter attributeName was null or undefined when calling getMemberResourceAttributeByName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (attributeName !== undefined && attributeName !== null) { + queryParameters = queryParameters.set('attributeName', attributeName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/attributesManager/getAttribute/name-member-resource`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all non-empty attributes associated with the member on the resource. + * @param member id of Member + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberResourceAttributes( + member: number, + resource: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getMemberResourceAttributes( + member: number, + resource: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getMemberResourceAttributes( + member: number, + resource: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getMemberResourceAttributes( + member: number, + resource: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getMemberResourceAttributes.' + ); + } + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getMemberResourceAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributes/m-r`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns required attributes definition for a Service. + * @param service id of Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRequiredAttributesDefinition( + service: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getRequiredAttributesDefinition( + service: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getRequiredAttributesDefinition( + service: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getRequiredAttributesDefinition( + service: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling getRequiredAttributesDefinition.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getRequiredAttributesDefinition`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns required facility attributes. + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRequiredAttributesFacility( + facility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getRequiredAttributesFacility( + facility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getRequiredAttributesFacility( + facility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getRequiredAttributesFacility( + facility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getRequiredAttributesFacility.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/f`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns facility attributes required by specified service. + * @param service id of Service + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRequiredAttributesFacilityService( + service: number, + facility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getRequiredAttributesFacilityService( + service: number, + facility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getRequiredAttributesFacilityService( + service: number, + facility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getRequiredAttributesFacilityService( + service: number, + facility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling getRequiredAttributesFacilityService.' + ); + } + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getRequiredAttributesFacilityService.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/s-f`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns facility attributes required by specified list of services. + * @param services list of Service ids List<Integer> + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRequiredAttributesFacilityServices( + services: Array, + facility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getRequiredAttributesFacilityServices( + services: Array, + facility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getRequiredAttributesFacilityServices( + services: Array, + facility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getRequiredAttributesFacilityServices( + services: Array, + facility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (services === null || services === undefined) { + throw new Error( + 'Required parameter services was null or undefined when calling getRequiredAttributesFacilityServices.' + ); + } + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getRequiredAttributesFacilityServices.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (services) { + services.forEach((element) => { + queryParameters = queryParameters.append('services[]', element); + }); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/ss-f`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns group-resource attributes required by specified service. + * @param service id of Service + * @param resource id of Resource + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRequiredAttributesGroupResourceService( + service: number, + resource: number, + group: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getRequiredAttributesGroupResourceService( + service: number, + resource: number, + group: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getRequiredAttributesGroupResourceService( + service: number, + resource: number, + group: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getRequiredAttributesGroupResourceService( + service: number, + resource: number, + group: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling getRequiredAttributesGroupResourceService.' + ); + } + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getRequiredAttributesGroupResourceService.' + ); + } + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getRequiredAttributesGroupResourceService.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/s-r-g`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns required host attributes. + * @param service id of Service + * @param host id of Host + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRequiredAttributesHostService( + service: number, + host: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getRequiredAttributesHostService( + service: number, + host: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getRequiredAttributesHostService( + service: number, + host: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getRequiredAttributesHostService( + service: number, + host: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling getRequiredAttributesHostService.' + ); + } + if (host === null || host === undefined) { + throw new Error( + 'Required parameter host was null or undefined when calling getRequiredAttributesHostService.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (host !== undefined && host !== null) { + queryParameters = queryParameters.set('host', host); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/s-h`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns required member attributes. + * @param member id of Member + * @param workWithUserAttributes flag to work with user attributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRequiredAttributesMember( + member: number, + workWithUserAttributes?: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getRequiredAttributesMember( + member: number, + workWithUserAttributes?: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getRequiredAttributesMember( + member: number, + workWithUserAttributes?: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getRequiredAttributesMember( + member: number, + workWithUserAttributes?: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getRequiredAttributesMember.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { + queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/m`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns required member-group attributes. If workWithUserAttributes == TRUE, then returns also user attributes. + * @param member id of Member + * @param group id of Group + * @param workWithUserAttributes flag to work with user attributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRequiredAttributesMemberGroup( + member: number, + group: number, + workWithUserAttributes?: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getRequiredAttributesMemberGroup( + member: number, + group: number, + workWithUserAttributes?: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getRequiredAttributesMemberGroup( + member: number, + group: number, + workWithUserAttributes?: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getRequiredAttributesMemberGroup( + member: number, + group: number, + workWithUserAttributes?: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getRequiredAttributesMemberGroup.' + ); + } + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getRequiredAttributesMemberGroup.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { + queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/m-g`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns member, member-group and member-resource attributes required by specified service. If workWithUserAttributes == TRUE, then returns also user and user-facility attributes. + * @param service id of Service + * @param resource id of Resource + * @param group id of Group + * @param member id of Member + * @param workWithUserAttributes flag to work with user attributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRequiredAttributesMemberGroupResourceService( + service: number, + resource: number, + group: number, + member: number, + workWithUserAttributes?: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getRequiredAttributesMemberGroupResourceService( + service: number, + resource: number, + group: number, + member: number, + workWithUserAttributes?: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getRequiredAttributesMemberGroupResourceService( + service: number, + resource: number, + group: number, + member: number, + workWithUserAttributes?: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getRequiredAttributesMemberGroupResourceService( + service: number, + resource: number, + group: number, + member: number, + workWithUserAttributes?: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling getRequiredAttributesMemberGroupResourceService.' + ); + } + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getRequiredAttributesMemberGroupResourceService.' + ); + } + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getRequiredAttributesMemberGroupResourceService.' + ); + } + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getRequiredAttributesMemberGroupResourceService.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { + queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/s-r-g-m`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns member-group attributes required by specified service. If workWithUserAttributes == TRUE, then returns also member and user attributes. + * @param service id of Service + * @param group id of Group + * @param member id of Member + * @param workWithUserAttributes flag to work with user attributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRequiredAttributesMemberGroupService( + service: number, + group: number, + member: number, + workWithUserAttributes?: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getRequiredAttributesMemberGroupService( + service: number, + group: number, + member: number, + workWithUserAttributes?: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getRequiredAttributesMemberGroupService( + service: number, + group: number, + member: number, + workWithUserAttributes?: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getRequiredAttributesMemberGroupService( + service: number, + group: number, + member: number, + workWithUserAttributes?: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling getRequiredAttributesMemberGroupService.' + ); + } + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getRequiredAttributesMemberGroupService.' + ); + } + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getRequiredAttributesMemberGroupService.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { + queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/s-g-m`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns member-resource attributes required by specified list of services. If workWithUserAttributes == TRUE, then returns also user attributes. + * @param member id of Member + * @param resource id of Resource + * @param workWithUserAttributes flag to work with user attributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRequiredAttributesMemberResource( + member: number, + resource: number, + workWithUserAttributes?: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getRequiredAttributesMemberResource( + member: number, + resource: number, + workWithUserAttributes?: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getRequiredAttributesMemberResource( + member: number, + resource: number, + workWithUserAttributes?: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getRequiredAttributesMemberResource( + member: number, + resource: number, + workWithUserAttributes?: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getRequiredAttributesMemberResource.' + ); + } + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getRequiredAttributesMemberResource.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { + queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/m-r`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns member and member-resource attributes required by the specified service. If workWithUserAttributes == TRUE, then returns also user attributes. + * @param service id of Service + * @param resource id of Resource + * @param member id of Member + * @param workWithUserAttributes flag to work with user attributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRequiredAttributesMemberResourceService( + service: number, + resource: number, + member: number, + workWithUserAttributes?: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getRequiredAttributesMemberResourceService( + service: number, + resource: number, + member: number, + workWithUserAttributes?: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getRequiredAttributesMemberResourceService( + service: number, + resource: number, + member: number, + workWithUserAttributes?: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getRequiredAttributesMemberResourceService( + service: number, + resource: number, + member: number, + workWithUserAttributes?: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling getRequiredAttributesMemberResourceService.' + ); + } + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getRequiredAttributesMemberResourceService.' + ); + } + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getRequiredAttributesMemberResourceService.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { + queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/s-r-m`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns required resource attributes. + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRequiredAttributesResource( + resource: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getRequiredAttributesResource( + resource: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getRequiredAttributesResource( + resource: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getRequiredAttributesResource( + resource: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getRequiredAttributesResource.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/r`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns resource attributes required by specified service. + * @param service id of Service + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRequiredAttributesResourceService( + service: number, + resource: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getRequiredAttributesResourceService( + service: number, + resource: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getRequiredAttributesResourceService( + service: number, + resource: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getRequiredAttributesResourceService( + service: number, + resource: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling getRequiredAttributesResourceService.' + ); + } + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getRequiredAttributesResourceService.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/s-r`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns resource attributes required by specified list of services. + * @param services list of Service ids List<Integer> + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRequiredAttributesResourceServices( + services: Array, + resource: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getRequiredAttributesResourceServices( + services: Array, + resource: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getRequiredAttributesResourceServices( + services: Array, + resource: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getRequiredAttributesResourceServices( + services: Array, + resource: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (services === null || services === undefined) { + throw new Error( + 'Required parameter services was null or undefined when calling getRequiredAttributesResourceServices.' + ); + } + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getRequiredAttributesResourceServices.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (services) { + services.forEach((element) => { + queryParameters = queryParameters.append('services[]', element); + }); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/ss-r`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns required user attributes. + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRequiredAttributesUser( + user: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getRequiredAttributesUser( + user: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getRequiredAttributesUser( + user: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getRequiredAttributesUser( + user: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling getRequiredAttributesUser.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/u`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns required user-facility attributes. + * @param user id of User + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRequiredAttributesUserFacility( + user: number, + facility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getRequiredAttributesUserFacility( + user: number, + facility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getRequiredAttributesUserFacility( + user: number, + facility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getRequiredAttributesUserFacility( + user: number, + facility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling getRequiredAttributesUserFacility.' + ); + } + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getRequiredAttributesUserFacility.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/u-f`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns required vo attributes. + * @param service id of Service + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRequiredAttributesVoService( + service: number, + vo: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getRequiredAttributesVoService( + service: number, + vo: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getRequiredAttributesVoService( + service: number, + vo: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getRequiredAttributesVoService( + service: number, + vo: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling getRequiredAttributesVoService.' + ); + } + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling getRequiredAttributesVoService.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getRequiredAttributes/s-v`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns a resource Attribute by its id. + * This is an overloaded method getAttribute, specialized for resource and attribute id. + * @param resource id of Resource + * @param attributeId id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourceAttributeById( + resource: number, + attributeId: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getResourceAttributeById( + resource: number, + attributeId: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getResourceAttributeById( + resource: number, + attributeId: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getResourceAttributeById( + resource: number, + attributeId: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getResourceAttributeById.' + ); + } + if (attributeId === null || attributeId === undefined) { + throw new Error( + 'Required parameter attributeId was null or undefined when calling getResourceAttributeById.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (attributeId !== undefined && attributeId !== null) { + queryParameters = queryParameters.set('attributeId', attributeId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/attributesManager/getAttribute/id-resource`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns a resource Attribute by its name. + * This is an overloaded method getAttribute, specialized for resource and attribute name. + * @param resource id of Resource + * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourceAttributeByName( + resource: number, + attributeName: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getResourceAttributeByName( + resource: number, + attributeName: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getResourceAttributeByName( + resource: number, + attributeName: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getResourceAttributeByName( + resource: number, + attributeName: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getResourceAttributeByName.' + ); + } + if (attributeName === null || attributeName === undefined) { + throw new Error( + 'Required parameter attributeName was null or undefined when calling getResourceAttributeByName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (attributeName !== undefined && attributeName !== null) { + queryParameters = queryParameters.set('attributeName', attributeName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/attributesManager/getAttribute/name-resource`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all non-empty attributes associated with the resource. + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourceAttributes( + resource: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getResourceAttributes( + resource: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getResourceAttributes( + resource: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getResourceAttributes( + resource: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getResourceAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributes/r`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all attributes associated with the resource which have name in list attrNames (empty too). Virtual attributes too. + * @param resource id of Resource + * @param attrNames list of attribute names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourceAttributesByNames( + resource: number, + attrNames: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getResourceAttributesByNames( + resource: number, + attrNames: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getResourceAttributesByNames( + resource: number, + attrNames: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getResourceAttributesByNames( + resource: number, + attrNames: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getResourceAttributesByNames.' + ); + } + if (attrNames === null || attrNames === undefined) { + throw new Error( + 'Required parameter attrNames was null or undefined when calling getResourceAttributesByNames.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributes/r-names`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all non-empty attributes associated with the group and resource. Virtual attributes too. If workWithGroupAttributes is true, return also all group attributes. + * @param resource id of Resource + * @param group id of Group + * @param workWithGroupAttributes flag to work with group attributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourceGroupAndGroupAttributes( + resource: number, + group: number, + workWithGroupAttributes: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getResourceGroupAndGroupAttributes( + resource: number, + group: number, + workWithGroupAttributes: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getResourceGroupAndGroupAttributes( + resource: number, + group: number, + workWithGroupAttributes: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getResourceGroupAndGroupAttributes( + resource: number, + group: number, + workWithGroupAttributes: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getResourceGroupAndGroupAttributes.' + ); + } + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getResourceGroupAndGroupAttributes.' + ); + } + if (workWithGroupAttributes === null || workWithGroupAttributes === undefined) { + throw new Error( + 'Required parameter workWithGroupAttributes was null or undefined when calling getResourceGroupAndGroupAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (workWithGroupAttributes !== undefined && workWithGroupAttributes !== null) { + queryParameters = queryParameters.set( + 'workWithGroupAttributes', + workWithGroupAttributes + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributes/r-g-wg`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all attributes associated with the group and the resource which have their name in list attrNames (empty too). Virtual attributes too. If workWithGroupAttributes is true, return also all group attributes in list of attrNames (with virtual attributes too). + * @param resource id of Resource + * @param group id of Group + * @param attrNames list of attribute names List<String> + * @param workWithGroupAttributes flag to work with group attributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourceGroupAndGroupAttributesByNames( + resource: number, + group: number, + attrNames: Array, + workWithGroupAttributes: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getResourceGroupAndGroupAttributesByNames( + resource: number, + group: number, + attrNames: Array, + workWithGroupAttributes: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getResourceGroupAndGroupAttributesByNames( + resource: number, + group: number, + attrNames: Array, + workWithGroupAttributes: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getResourceGroupAndGroupAttributesByNames( + resource: number, + group: number, + attrNames: Array, + workWithGroupAttributes: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getResourceGroupAndGroupAttributesByNames.' + ); + } + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getResourceGroupAndGroupAttributesByNames.' + ); + } + if (attrNames === null || attrNames === undefined) { + throw new Error( + 'Required parameter attrNames was null or undefined when calling getResourceGroupAndGroupAttributesByNames.' + ); + } + if (workWithGroupAttributes === null || workWithGroupAttributes === undefined) { + throw new Error( + 'Required parameter workWithGroupAttributes was null or undefined when calling getResourceGroupAndGroupAttributesByNames.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + if (workWithGroupAttributes !== undefined && workWithGroupAttributes !== null) { + queryParameters = queryParameters.set( + 'workWithGroupAttributes', + workWithGroupAttributes + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributes/r-g-names-wg`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all non-empty attributes associated with the group on resource. + * @param resource id of Resource + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourceGroupAttributes( + resource: number, + group: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getResourceGroupAttributes( + resource: number, + group: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getResourceGroupAttributes( + resource: number, + group: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getResourceGroupAttributes( + resource: number, + group: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getResourceGroupAttributes.' + ); + } + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getResourceGroupAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributes/r-g`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all attributes by the list of attrNames if they are in one of these namespaces: - member - group - member-group - resource - member-resource - group-resource - user (get from member object) - facility (get from resource object) - user-facility Returns all attributes even if they are empty or virtual. + * @param resource id of Resource + * @param group id of Group + * @param member id of Member + * @param attrNames list of attribute names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourceGroupMemberAttributesByNames( + resource: number, + group: number, + member: number, + attrNames: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getResourceGroupMemberAttributesByNames( + resource: number, + group: number, + member: number, + attrNames: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getResourceGroupMemberAttributesByNames( + resource: number, + group: number, + member: number, + attrNames: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getResourceGroupMemberAttributesByNames( + resource: number, + group: number, + member: number, + attrNames: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getResourceGroupMemberAttributesByNames.' + ); + } + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getResourceGroupMemberAttributesByNames.' + ); + } + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getResourceGroupMemberAttributesByNames.' + ); + } + if (attrNames === null || attrNames === undefined) { + throw new Error( + 'Required parameter attrNames was null or undefined when calling getResourceGroupMemberAttributesByNames.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributes/r-g-m-names`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns a user Attribute by its id. + * This is an overloaded method getAttribute, specialized for user and attribute id. + * @param user id of User + * @param attributeId id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserAttributeById( + user: number, + attributeId: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getUserAttributeById( + user: number, + attributeId: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getUserAttributeById( + user: number, + attributeId: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getUserAttributeById( + user: number, + attributeId: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling getUserAttributeById.' + ); + } + if (attributeId === null || attributeId === undefined) { + throw new Error( + 'Required parameter attributeId was null or undefined when calling getUserAttributeById.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (attributeId !== undefined && attributeId !== null) { + queryParameters = queryParameters.set('attributeId', attributeId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/attributesManager/getAttribute/id-user`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns a user Attribute by its name. + * This is an overloaded method getAttribute, specialized for user and attribute name. + * @param user id of User + * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserAttributeByName( + user: number, + attributeName: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getUserAttributeByName( + user: number, + attributeName: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getUserAttributeByName( + user: number, + attributeName: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getUserAttributeByName( + user: number, + attributeName: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling getUserAttributeByName.' + ); + } + if (attributeName === null || attributeName === undefined) { + throw new Error( + 'Required parameter attributeName was null or undefined when calling getUserAttributeByName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (attributeName !== undefined && attributeName !== null) { + queryParameters = queryParameters.set('attributeName', attributeName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/attributesManager/getAttribute/name-user`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all non-empty attributes associated with the user. + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserAttributes( + user: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getUserAttributes( + user: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getUserAttributes( + user: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getUserAttributes( + user: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling getUserAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributes/u`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all attributes associated with the user which have name in list attrNames (empty too). + * @param user id of User + * @param attrNames list of attribute names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserAttributesByNames( + user: number, + attrNames: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getUserAttributesByNames( + user: number, + attrNames: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getUserAttributesByNames( + user: number, + attrNames: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getUserAttributesByNames( + user: number, + attrNames: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling getUserAttributesByNames.' + ); + } + if (attrNames === null || attrNames === undefined) { + throw new Error( + 'Required parameter attrNames was null or undefined when calling getUserAttributesByNames.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributes/u-names`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns a UserExtSource Attribute by its id. + * This is an overloaded method getAttribute, specialized for UserExtSource and attribute id. + * @param userExtSource id of UserExtSource + * @param attributeId id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserExtSourceAttributeById( + userExtSource: number, + attributeId: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getUserExtSourceAttributeById( + userExtSource: number, + attributeId: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getUserExtSourceAttributeById( + userExtSource: number, + attributeId: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getUserExtSourceAttributeById( + userExtSource: number, + attributeId: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (userExtSource === null || userExtSource === undefined) { + throw new Error( + 'Required parameter userExtSource was null or undefined when calling getUserExtSourceAttributeById.' + ); + } + if (attributeId === null || attributeId === undefined) { + throw new Error( + 'Required parameter attributeId was null or undefined when calling getUserExtSourceAttributeById.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (userExtSource !== undefined && userExtSource !== null) { + queryParameters = queryParameters.set('userExtSource', userExtSource); + } + if (attributeId !== undefined && attributeId !== null) { + queryParameters = queryParameters.set('attributeId', attributeId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/attributesManager/getAttribute/id-ues`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns a UserExtSource Attribute by its name. + * This is an overloaded method getAttribute, specialized for UserExtSource and attribute name. + * @param userExtSource id of UserExtSource + * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserExtSourceAttributeByName( + userExtSource: number, + attributeName: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getUserExtSourceAttributeByName( + userExtSource: number, + attributeName: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getUserExtSourceAttributeByName( + userExtSource: number, + attributeName: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getUserExtSourceAttributeByName( + userExtSource: number, + attributeName: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (userExtSource === null || userExtSource === undefined) { + throw new Error( + 'Required parameter userExtSource was null or undefined when calling getUserExtSourceAttributeByName.' + ); + } + if (attributeName === null || attributeName === undefined) { + throw new Error( + 'Required parameter attributeName was null or undefined when calling getUserExtSourceAttributeByName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (userExtSource !== undefined && userExtSource !== null) { + queryParameters = queryParameters.set('userExtSource', userExtSource); + } + if (attributeName !== undefined && attributeName !== null) { + queryParameters = queryParameters.set('attributeName', attributeName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/attributesManager/getAttribute/name-ues`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all non-empty attributes associated with the UserExtSource. + * @param userExtSource id of UserExtSource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserExtSourceAttributes( + userExtSource: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getUserExtSourceAttributes( + userExtSource: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getUserExtSourceAttributes( + userExtSource: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getUserExtSourceAttributes( + userExtSource: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (userExtSource === null || userExtSource === undefined) { + throw new Error( + 'Required parameter userExtSource was null or undefined when calling getUserExtSourceAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (userExtSource !== undefined && userExtSource !== null) { + queryParameters = queryParameters.set('userExtSource', userExtSource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributes/ues`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all attributes associated with the userExtSource which have name in list attrNames (empty too). + * @param userExtSource id of UserExtSource + * @param attrNames list of attribute names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserExtSourceAttributesByNames( + userExtSource: number, + attrNames: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getUserExtSourceAttributesByNames( + userExtSource: number, + attrNames: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getUserExtSourceAttributesByNames( + userExtSource: number, + attrNames: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getUserExtSourceAttributesByNames( + userExtSource: number, + attrNames: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (userExtSource === null || userExtSource === undefined) { + throw new Error( + 'Required parameter userExtSource was null or undefined when calling getUserExtSourceAttributesByNames.' + ); + } + if (attrNames === null || attrNames === undefined) { + throw new Error( + 'Required parameter attrNames was null or undefined when calling getUserExtSourceAttributesByNames.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (userExtSource !== undefined && userExtSource !== null) { + queryParameters = queryParameters.set('userExtSource', userExtSource); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributes/ues-names`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns a user_facility Attribute by its id. + * This is an overloaded method getAttribute, specialized for user, facility and attribute id. + * @param user id of User + * @param facility id of Facility + * @param attributeId id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserFacilityAttributeById( + user: number, + facility: number, + attributeId: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getUserFacilityAttributeById( + user: number, + facility: number, + attributeId: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getUserFacilityAttributeById( + user: number, + facility: number, + attributeId: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getUserFacilityAttributeById( + user: number, + facility: number, + attributeId: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling getUserFacilityAttributeById.' + ); + } + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getUserFacilityAttributeById.' + ); + } + if (attributeId === null || attributeId === undefined) { + throw new Error( + 'Required parameter attributeId was null or undefined when calling getUserFacilityAttributeById.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (attributeId !== undefined && attributeId !== null) { + queryParameters = queryParameters.set('attributeId', attributeId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/attributesManager/getAttribute/id-user_facility`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns a user_facility Attribute by its name. + * This is an overloaded method getAttribute, specialized for user, facility and attribute name. + * @param user id of User + * @param facility id of Facility + * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserFacilityAttributeByName( + user: number, + facility: number, + attributeName: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getUserFacilityAttributeByName( + user: number, + facility: number, + attributeName: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getUserFacilityAttributeByName( + user: number, + facility: number, + attributeName: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getUserFacilityAttributeByName( + user: number, + facility: number, + attributeName: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling getUserFacilityAttributeByName.' + ); + } + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getUserFacilityAttributeByName.' + ); + } + if (attributeName === null || attributeName === undefined) { + throw new Error( + 'Required parameter attributeName was null or undefined when calling getUserFacilityAttributeByName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (attributeName !== undefined && attributeName !== null) { + queryParameters = queryParameters.set('attributeName', attributeName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/attributesManager/getAttribute/name-user_facility`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns all non-empty User-Facility attributes for selected User and Facility. + * @param user id of User + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserFacilityAttributes( + user: number, + facility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getUserFacilityAttributes( + user: number, + facility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getUserFacilityAttributes( + user: number, + facility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getUserFacilityAttributes( + user: number, + facility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling getUserFacilityAttributes.' + ); + } + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getUserFacilityAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributes/user-facility`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns a Vo Attribute by its id. + * This is an overloaded method getAttribute, specialized for virtual organization and attribute id. + * @param vo id of Vo + * @param attributeId id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVoAttributeById( + vo: number, + attributeId: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getVoAttributeById( + vo: number, + attributeId: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getVoAttributeById( + vo: number, + attributeId: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getVoAttributeById( + vo: number, + attributeId: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling getVoAttributeById.' + ); + } + if (attributeId === null || attributeId === undefined) { + throw new Error( + 'Required parameter attributeId was null or undefined when calling getVoAttributeById.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (attributeId !== undefined && attributeId !== null) { + queryParameters = queryParameters.set('attributeId', attributeId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/attributesManager/getAttribute/id-vo`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns a Vo Attribute by its name. + * This is an overloaded method getAttribute, specialized for virtual organization and attribute name. + * @param vo id of Vo + * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVoAttributeByName( + vo: number, + attributeName: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getVoAttributeByName( + vo: number, + attributeName: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getVoAttributeByName( + vo: number, + attributeName: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getVoAttributeByName( + vo: number, + attributeName: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling getVoAttributeByName.' + ); + } + if (attributeName === null || attributeName === undefined) { + throw new Error( + 'Required parameter attributeName was null or undefined when calling getVoAttributeByName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (attributeName !== undefined && attributeName !== null) { + queryParameters = queryParameters.set('attributeName', attributeName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/attributesManager/getAttribute/name-vo`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all attributes associated with the vo. + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVoAttributes( + vo: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getVoAttributes( + vo: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getVoAttributes( + vo: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getVoAttributes( + vo: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getVoAttributes.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributes/vo`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all attributes associated with the vo which have name in list attrNames (empty too). + * @param vo id of Vo + * @param attrNames list of attribute names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVoAttributesByNames( + vo: number, + attrNames: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getVoAttributesByNames( + vo: number, + attrNames: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getVoAttributesByNames( + vo: number, + attrNames: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getVoAttributesByNames( + vo: number, + attrNames: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling getVoAttributesByNames.' + ); + } + if (attrNames === null || attrNames === undefined) { + throw new Error( + 'Required parameter attrNames was null or undefined when calling getVoAttributesByNames.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/attributesManager/getAttributes/vo-names`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove attributes of namespace facility, resource, group, user and member + * @param facility id of Facility + * @param resource id of Resource + * @param group id of Group + * @param user id of User + * @param member id of Member + * @param attributes list of attribute ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeAttributesForFacilityResourceGroupUserMember( + facility: number, + resource: number, + group: number, + user: number, + member: number, + attributes: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeAttributesForFacilityResourceGroupUserMember( + facility: number, + resource: number, + group: number, + user: number, + member: number, + attributes: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeAttributesForFacilityResourceGroupUserMember( + facility: number, + resource: number, + group: number, + user: number, + member: number, + attributes: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeAttributesForFacilityResourceGroupUserMember( + facility: number, + resource: number, + group: number, + user: number, + member: number, + attributes: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling removeAttributesForFacilityResourceGroupUserMember.' + ); + } + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling removeAttributesForFacilityResourceGroupUserMember.' + ); + } + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling removeAttributesForFacilityResourceGroupUserMember.' + ); + } + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling removeAttributesForFacilityResourceGroupUserMember.' + ); + } + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling removeAttributesForFacilityResourceGroupUserMember.' + ); + } + if (attributes === null || attributes === undefined) { + throw new Error( + 'Required parameter attributes was null or undefined when calling removeAttributesForFacilityResourceGroupUserMember.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/f-r-g-u-m`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove attributes of namespace facility, resource, user and member + * @param facility id of Facility + * @param resource id of Resource + * @param user id of User + * @param member id of Member + * @param attributes list of attribute ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeAttributesForFacilityResourceUserMember( + facility: number, + resource: number, + user: number, + member: number, + attributes: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeAttributesForFacilityResourceUserMember( + facility: number, + resource: number, + user: number, + member: number, + attributes: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeAttributesForFacilityResourceUserMember( + facility: number, + resource: number, + user: number, + member: number, + attributes: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeAttributesForFacilityResourceUserMember( + facility: number, + resource: number, + user: number, + member: number, + attributes: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling removeAttributesForFacilityResourceUserMember.' + ); + } + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling removeAttributesForFacilityResourceUserMember.' + ); + } + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling removeAttributesForFacilityResourceUserMember.' + ); + } + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling removeAttributesForFacilityResourceUserMember.' + ); + } + if (attributes === null || attributes === undefined) { + throw new Error( + 'Required parameter attributes was null or undefined when calling removeAttributesForFacilityResourceUserMember.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/f-r-u-m`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove entityless attribute + * @param key key of an entityless attribute + * @param attribute id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeEntitylessAttribute( + key: string, + attribute: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeEntitylessAttribute( + key: string, + attribute: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeEntitylessAttribute( + key: string, + attribute: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeEntitylessAttribute( + key: string, + attribute: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (key === null || key === undefined) { + throw new Error( + 'Required parameter key was null or undefined when calling removeEntitylessAttribute.' + ); + } + if (attribute === null || attribute === undefined) { + throw new Error( + 'Required parameter attribute was null or undefined when calling removeEntitylessAttribute.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (key !== undefined && key !== null) { + queryParameters = queryParameters.set('key', key); + } + if (attribute !== undefined && attribute !== null) { + queryParameters = queryParameters.set('attribute', attribute); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/e`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove facility attribute + * @param facility id of Facility + * @param attribute id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeFacilityAttribute( + facility: number, + attribute: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeFacilityAttribute( + facility: number, + attribute: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeFacilityAttribute( + facility: number, + attribute: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeFacilityAttribute( + facility: number, + attribute: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling removeFacilityAttribute.' + ); + } + if (attribute === null || attribute === undefined) { + throw new Error( + 'Required parameter attribute was null or undefined when calling removeFacilityAttribute.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (attribute !== undefined && attribute !== null) { + queryParameters = queryParameters.set('attribute', attribute); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/f`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove attributes of namespace facility + * @param facility id of Facility + * @param attributes list of attribute ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeFacilityAttributes( + facility: number, + attributes: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeFacilityAttributes( + facility: number, + attributes: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeFacilityAttributes( + facility: number, + attributes: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeFacilityAttributes( + facility: number, + attributes: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling removeFacilityAttributes.' + ); + } + if (attributes === null || attributes === undefined) { + throw new Error( + 'Required parameter attributes was null or undefined when calling removeFacilityAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/f`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove group attribute + * @param group id of Group + * @param attribute id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeGroupAttribute( + group: number, + attribute: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeGroupAttribute( + group: number, + attribute: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeGroupAttribute( + group: number, + attribute: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeGroupAttribute( + group: number, + attribute: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling removeGroupAttribute.' + ); + } + if (attribute === null || attribute === undefined) { + throw new Error( + 'Required parameter attribute was null or undefined when calling removeGroupAttribute.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (attribute !== undefined && attribute !== null) { + queryParameters = queryParameters.set('attribute', attribute); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/g`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove attributes of namespace group + * @param group id of Group + * @param attributes list of attribute ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeGroupAttributes( + group: number, + attributes: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeGroupAttributes( + group: number, + attributes: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeGroupAttributes( + group: number, + attributes: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeGroupAttributes( + group: number, + attributes: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling removeGroupAttributes.' + ); + } + if (attributes === null || attributes === undefined) { + throw new Error( + 'Required parameter attributes was null or undefined when calling removeGroupAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/g`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove group-resource attribute + * @param group id of Group + * @param resource id of Resource + * @param attribute id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeGroupResourceAttribute( + group: number, + resource: number, + attribute: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeGroupResourceAttribute( + group: number, + resource: number, + attribute: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeGroupResourceAttribute( + group: number, + resource: number, + attribute: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeGroupResourceAttribute( + group: number, + resource: number, + attribute: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling removeGroupResourceAttribute.' + ); + } + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling removeGroupResourceAttribute.' + ); + } + if (attribute === null || attribute === undefined) { + throw new Error( + 'Required parameter attribute was null or undefined when calling removeGroupResourceAttribute.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (attribute !== undefined && attribute !== null) { + queryParameters = queryParameters.set('attribute', attribute); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/g-r`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove attributes of namespace group-resource + * @param group id of Group + * @param resource id of Resource + * @param attributes list of attribute ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeGroupResourceAttributes( + group: number, + resource: number, + attributes: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeGroupResourceAttributes( + group: number, + resource: number, + attributes: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeGroupResourceAttributes( + group: number, + resource: number, + attributes: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeGroupResourceAttributes( + group: number, + resource: number, + attributes: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling removeGroupResourceAttributes.' + ); + } + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling removeGroupResourceAttributes.' + ); + } + if (attributes === null || attributes === undefined) { + throw new Error( + 'Required parameter attributes was null or undefined when calling removeGroupResourceAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/g-r`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove attributes of namespace group-resource + * @param group id of Group + * @param resource id of Resource + * @param attributes list of attribute ids List<Integer> + * @param workWithGroupAttributes flag to work with group attributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeGroupResourceAttributesWorkWithGroupAttributes( + group: number, + resource: number, + attributes: Array, + workWithGroupAttributes: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeGroupResourceAttributesWorkWithGroupAttributes( + group: number, + resource: number, + attributes: Array, + workWithGroupAttributes: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeGroupResourceAttributesWorkWithGroupAttributes( + group: number, + resource: number, + attributes: Array, + workWithGroupAttributes: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeGroupResourceAttributesWorkWithGroupAttributes( + group: number, + resource: number, + attributes: Array, + workWithGroupAttributes: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling removeGroupResourceAttributesWorkWithGroupAttributes.' + ); + } + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling removeGroupResourceAttributesWorkWithGroupAttributes.' + ); + } + if (attributes === null || attributes === undefined) { + throw new Error( + 'Required parameter attributes was null or undefined when calling removeGroupResourceAttributesWorkWithGroupAttributes.' + ); + } + if (workWithGroupAttributes === null || workWithGroupAttributes === undefined) { + throw new Error( + 'Required parameter workWithGroupAttributes was null or undefined when calling removeGroupResourceAttributesWorkWithGroupAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }); + } + if (workWithGroupAttributes !== undefined && workWithGroupAttributes !== null) { + queryParameters = queryParameters.set( + 'workWithGroupAttributes', + workWithGroupAttributes + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/g-r-workWithGroupAttributes`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove host attribute + * @param host id of Host + * @param attribute id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeHostAttribute( + host: number, + attribute: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeHostAttribute( + host: number, + attribute: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeHostAttribute( + host: number, + attribute: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeHostAttribute( + host: number, + attribute: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (host === null || host === undefined) { + throw new Error( + 'Required parameter host was null or undefined when calling removeHostAttribute.' + ); + } + if (attribute === null || attribute === undefined) { + throw new Error( + 'Required parameter attribute was null or undefined when calling removeHostAttribute.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (host !== undefined && host !== null) { + queryParameters = queryParameters.set('host', host); + } + if (attribute !== undefined && attribute !== null) { + queryParameters = queryParameters.set('attribute', attribute); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/h`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove attributes of namespace host + * @param host id of Host + * @param attributes list of attribute ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeHostAttributes( + host: number, + attributes: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeHostAttributes( + host: number, + attributes: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeHostAttributes( + host: number, + attributes: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeHostAttributes( + host: number, + attributes: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (host === null || host === undefined) { + throw new Error( + 'Required parameter host was null or undefined when calling removeHostAttributes.' + ); + } + if (attributes === null || attributes === undefined) { + throw new Error( + 'Required parameter attributes was null or undefined when calling removeHostAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (host !== undefined && host !== null) { + queryParameters = queryParameters.set('host', host); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/h`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove member attribute + * @param member id of Member + * @param attribute id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeMemberAttribute( + member: number, + attribute: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeMemberAttribute( + member: number, + attribute: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeMemberAttribute( + member: number, + attribute: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeMemberAttribute( + member: number, + attribute: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling removeMemberAttribute.' + ); + } + if (attribute === null || attribute === undefined) { + throw new Error( + 'Required parameter attribute was null or undefined when calling removeMemberAttribute.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (attribute !== undefined && attribute !== null) { + queryParameters = queryParameters.set('attribute', attribute); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/m`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove attributes of namespace member + * @param member id of Member + * @param attributes list of attribute ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeMemberAttributes( + member: number, + attributes: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeMemberAttributes( + member: number, + attributes: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeMemberAttributes( + member: number, + attributes: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeMemberAttributes( + member: number, + attributes: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling removeMemberAttributes.' + ); + } + if (attributes === null || attributes === undefined) { + throw new Error( + 'Required parameter attributes was null or undefined when calling removeMemberAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/m`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove attributes of namespace member + * @param member id of Member + * @param attributes list of attribute ids List<Integer> + * @param workWithUserAttributes flag to work with user attributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeMemberAttributesWorkWithUserAttributes( + member: number, + attributes: Array, + workWithUserAttributes: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeMemberAttributesWorkWithUserAttributes( + member: number, + attributes: Array, + workWithUserAttributes: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeMemberAttributesWorkWithUserAttributes( + member: number, + attributes: Array, + workWithUserAttributes: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeMemberAttributesWorkWithUserAttributes( + member: number, + attributes: Array, + workWithUserAttributes: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling removeMemberAttributesWorkWithUserAttributes.' + ); + } + if (attributes === null || attributes === undefined) { + throw new Error( + 'Required parameter attributes was null or undefined when calling removeMemberAttributesWorkWithUserAttributes.' + ); + } + if (workWithUserAttributes === null || workWithUserAttributes === undefined) { + throw new Error( + 'Required parameter workWithUserAttributes was null or undefined when calling removeMemberAttributesWorkWithUserAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }); + } + if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { + queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/m-workWithUserAttributes`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove member-group attribute + * @param member id of Member + * @param group id of Group + * @param attribute id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeMemberGroupAttribute( + member: number, + group: number, + attribute: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeMemberGroupAttribute( + member: number, + group: number, + attribute: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeMemberGroupAttribute( + member: number, + group: number, + attribute: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeMemberGroupAttribute( + member: number, + group: number, + attribute: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling removeMemberGroupAttribute.' + ); + } + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling removeMemberGroupAttribute.' + ); + } + if (attribute === null || attribute === undefined) { + throw new Error( + 'Required parameter attribute was null or undefined when calling removeMemberGroupAttribute.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (attribute !== undefined && attribute !== null) { + queryParameters = queryParameters.set('attribute', attribute); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/m-g`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove attributes of namespace member-group + * @param member id of Member + * @param group id of Group + * @param attributes list of attribute ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeMemberGroupAttributes( + member: number, + group: number, + attributes: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeMemberGroupAttributes( + member: number, + group: number, + attributes: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeMemberGroupAttributes( + member: number, + group: number, + attributes: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeMemberGroupAttributes( + member: number, + group: number, + attributes: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling removeMemberGroupAttributes.' + ); + } + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling removeMemberGroupAttributes.' + ); + } + if (attributes === null || attributes === undefined) { + throw new Error( + 'Required parameter attributes was null or undefined when calling removeMemberGroupAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/m-g`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove attributes of namespace member-group + * @param member id of Member + * @param group id of Group + * @param attributes list of attribute ids List<Integer> + * @param workWithUserAttributes flag to work with user attributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeMemberGroupAttributesWorkWithUserAttributes( + member: number, + group: number, + attributes: Array, + workWithUserAttributes: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeMemberGroupAttributesWorkWithUserAttributes( + member: number, + group: number, + attributes: Array, + workWithUserAttributes: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeMemberGroupAttributesWorkWithUserAttributes( + member: number, + group: number, + attributes: Array, + workWithUserAttributes: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeMemberGroupAttributesWorkWithUserAttributes( + member: number, + group: number, + attributes: Array, + workWithUserAttributes: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling removeMemberGroupAttributesWorkWithUserAttributes.' + ); + } + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling removeMemberGroupAttributesWorkWithUserAttributes.' + ); + } + if (attributes === null || attributes === undefined) { + throw new Error( + 'Required parameter attributes was null or undefined when calling removeMemberGroupAttributesWorkWithUserAttributes.' + ); + } + if (workWithUserAttributes === null || workWithUserAttributes === undefined) { + throw new Error( + 'Required parameter workWithUserAttributes was null or undefined when calling removeMemberGroupAttributesWorkWithUserAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }); + } + if (workWithUserAttributes !== undefined && workWithUserAttributes !== null) { + queryParameters = queryParameters.set('workWithUserAttributes', workWithUserAttributes); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/m-g-workWithUserAttributes`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove member-resource attribute + * @param member id of Member + * @param resource id of Resource + * @param attribute id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeMemberResourceAttribute( + member: number, + resource: number, + attribute: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeMemberResourceAttribute( + member: number, + resource: number, + attribute: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeMemberResourceAttribute( + member: number, + resource: number, + attribute: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeMemberResourceAttribute( + member: number, + resource: number, + attribute: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling removeMemberResourceAttribute.' + ); + } + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling removeMemberResourceAttribute.' + ); + } + if (attribute === null || attribute === undefined) { + throw new Error( + 'Required parameter attribute was null or undefined when calling removeMemberResourceAttribute.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (attribute !== undefined && attribute !== null) { + queryParameters = queryParameters.set('attribute', attribute); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/m-r`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove attributes of namespace member-resource + * @param member id of Member + * @param resource id of Resource + * @param attributes list of attribute ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeMemberResourceAttributes( + member: number, + resource: number, + attributes: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeMemberResourceAttributes( + member: number, + resource: number, + attributes: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeMemberResourceAttributes( + member: number, + resource: number, + attributes: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeMemberResourceAttributes( + member: number, + resource: number, + attributes: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling removeMemberResourceAttributes.' + ); + } + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling removeMemberResourceAttributes.' + ); + } + if (attributes === null || attributes === undefined) { + throw new Error( + 'Required parameter attributes was null or undefined when calling removeMemberResourceAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/m-r`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove resource attribute + * @param resource id of Resource + * @param attribute id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeResourceAttribute( + resource: number, + attribute: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeResourceAttribute( + resource: number, + attribute: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeResourceAttribute( + resource: number, + attribute: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeResourceAttribute( + resource: number, + attribute: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling removeResourceAttribute.' + ); + } + if (attribute === null || attribute === undefined) { + throw new Error( + 'Required parameter attribute was null or undefined when calling removeResourceAttribute.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (attribute !== undefined && attribute !== null) { + queryParameters = queryParameters.set('attribute', attribute); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/r`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove attributes of namespace resource + * @param resource id of Resource + * @param attributes list of attribute ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeResourceAttributes( + resource: number, + attributes: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeResourceAttributes( + resource: number, + attributes: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeResourceAttributes( + resource: number, + attributes: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeResourceAttributes( + resource: number, + attributes: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling removeResourceAttributes.' + ); + } + if (attributes === null || attributes === undefined) { + throw new Error( + 'Required parameter attributes was null or undefined when calling removeResourceAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/r`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove attributes of namespace userExtSource + * @param userExtSource id of UserExtSource + * @param attributes list of attribute ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeUesAttributes( + userExtSource: number, + attributes: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeUesAttributes( + userExtSource: number, + attributes: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeUesAttributes( + userExtSource: number, + attributes: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeUesAttributes( + userExtSource: number, + attributes: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (userExtSource === null || userExtSource === undefined) { + throw new Error( + 'Required parameter userExtSource was null or undefined when calling removeUesAttributes.' + ); + } + if (attributes === null || attributes === undefined) { + throw new Error( + 'Required parameter attributes was null or undefined when calling removeUesAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (userExtSource !== undefined && userExtSource !== null) { + queryParameters = queryParameters.set('userExtSource', userExtSource); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/ues`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove user attribute + * @param user id of User + * @param attribute id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeUserAttribute( + user: number, + attribute: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeUserAttribute( + user: number, + attribute: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeUserAttribute( + user: number, + attribute: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeUserAttribute( + user: number, + attribute: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling removeUserAttribute.' + ); + } + if (attribute === null || attribute === undefined) { + throw new Error( + 'Required parameter attribute was null or undefined when calling removeUserAttribute.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (attribute !== undefined && attribute !== null) { + queryParameters = queryParameters.set('attribute', attribute); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/u`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove attributes of namespace user + * @param user id of User + * @param attributes list of attribute ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeUserAttributes( + user: number, + attributes: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeUserAttributes( + user: number, + attributes: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeUserAttributes( + user: number, + attributes: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeUserAttributes( + user: number, + attributes: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling removeUserAttributes.' + ); + } + if (attributes === null || attributes === undefined) { + throw new Error( + 'Required parameter attributes was null or undefined when calling removeUserAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/u`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove userExtSource attribute + * @param userExtSource id of UserExtSource + * @param attribute id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeUserExtSourceAttribute( + userExtSource: number, + attribute: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeUserExtSourceAttribute( + userExtSource: number, + attribute: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeUserExtSourceAttribute( + userExtSource: number, + attribute: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeUserExtSourceAttribute( + userExtSource: number, + attribute: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (userExtSource === null || userExtSource === undefined) { + throw new Error( + 'Required parameter userExtSource was null or undefined when calling removeUserExtSourceAttribute.' + ); + } + if (attribute === null || attribute === undefined) { + throw new Error( + 'Required parameter attribute was null or undefined when calling removeUserExtSourceAttribute.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (userExtSource !== undefined && userExtSource !== null) { + queryParameters = queryParameters.set('userExtSource', userExtSource); + } + if (attribute !== undefined && attribute !== null) { + queryParameters = queryParameters.set('attribute', attribute); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/ues`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove user facility attribute + * @param user id of User + * @param facility id of Facility + * @param attribute id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeUserFacilityAttribute( + user: number, + facility: number, + attribute: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeUserFacilityAttribute( + user: number, + facility: number, + attribute: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeUserFacilityAttribute( + user: number, + facility: number, + attribute: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeUserFacilityAttribute( + user: number, + facility: number, + attribute: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling removeUserFacilityAttribute.' + ); + } + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling removeUserFacilityAttribute.' + ); + } + if (attribute === null || attribute === undefined) { + throw new Error( + 'Required parameter attribute was null or undefined when calling removeUserFacilityAttribute.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (attribute !== undefined && attribute !== null) { + queryParameters = queryParameters.set('attribute', attribute); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/u-f`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove attributes of namespace user-facility + * @param user id of User + * @param facility id of Facility + * @param attributes list of attribute ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeUserFacilityAttributes( + user: number, + facility: number, + attributes: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeUserFacilityAttributes( + user: number, + facility: number, + attributes: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeUserFacilityAttributes( + user: number, + facility: number, + attributes: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeUserFacilityAttributes( + user: number, + facility: number, + attributes: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling removeUserFacilityAttributes.' + ); + } + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling removeUserFacilityAttributes.' + ); + } + if (attributes === null || attributes === undefined) { + throw new Error( + 'Required parameter attributes was null or undefined when calling removeUserFacilityAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/u-f`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove vo attribute + * @param vo id of Vo + * @param attribute id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeVoAttribute( + vo: number, + attribute: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeVoAttribute( + vo: number, + attribute: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeVoAttribute( + vo: number, + attribute: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeVoAttribute( + vo: number, + attribute: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling removeVoAttribute.' + ); + } + if (attribute === null || attribute === undefined) { + throw new Error( + 'Required parameter attribute was null or undefined when calling removeVoAttribute.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (attribute !== undefined && attribute !== null) { + queryParameters = queryParameters.set('attribute', attribute); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttribute/v`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove attributes of namespace vo + * @param vo id of Vo + * @param attributes list of attribute ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeVoAttributes( + vo: number, + attributes: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeVoAttributes( + vo: number, + attributes: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeVoAttributes( + vo: number, + attributes: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeVoAttributes( + vo: number, + attributes: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling removeVoAttributes.' + ); + } + if (attributes === null || attributes === undefined) { + throw new Error( + 'Required parameter attributes was null or undefined when calling removeVoAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/attributesManager/removeAttributes/v`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Deletes old attribute policy collections and sets attribute policy collections for an attribute definition provided in given policy collections. + * @param inputAttributePolicyCollections + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setAttributePolicyCollections( + inputAttributePolicyCollections: InputAttributePolicyCollections, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setAttributePolicyCollections( + inputAttributePolicyCollections: InputAttributePolicyCollections, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setAttributePolicyCollections( + inputAttributePolicyCollections: InputAttributePolicyCollections, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setAttributePolicyCollections( + inputAttributePolicyCollections: InputAttributePolicyCollections, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputAttributePolicyCollections === null || inputAttributePolicyCollections === undefined) { + throw new Error( + 'Required parameter inputAttributePolicyCollections was null or undefined when calling setAttributePolicyCollections.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/setAttributePolicyCollections`, + inputAttributePolicyCollections, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Sets all AttributeRights in the list given as a parameter. Allowed Roles to set rights for are: VOADMIN, GROUPADMIN, FACILITYADMIN, SELF. + * @param inputAttributeRights + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setAttributeRights( + inputAttributeRights: InputAttributeRights, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setAttributeRights( + inputAttributeRights: InputAttributeRights, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setAttributeRights( + inputAttributeRights: InputAttributeRights, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setAttributeRights( + inputAttributeRights: InputAttributeRights, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputAttributeRights === null || inputAttributeRights === undefined) { + throw new Error( + 'Required parameter inputAttributeRights was null or undefined when calling setAttributeRights.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/setAttributeRights`, + inputAttributeRights, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Sets entityless Attribute. + * @param inputEntitylessAttribute + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setEntitylessAttribute( + inputEntitylessAttribute: InputEntitylessAttribute, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setEntitylessAttribute( + inputEntitylessAttribute: InputEntitylessAttribute, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setEntitylessAttribute( + inputEntitylessAttribute: InputEntitylessAttribute, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setEntitylessAttribute( + inputEntitylessAttribute: InputEntitylessAttribute, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputEntitylessAttribute === null || inputEntitylessAttribute === undefined) { + throw new Error( + 'Required parameter inputEntitylessAttribute was null or undefined when calling setEntitylessAttribute.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/setAttribute/entityless`, + inputEntitylessAttribute, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Sets Attribute for Facility. + * @param inputSetFacilityAttribute + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setFacilityAttribute( + inputSetFacilityAttribute: InputSetFacilityAttribute, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setFacilityAttribute( + inputSetFacilityAttribute: InputSetFacilityAttribute, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setFacilityAttribute( + inputSetFacilityAttribute: InputSetFacilityAttribute, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setFacilityAttribute( + inputSetFacilityAttribute: InputSetFacilityAttribute, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputSetFacilityAttribute === null || inputSetFacilityAttribute === undefined) { + throw new Error( + 'Required parameter inputSetFacilityAttribute was null or undefined when calling setFacilityAttribute.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/setAttribute/facility`, + inputSetFacilityAttribute, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Store the attributes associated with the facility. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). + * @param inputSetFacilityAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setFacilityAttributes( + inputSetFacilityAttributes: InputSetFacilityAttributes, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setFacilityAttributes( + inputSetFacilityAttributes: InputSetFacilityAttributes, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setFacilityAttributes( + inputSetFacilityAttributes: InputSetFacilityAttributes, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setFacilityAttributes( + inputSetFacilityAttributes: InputSetFacilityAttributes, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputSetFacilityAttributes === null || inputSetFacilityAttributes === undefined) { + throw new Error( + 'Required parameter inputSetFacilityAttributes was null or undefined when calling setFacilityAttributes.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/setAttributes/f`, + inputSetFacilityAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Store the member, user, member-group, member-resource and user-facility attributes. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). Group and group-resource attributes are not supported in this context. + * @param inputSetFacilityResourceGroupUserMemberAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setFacilityResourceGroupUserMemberAttributes( + inputSetFacilityResourceGroupUserMemberAttributes: InputSetFacilityResourceGroupUserMemberAttributes, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setFacilityResourceGroupUserMemberAttributes( + inputSetFacilityResourceGroupUserMemberAttributes: InputSetFacilityResourceGroupUserMemberAttributes, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setFacilityResourceGroupUserMemberAttributes( + inputSetFacilityResourceGroupUserMemberAttributes: InputSetFacilityResourceGroupUserMemberAttributes, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setFacilityResourceGroupUserMemberAttributes( + inputSetFacilityResourceGroupUserMemberAttributes: InputSetFacilityResourceGroupUserMemberAttributes, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if ( + inputSetFacilityResourceGroupUserMemberAttributes === null || + inputSetFacilityResourceGroupUserMemberAttributes === undefined + ) { + throw new Error( + 'Required parameter inputSetFacilityResourceGroupUserMemberAttributes was null or undefined when calling setFacilityResourceGroupUserMemberAttributes.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/setAttributes/f-r-g-u-m`, + inputSetFacilityResourceGroupUserMemberAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Store the member, user, member-resource and user-facility attributes. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). + * @param inputSetFacilityResourceUserMemberAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setFacilityResourceUserMemberAttributes( + inputSetFacilityResourceUserMemberAttributes: InputSetFacilityResourceUserMemberAttributes, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setFacilityResourceUserMemberAttributes( + inputSetFacilityResourceUserMemberAttributes: InputSetFacilityResourceUserMemberAttributes, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setFacilityResourceUserMemberAttributes( + inputSetFacilityResourceUserMemberAttributes: InputSetFacilityResourceUserMemberAttributes, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setFacilityResourceUserMemberAttributes( + inputSetFacilityResourceUserMemberAttributes: InputSetFacilityResourceUserMemberAttributes, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if ( + inputSetFacilityResourceUserMemberAttributes === null || + inputSetFacilityResourceUserMemberAttributes === undefined + ) { + throw new Error( + 'Required parameter inputSetFacilityResourceUserMemberAttributes was null or undefined when calling setFacilityResourceUserMemberAttributes.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/setAttributes/f-r-u-m`, + inputSetFacilityResourceUserMemberAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Store the attributes associated with the facility and user combination. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). + * @param inputSetFacilityUserAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setFacilityUserAttributes( + inputSetFacilityUserAttributes: InputSetFacilityUserAttributes, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setFacilityUserAttributes( + inputSetFacilityUserAttributes: InputSetFacilityUserAttributes, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setFacilityUserAttributes( + inputSetFacilityUserAttributes: InputSetFacilityUserAttributes, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setFacilityUserAttributes( + inputSetFacilityUserAttributes: InputSetFacilityUserAttributes, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputSetFacilityUserAttributes === null || inputSetFacilityUserAttributes === undefined) { + throw new Error( + 'Required parameter inputSetFacilityUserAttributes was null or undefined when calling setFacilityUserAttributes.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/setAttributes/f-u`, + inputSetFacilityUserAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Sets Attribute for Group. + * @param inputSetGroupAttribute + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setGroupAttribute( + inputSetGroupAttribute: InputSetGroupAttribute, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setGroupAttribute( + inputSetGroupAttribute: InputSetGroupAttribute, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setGroupAttribute( + inputSetGroupAttribute: InputSetGroupAttribute, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setGroupAttribute( + inputSetGroupAttribute: InputSetGroupAttribute, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputSetGroupAttribute === null || inputSetGroupAttribute === undefined) { + throw new Error( + 'Required parameter inputSetGroupAttribute was null or undefined when calling setGroupAttribute.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/setAttribute/group`, + inputSetGroupAttribute, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Store the attributes associated with the group. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). + * @param inputSetGroupAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setGroupAttributes( + inputSetGroupAttributes: InputSetGroupAttributes, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setGroupAttributes( + inputSetGroupAttributes: InputSetGroupAttributes, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setGroupAttributes( + inputSetGroupAttributes: InputSetGroupAttributes, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setGroupAttributes( + inputSetGroupAttributes: InputSetGroupAttributes, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputSetGroupAttributes === null || inputSetGroupAttributes === undefined) { + throw new Error( + 'Required parameter inputSetGroupAttributes was null or undefined when calling setGroupAttributes.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/setAttributes/g`, + inputSetGroupAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Sets Attribute for Group and Resource. + * @param inputSetGroupResourceAttribute + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setGroupResourceAttribute( + inputSetGroupResourceAttribute: InputSetGroupResourceAttribute, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setGroupResourceAttribute( + inputSetGroupResourceAttribute: InputSetGroupResourceAttribute, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setGroupResourceAttribute( + inputSetGroupResourceAttribute: InputSetGroupResourceAttribute, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setGroupResourceAttribute( + inputSetGroupResourceAttribute: InputSetGroupResourceAttribute, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputSetGroupResourceAttribute === null || inputSetGroupResourceAttribute === undefined) { + throw new Error( + 'Required parameter inputSetGroupResourceAttribute was null or undefined when calling setGroupResourceAttribute.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/setAttribute/group-resource`, + inputSetGroupResourceAttribute, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Sets Attributes for Group and Resource. + * @param inputSetGroupResourceAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setGroupResourceAttributes( + inputSetGroupResourceAttributes: InputSetGroupResourceAttributes, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setGroupResourceAttributes( + inputSetGroupResourceAttributes: InputSetGroupResourceAttributes, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setGroupResourceAttributes( + inputSetGroupResourceAttributes: InputSetGroupResourceAttributes, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setGroupResourceAttributes( + inputSetGroupResourceAttributes: InputSetGroupResourceAttributes, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputSetGroupResourceAttributes === null || inputSetGroupResourceAttributes === undefined) { + throw new Error( + 'Required parameter inputSetGroupResourceAttributes was null or undefined when calling setGroupResourceAttributes.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/setAttributes/group-resource`, + inputSetGroupResourceAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Sets Attribute for Host. + * @param inputSetHostAttribute + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setHostAttribute( + inputSetHostAttribute: InputSetHostAttribute, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setHostAttribute( + inputSetHostAttribute: InputSetHostAttribute, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setHostAttribute( + inputSetHostAttribute: InputSetHostAttribute, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setHostAttribute( + inputSetHostAttribute: InputSetHostAttribute, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputSetHostAttribute === null || inputSetHostAttribute === undefined) { + throw new Error( + 'Required parameter inputSetHostAttribute was null or undefined when calling setHostAttribute.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/setAttribute/host`, + inputSetHostAttribute, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Store the attributes associated with the host. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). + * @param inputSetHostAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setHostAttributes( + inputSetHostAttributes: InputSetHostAttributes, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setHostAttributes( + inputSetHostAttributes: InputSetHostAttributes, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setHostAttributes( + inputSetHostAttributes: InputSetHostAttributes, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setHostAttributes( + inputSetHostAttributes: InputSetHostAttributes, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputSetHostAttributes === null || inputSetHostAttributes === undefined) { + throw new Error( + 'Required parameter inputSetHostAttributes was null or undefined when calling setHostAttributes.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/setAttributes/h`, + inputSetHostAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Sets Attribute for Member. + * @param inputSetMemberAttribute + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setMemberAttribute( + inputSetMemberAttribute: InputSetMemberAttribute, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setMemberAttribute( + inputSetMemberAttribute: InputSetMemberAttribute, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setMemberAttribute( + inputSetMemberAttribute: InputSetMemberAttribute, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setMemberAttribute( + inputSetMemberAttribute: InputSetMemberAttribute, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputSetMemberAttribute === null || inputSetMemberAttribute === undefined) { + throw new Error( + 'Required parameter inputSetMemberAttribute was null or undefined when calling setMemberAttribute.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/setAttribute/member`, + inputSetMemberAttribute, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Store the attributes associated with the member. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). + * @param inputSetMemberAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setMemberAttributes( + inputSetMemberAttributes: InputSetMemberAttributes, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setMemberAttributes( + inputSetMemberAttributes: InputSetMemberAttributes, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setMemberAttributes( + inputSetMemberAttributes: InputSetMemberAttributes, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setMemberAttributes( + inputSetMemberAttributes: InputSetMemberAttributes, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputSetMemberAttributes === null || inputSetMemberAttributes === undefined) { + throw new Error( + 'Required parameter inputSetMemberAttributes was null or undefined when calling setMemberAttributes.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/setAttributes/m`, + inputSetMemberAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Sets Attribute for Member and Group. + * @param inputSetMemberGroupAttribute + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setMemberGroupAttribute( + inputSetMemberGroupAttribute: InputSetMemberGroupAttribute, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setMemberGroupAttribute( + inputSetMemberGroupAttribute: InputSetMemberGroupAttribute, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setMemberGroupAttribute( + inputSetMemberGroupAttribute: InputSetMemberGroupAttribute, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setMemberGroupAttribute( + inputSetMemberGroupAttribute: InputSetMemberGroupAttribute, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputSetMemberGroupAttribute === null || inputSetMemberGroupAttribute === undefined) { + throw new Error( + 'Required parameter inputSetMemberGroupAttribute was null or undefined when calling setMemberGroupAttribute.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/setAttribute/member-group`, + inputSetMemberGroupAttribute, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Store the attributes associated with the member and group combination. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). + * @param inputSetMemberGroupAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setMemberGroupAttributes( + inputSetMemberGroupAttributes: InputSetMemberGroupAttributes, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setMemberGroupAttributes( + inputSetMemberGroupAttributes: InputSetMemberGroupAttributes, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setMemberGroupAttributes( + inputSetMemberGroupAttributes: InputSetMemberGroupAttributes, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setMemberGroupAttributes( + inputSetMemberGroupAttributes: InputSetMemberGroupAttributes, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputSetMemberGroupAttributes === null || inputSetMemberGroupAttributes === undefined) { + throw new Error( + 'Required parameter inputSetMemberGroupAttributes was null or undefined when calling setMemberGroupAttributes.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/setAttributes/m-g`, + inputSetMemberGroupAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Store the attributes associated with the member and group combination. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). If workWithUserAttributes is true, the method stores also the attributes associated with user and member. + * @param inputSetMemberGroupWithUserAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setMemberGroupWithUserAttributes( + inputSetMemberGroupWithUserAttributes: InputSetMemberGroupWithUserAttributes, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setMemberGroupWithUserAttributes( + inputSetMemberGroupWithUserAttributes: InputSetMemberGroupWithUserAttributes, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setMemberGroupWithUserAttributes( + inputSetMemberGroupWithUserAttributes: InputSetMemberGroupWithUserAttributes, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setMemberGroupWithUserAttributes( + inputSetMemberGroupWithUserAttributes: InputSetMemberGroupWithUserAttributes, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if ( + inputSetMemberGroupWithUserAttributes === null || + inputSetMemberGroupWithUserAttributes === undefined + ) { + throw new Error( + 'Required parameter inputSetMemberGroupWithUserAttributes was null or undefined when calling setMemberGroupWithUserAttributes.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/setAttributes/m-g-wu`, + inputSetMemberGroupWithUserAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Store the attributes associated with the resource and member combination. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). If workWithUserAttributes is true, the method stores also the attributes associated with user, user-facility and member. + * @param inputSetMemberResourceAndUserAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setMemberResourceAndUserAttributes( + inputSetMemberResourceAndUserAttributes: InputSetMemberResourceAndUserAttributes, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setMemberResourceAndUserAttributes( + inputSetMemberResourceAndUserAttributes: InputSetMemberResourceAndUserAttributes, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setMemberResourceAndUserAttributes( + inputSetMemberResourceAndUserAttributes: InputSetMemberResourceAndUserAttributes, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setMemberResourceAndUserAttributes( + inputSetMemberResourceAndUserAttributes: InputSetMemberResourceAndUserAttributes, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if ( + inputSetMemberResourceAndUserAttributes === null || + inputSetMemberResourceAndUserAttributes === undefined + ) { + throw new Error( + 'Required parameter inputSetMemberResourceAndUserAttributes was null or undefined when calling setMemberResourceAndUserAttributes.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/setAttributes/m-r-wu`, + inputSetMemberResourceAndUserAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Sets Attribute for Member and Resource. + * @param inputSetMemberResourceAttribute + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setMemberResourceAttribute( + inputSetMemberResourceAttribute: InputSetMemberResourceAttribute, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setMemberResourceAttribute( + inputSetMemberResourceAttribute: InputSetMemberResourceAttribute, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setMemberResourceAttribute( + inputSetMemberResourceAttribute: InputSetMemberResourceAttribute, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setMemberResourceAttribute( + inputSetMemberResourceAttribute: InputSetMemberResourceAttribute, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputSetMemberResourceAttribute === null || inputSetMemberResourceAttribute === undefined) { + throw new Error( + 'Required parameter inputSetMemberResourceAttribute was null or undefined when calling setMemberResourceAttribute.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/setAttribute/member-resource`, + inputSetMemberResourceAttribute, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Store the attributes associated with the resource and member combination. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). + * @param inputSetMemberResourceAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setMemberResourceAttributes( + inputSetMemberResourceAttributes: InputSetMemberResourceAttributes, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setMemberResourceAttributes( + inputSetMemberResourceAttributes: InputSetMemberResourceAttributes, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setMemberResourceAttributes( + inputSetMemberResourceAttributes: InputSetMemberResourceAttributes, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setMemberResourceAttributes( + inputSetMemberResourceAttributes: InputSetMemberResourceAttributes, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if ( + inputSetMemberResourceAttributes === null || + inputSetMemberResourceAttributes === undefined + ) { + throw new Error( + 'Required parameter inputSetMemberResourceAttributes was null or undefined when calling setMemberResourceAttributes.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/setAttributes/m-r`, + inputSetMemberResourceAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Store the attributes associated with member and user (which we get from this member) if workWithUserAttributes is true. + * @param inputSetMemberWithUserAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setMemberWithUserAttributes( + inputSetMemberWithUserAttributes: InputSetMemberWithUserAttributes, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setMemberWithUserAttributes( + inputSetMemberWithUserAttributes: InputSetMemberWithUserAttributes, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setMemberWithUserAttributes( + inputSetMemberWithUserAttributes: InputSetMemberWithUserAttributes, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setMemberWithUserAttributes( + inputSetMemberWithUserAttributes: InputSetMemberWithUserAttributes, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if ( + inputSetMemberWithUserAttributes === null || + inputSetMemberWithUserAttributes === undefined + ) { + throw new Error( + 'Required parameter inputSetMemberWithUserAttributes was null or undefined when calling setMemberWithUserAttributes.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/setAttributes/m-wu`, + inputSetMemberWithUserAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Sets Attribute for Resource. + * @param inputSetResourceAttribute + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setResourceAttribute( + inputSetResourceAttribute: InputSetResourceAttribute, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setResourceAttribute( + inputSetResourceAttribute: InputSetResourceAttribute, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setResourceAttribute( + inputSetResourceAttribute: InputSetResourceAttribute, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setResourceAttribute( + inputSetResourceAttribute: InputSetResourceAttribute, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputSetResourceAttribute === null || inputSetResourceAttribute === undefined) { + throw new Error( + 'Required parameter inputSetResourceAttribute was null or undefined when calling setResourceAttribute.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/setAttribute/resource`, + inputSetResourceAttribute, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Store the attributes associated with the resource. + * @param inputSetResourceAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setResourceAttributes( + inputSetResourceAttributes: InputSetResourceAttributes, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setResourceAttributes( + inputSetResourceAttributes: InputSetResourceAttributes, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setResourceAttributes( + inputSetResourceAttributes: InputSetResourceAttributes, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setResourceAttributes( + inputSetResourceAttributes: InputSetResourceAttributes, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputSetResourceAttributes === null || inputSetResourceAttributes === undefined) { + throw new Error( + 'Required parameter inputSetResourceAttributes was null or undefined when calling setResourceAttributes.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/setAttributes/r`, + inputSetResourceAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Store the attributes associated with the group on resource. + * @param inputSetResourceGroupAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setResourceGroupAttributes( + inputSetResourceGroupAttributes: InputSetResourceGroupAttributes, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setResourceGroupAttributes( + inputSetResourceGroupAttributes: InputSetResourceGroupAttributes, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setResourceGroupAttributes( + inputSetResourceGroupAttributes: InputSetResourceGroupAttributes, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setResourceGroupAttributes( + inputSetResourceGroupAttributes: InputSetResourceGroupAttributes, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputSetResourceGroupAttributes === null || inputSetResourceGroupAttributes === undefined) { + throw new Error( + 'Required parameter inputSetResourceGroupAttributes was null or undefined when calling setResourceGroupAttributes.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/setAttributes/r-g`, + inputSetResourceGroupAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Store the attributes associated with group and resource, if workWithUserAttributes is true then also from group itself. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). + * @param inputSetResourceGroupWithGroupAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setResourceGroupWithGroupAttributes( + inputSetResourceGroupWithGroupAttributes: InputSetResourceGroupWithGroupAttributes, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setResourceGroupWithGroupAttributes( + inputSetResourceGroupWithGroupAttributes: InputSetResourceGroupWithGroupAttributes, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setResourceGroupWithGroupAttributes( + inputSetResourceGroupWithGroupAttributes: InputSetResourceGroupWithGroupAttributes, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setResourceGroupWithGroupAttributes( + inputSetResourceGroupWithGroupAttributes: InputSetResourceGroupWithGroupAttributes, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if ( + inputSetResourceGroupWithGroupAttributes === null || + inputSetResourceGroupWithGroupAttributes === undefined + ) { + throw new Error( + 'Required parameter inputSetResourceGroupWithGroupAttributes was null or undefined when calling setResourceGroupWithGroupAttributes.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/setAttributes/r-g-wg`, + inputSetResourceGroupWithGroupAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Sets Attribute for User. + * @param inputSetUserAttribute + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setUserAttribute( + inputSetUserAttribute: InputSetUserAttribute, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setUserAttribute( + inputSetUserAttribute: InputSetUserAttribute, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setUserAttribute( + inputSetUserAttribute: InputSetUserAttribute, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setUserAttribute( + inputSetUserAttribute: InputSetUserAttribute, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputSetUserAttribute === null || inputSetUserAttribute === undefined) { + throw new Error( + 'Required parameter inputSetUserAttribute was null or undefined when calling setUserAttribute.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/setAttribute/user`, + inputSetUserAttribute, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Store the attributes associated with the user. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). + * @param inputSetUserAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setUserAttributes( + inputSetUserAttributes: InputSetUserAttributes, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setUserAttributes( + inputSetUserAttributes: InputSetUserAttributes, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setUserAttributes( + inputSetUserAttributes: InputSetUserAttributes, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setUserAttributes( + inputSetUserAttributes: InputSetUserAttributes, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputSetUserAttributes === null || inputSetUserAttributes === undefined) { + throw new Error( + 'Required parameter inputSetUserAttributes was null or undefined when calling setUserAttributes.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/setAttributes/u`, + inputSetUserAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Sets Attribute for UserExtSource. + * @param inputSetUserExtSourceAttribute + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setUserExtSourceAttribute( + inputSetUserExtSourceAttribute: InputSetUserExtSourceAttribute, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setUserExtSourceAttribute( + inputSetUserExtSourceAttribute: InputSetUserExtSourceAttribute, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setUserExtSourceAttribute( + inputSetUserExtSourceAttribute: InputSetUserExtSourceAttribute, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setUserExtSourceAttribute( + inputSetUserExtSourceAttribute: InputSetUserExtSourceAttribute, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputSetUserExtSourceAttribute === null || inputSetUserExtSourceAttribute === undefined) { + throw new Error( + 'Required parameter inputSetUserExtSourceAttribute was null or undefined when calling setUserExtSourceAttribute.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/setAttribute/userExtSource`, + inputSetUserExtSourceAttribute, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Store the attributes associated with the UserExtSource. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). + * @param inputSetUserExtSourceAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setUserExtSourceAttributes( + inputSetUserExtSourceAttributes: InputSetUserExtSourceAttributes, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setUserExtSourceAttributes( + inputSetUserExtSourceAttributes: InputSetUserExtSourceAttributes, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setUserExtSourceAttributes( + inputSetUserExtSourceAttributes: InputSetUserExtSourceAttributes, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setUserExtSourceAttributes( + inputSetUserExtSourceAttributes: InputSetUserExtSourceAttributes, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputSetUserExtSourceAttributes === null || inputSetUserExtSourceAttributes === undefined) { + throw new Error( + 'Required parameter inputSetUserExtSourceAttributes was null or undefined when calling setUserExtSourceAttributes.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/setAttributes/ues`, + inputSetUserExtSourceAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Sets Attribute for User and Facility. + * @param inputSetUserFacilityAttribute + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setUserFacilityAttribute( + inputSetUserFacilityAttribute: InputSetUserFacilityAttribute, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setUserFacilityAttribute( + inputSetUserFacilityAttribute: InputSetUserFacilityAttribute, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setUserFacilityAttribute( + inputSetUserFacilityAttribute: InputSetUserFacilityAttribute, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setUserFacilityAttribute( + inputSetUserFacilityAttribute: InputSetUserFacilityAttribute, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputSetUserFacilityAttribute === null || inputSetUserFacilityAttribute === undefined) { + throw new Error( + 'Required parameter inputSetUserFacilityAttribute was null or undefined when calling setUserFacilityAttribute.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/setAttribute/facility-user`, + inputSetUserFacilityAttribute, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Sets Attributes for User and Facility. + * @param inputSetUserFacilityAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setUserFacilityAttributes( + inputSetUserFacilityAttributes: InputSetUserFacilityAttributes, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setUserFacilityAttributes( + inputSetUserFacilityAttributes: InputSetUserFacilityAttributes, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setUserFacilityAttributes( + inputSetUserFacilityAttributes: InputSetUserFacilityAttributes, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setUserFacilityAttributes( + inputSetUserFacilityAttributes: InputSetUserFacilityAttributes, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputSetUserFacilityAttributes === null || inputSetUserFacilityAttributes === undefined) { + throw new Error( + 'Required parameter inputSetUserFacilityAttributes was null or undefined when calling setUserFacilityAttributes.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/setAttributes/facility-user`, + inputSetUserFacilityAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Sets Attribute for Vo. + * @param inputSetVoAttribute + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setVoAttribute( + inputSetVoAttribute: InputSetVoAttribute, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setVoAttribute( + inputSetVoAttribute: InputSetVoAttribute, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setVoAttribute( + inputSetVoAttribute: InputSetVoAttribute, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setVoAttribute( + inputSetVoAttribute: InputSetVoAttribute, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputSetVoAttribute === null || inputSetVoAttribute === undefined) { + throw new Error( + 'Required parameter inputSetVoAttribute was null or undefined when calling setVoAttribute.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/setAttribute/vo`, + inputSetVoAttribute, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Store the attributes associated with the vo. If an attribute is core attribute then the attribute isn\'t stored (It\'s skipped without any notification). + * @param inputSetVoAttributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setVoAttributes( + inputSetVoAttributes: InputSetVoAttributes, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setVoAttributes( + inputSetVoAttributes: InputSetVoAttributes, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setVoAttributes( + inputSetVoAttributes: InputSetVoAttributes, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setVoAttributes( + inputSetVoAttributes: InputSetVoAttributes, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputSetVoAttributes === null || inputSetVoAttributes === undefined) { + throw new Error( + 'Required parameter inputSetVoAttributes was null or undefined when calling setVoAttributes.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/setAttributes/vo`, + inputSetVoAttributes, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Updates AttributeDefinition in Perun based on provided object. Update is done on AttributeDefinition selected by its <code>id</code>. + * @param inputAttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateAttributeDefinition( + inputAttributeDefinition: InputAttributeDefinition, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public updateAttributeDefinition( + inputAttributeDefinition: InputAttributeDefinition, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public updateAttributeDefinition( + inputAttributeDefinition: InputAttributeDefinition, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public updateAttributeDefinition( + inputAttributeDefinition: InputAttributeDefinition, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputAttributeDefinition === null || inputAttributeDefinition === undefined) { + throw new Error( + 'Required parameter inputAttributeDefinition was null or undefined when calling updateAttributeDefinition.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/attributesManager/updateAttributeDefinition`, + inputAttributeDefinition, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } } diff --git a/libs/perun/openapi/src/lib/api/auditMessagesManager.service.ts b/libs/perun/openapi/src/lib/api/auditMessagesManager.service.ts index 499528103..04e0271b8 100644 --- a/libs/perun/openapi/src/lib/api/auditMessagesManager.service.ts +++ b/libs/perun/openapi/src/lib/api/auditMessagesManager.service.ts @@ -11,606 +11,792 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { AuditMessage } from '../model/auditMessage'; import { InputGetMessagesPage } from '../model/inputGetMessagesPage'; import { PaginatedAuditMessages } from '../model/paginatedAuditMessages'; import { PerunException } from '../model/perunException'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - - +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class AuditMessagesManagerService { + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string, + @Optional() configuration: Configuration + ) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + /** + * Log arbitrary auditer message/event to the audit log. + * @param msg Message to be logged + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public auditMessagesManagerLog( + msg: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public auditMessagesManagerLog( + msg: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public auditMessagesManagerLog( + msg: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public auditMessagesManagerLog( + msg: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (msg === null || msg === undefined) { + throw new Error( + 'Required parameter msg was null or undefined when calling auditMessagesManagerLog.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (msg !== undefined && msg !== null) { + queryParameters = queryParameters.set('msg', msg); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/auditMessagesManager/log`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Creates new auditer consumer with last processed id which equals current auditer log max id. + * @param consumerName + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createAuditerConsumer( + consumerName: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public createAuditerConsumer( + consumerName: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public createAuditerConsumer( + consumerName: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public createAuditerConsumer( + consumerName: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (consumerName === null || consumerName === undefined) { + throw new Error( + 'Required parameter consumerName was null or undefined when calling createAuditerConsumer.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (consumerName !== undefined && consumerName !== null) { + queryParameters = queryParameters.set('consumerName', consumerName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/auditMessagesManager/createAuditerConsumer`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all auditer consumers as a map with key=value pairs like String(name)=Integer(lastProcessedId). + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllAuditerConsumers( + observe?: 'body', + reportProgress?: boolean + ): Observable<{ [key: string]: number }>; + public getAllAuditerConsumers( + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getAllAuditerConsumers( + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getAllAuditerConsumers( + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get<{ [key: string]: number }>( + `${this.configuration.basePath}/json/auditMessagesManager/getAllAuditerConsumers`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get count of all messages stored in auditer logs. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAuditerMessagesCount(observe?: 'body', reportProgress?: boolean): Observable; + public getAuditerMessagesCount( + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getAuditerMessagesCount( + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getAuditerMessagesCount( + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/auditMessagesManager/getAuditerMessagesCount`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get ID of last (newest) message in auditer logs. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getLastMessageId(observe?: 'body', reportProgress?: boolean): Observable; + public getLastMessageId( + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getLastMessageId( + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getLastMessageId(observe: any = 'body', reportProgress: boolean = false): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/auditMessagesManager/getLastMessageId`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns 100 newest audit messages from audit log. If there is a less messages than 100, then all of them are returned OR Returns exact number of newest audit messages defined by \'count\' param (disregarding message IDs). If there is less messages present, then all of them are returned.. + * @param count Messages limit + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMessages( + count?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getMessages( + count?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getMessages( + count?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getMessages( + count?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (count !== undefined && count !== null) { + queryParameters = queryParameters.set('count', count); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - - - /** - * Log arbitrary auditer message/event to the audit log. - * @param msg Message to be logged - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public auditMessagesManagerLog(msg: string, observe?: 'body', reportProgress?: boolean): Observable; - public auditMessagesManagerLog(msg: string, observe?: 'response', reportProgress?: boolean): Observable>; - public auditMessagesManagerLog(msg: string, observe?: 'events', reportProgress?: boolean): Observable>; - public auditMessagesManagerLog(msg: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (msg === null || msg === undefined) { - throw new Error('Required parameter msg was null or undefined when calling auditMessagesManagerLog.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (msg !== undefined && msg !== null) { - queryParameters = queryParameters.set('msg', msg); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/auditMessagesManager/log`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Creates new auditer consumer with last processed id which equals current auditer log max id. - * @param consumerName - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createAuditerConsumer(consumerName: string, observe?: 'body', reportProgress?: boolean): Observable; - public createAuditerConsumer(consumerName: string, observe?: 'response', reportProgress?: boolean): Observable>; - public createAuditerConsumer(consumerName: string, observe?: 'events', reportProgress?: boolean): Observable>; - public createAuditerConsumer(consumerName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (consumerName === null || consumerName === undefined) { - throw new Error('Required parameter consumerName was null or undefined when calling createAuditerConsumer.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (consumerName !== undefined && consumerName !== null) { - queryParameters = queryParameters.set('consumerName', consumerName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/auditMessagesManager/createAuditerConsumer`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all auditer consumers as a map with key=value pairs like String(name)=Integer(lastProcessedId). - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllAuditerConsumers(observe?: 'body', reportProgress?: boolean): Observable<{ [key: string]: number; }>; - public getAllAuditerConsumers(observe?: 'response', reportProgress?: boolean): Observable>; - public getAllAuditerConsumers(observe?: 'events', reportProgress?: boolean): Observable>; - public getAllAuditerConsumers(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}/json/auditMessagesManager/getAllAuditerConsumers`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get count of all messages stored in auditer logs. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAuditerMessagesCount(observe?: 'body', reportProgress?: boolean): Observable; - public getAuditerMessagesCount(observe?: 'response', reportProgress?: boolean): Observable>; - public getAuditerMessagesCount(observe?: 'events', reportProgress?: boolean): Observable>; - public getAuditerMessagesCount(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/auditMessagesManager/getAuditerMessagesCount`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get ID of last (newest) message in auditer logs. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getLastMessageId(observe?: 'body', reportProgress?: boolean): Observable; - public getLastMessageId(observe?: 'response', reportProgress?: boolean): Observable>; - public getLastMessageId(observe?: 'events', reportProgress?: boolean): Observable>; - public getLastMessageId(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/auditMessagesManager/getLastMessageId`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns 100 newest audit messages from audit log. If there is a less messages than 100, then all of them are returned OR Returns exact number of newest audit messages defined by \'count\' param (disregarding message IDs). If there is less messages present, then all of them are returned.. - * @param count Messages limit - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMessages(count?: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getMessages(count?: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getMessages(count?: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getMessages(count?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (count !== undefined && count !== null) { - queryParameters = queryParameters.set('count', count); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/auditMessagesManager/getMessages`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns all messages with IDs within the range from max(ID) to (max(ID)-count), where number of returned messages is equal or less than \'count\' param, because some IDs could be skipped in the sequence. - * @param count Number of IDs to subtract from max_id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMessagesByCount(count: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getMessagesByCount(count: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getMessagesByCount(count: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getMessagesByCount(count: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (count === null || count === undefined) { - throw new Error('Required parameter count was null or undefined when calling getMessagesByCount.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (count !== undefined && count !== null) { - queryParameters = queryParameters.set('count', count); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/auditMessagesManager/getMessagesByCount`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get page of audit messages. Total count is only estimated. - * @param inputGetMessagesPage - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMessagesPage(inputGetMessagesPage: InputGetMessagesPage, observe?: 'body', reportProgress?: boolean): Observable; - public getMessagesPage(inputGetMessagesPage: InputGetMessagesPage, observe?: 'response', reportProgress?: boolean): Observable>; - public getMessagesPage(inputGetMessagesPage: InputGetMessagesPage, observe?: 'events', reportProgress?: boolean): Observable>; - public getMessagesPage(inputGetMessagesPage: InputGetMessagesPage, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputGetMessagesPage === null || inputGetMessagesPage === undefined) { - throw new Error('Required parameter inputGetMessagesPage was null or undefined when calling getMessagesPage.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/auditMessagesManager/getMessagesPage`, - inputGetMessagesPage, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns list of AuditMessages from audit log with IDs > lastProcessedId for registered auditer consumer specified by consumerName param. - * @param consumerName - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public pollConsumerMessages(consumerName: string, observe?: 'body', reportProgress?: boolean): Observable>; - public pollConsumerMessages(consumerName: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public pollConsumerMessages(consumerName: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public pollConsumerMessages(consumerName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (consumerName === null || consumerName === undefined) { - throw new Error('Required parameter consumerName was null or undefined when calling pollConsumerMessages.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (consumerName !== undefined && consumerName !== null) { - queryParameters = queryParameters.set('consumerName', consumerName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/auditMessagesManager/pollConsumerMessages`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Set ID of last processed message for specified consumer. - * @param consumerName - * @param lastProcessedId id of message to what consumer will be set - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setLastProcessedId(consumerName: string, lastProcessedId: number, observe?: 'body', reportProgress?: boolean): Observable; - public setLastProcessedId(consumerName: string, lastProcessedId: number, observe?: 'response', reportProgress?: boolean): Observable>; - public setLastProcessedId(consumerName: string, lastProcessedId: number, observe?: 'events', reportProgress?: boolean): Observable>; - public setLastProcessedId(consumerName: string, lastProcessedId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (consumerName === null || consumerName === undefined) { - throw new Error('Required parameter consumerName was null or undefined when calling setLastProcessedId.'); - } - if (lastProcessedId === null || lastProcessedId === undefined) { - throw new Error('Required parameter lastProcessedId was null or undefined when calling setLastProcessedId.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (consumerName !== undefined && consumerName !== null) { - queryParameters = queryParameters.set('consumerName', consumerName); - } - if (lastProcessedId !== undefined && lastProcessedId !== null) { - queryParameters = queryParameters.set('lastProcessedId', lastProcessedId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/auditMessagesManager/setLastProcessedId`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/auditMessagesManager/getMessages`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns all messages with IDs within the range from max(ID) to (max(ID)-count), where number of returned messages is equal or less than \'count\' param, because some IDs could be skipped in the sequence. + * @param count Number of IDs to subtract from max_id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMessagesByCount( + count: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getMessagesByCount( + count: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getMessagesByCount( + count: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getMessagesByCount( + count: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (count === null || count === undefined) { + throw new Error( + 'Required parameter count was null or undefined when calling getMessagesByCount.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (count !== undefined && count !== null) { + queryParameters = queryParameters.set('count', count); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/auditMessagesManager/getMessagesByCount`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get page of audit messages. Total count is only estimated. + * @param inputGetMessagesPage + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMessagesPage( + inputGetMessagesPage: InputGetMessagesPage, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getMessagesPage( + inputGetMessagesPage: InputGetMessagesPage, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getMessagesPage( + inputGetMessagesPage: InputGetMessagesPage, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getMessagesPage( + inputGetMessagesPage: InputGetMessagesPage, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputGetMessagesPage === null || inputGetMessagesPage === undefined) { + throw new Error( + 'Required parameter inputGetMessagesPage was null or undefined when calling getMessagesPage.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/auditMessagesManager/getMessagesPage`, + inputGetMessagesPage, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns list of AuditMessages from audit log with IDs > lastProcessedId for registered auditer consumer specified by consumerName param. + * @param consumerName + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public pollConsumerMessages( + consumerName: string, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public pollConsumerMessages( + consumerName: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public pollConsumerMessages( + consumerName: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public pollConsumerMessages( + consumerName: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (consumerName === null || consumerName === undefined) { + throw new Error( + 'Required parameter consumerName was null or undefined when calling pollConsumerMessages.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (consumerName !== undefined && consumerName !== null) { + queryParameters = queryParameters.set('consumerName', consumerName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/auditMessagesManager/pollConsumerMessages`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Set ID of last processed message for specified consumer. + * @param consumerName + * @param lastProcessedId id of message to what consumer will be set + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setLastProcessedId( + consumerName: string, + lastProcessedId: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setLastProcessedId( + consumerName: string, + lastProcessedId: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setLastProcessedId( + consumerName: string, + lastProcessedId: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setLastProcessedId( + consumerName: string, + lastProcessedId: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (consumerName === null || consumerName === undefined) { + throw new Error( + 'Required parameter consumerName was null or undefined when calling setLastProcessedId.' + ); + } + if (lastProcessedId === null || lastProcessedId === undefined) { + throw new Error( + 'Required parameter lastProcessedId was null or undefined when calling setLastProcessedId.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (consumerName !== undefined && consumerName !== null) { + queryParameters = queryParameters.set('consumerName', consumerName); + } + if (lastProcessedId !== undefined && lastProcessedId !== null) { + queryParameters = queryParameters.set('lastProcessedId', lastProcessedId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); } + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/auditMessagesManager/setLastProcessedId`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } } diff --git a/libs/perun/openapi/src/lib/api/authzResolver.service.ts b/libs/perun/openapi/src/lib/api/authzResolver.service.ts index 808c56478..359a4b5a4 100644 --- a/libs/perun/openapi/src/lib/api/authzResolver.service.ts +++ b/libs/perun/openapi/src/lib/api/authzResolver.service.ts @@ -11,11 +11,17 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { Facility } from '../model/facility'; import { Group } from '../model/group'; @@ -34,1610 +40,2141 @@ import { UnsetRoleWithUserComplementaryObject } from '../model/unsetRoleWithUser import { User } from '../model/user'; import { Vo } from '../model/vo'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - - +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class AuthzResolverService { + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string, + @Optional() configuration: Configuration + ) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + /** + * Return all loaded perun policies. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllPolicies(observe?: 'body', reportProgress?: boolean): Observable>; + public getAllPolicies( + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllPolicies( + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAllPolicies(observe: any = 'body', reportProgress: boolean = false): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/authzResolver/getAllPolicies`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Return all loaded roles management rules. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllRolesManagementRules( + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAllRolesManagementRules( + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllRolesManagementRules( + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAllRolesManagementRules( + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/authzResolver/getAllRolesManagementRules`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all groups of managers (authorizedGroups) for complementaryObject and role + * @param role + * @param complementaryObjectId Property id of complementaryObject to get managers for + * @param complementaryObjectName Property beanName of complementaryObject, meaning object type (Vo | Group | Facility | ... ) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAuthzAdminGroups( + role: string, + complementaryObjectId: number, + complementaryObjectName: string, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAuthzAdminGroups( + role: string, + complementaryObjectId: number, + complementaryObjectName: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAuthzAdminGroups( + role: string, + complementaryObjectId: number, + complementaryObjectName: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAuthzAdminGroups( + role: string, + complementaryObjectId: number, + complementaryObjectName: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (role === null || role === undefined) { + throw new Error( + 'Required parameter role was null or undefined when calling getAuthzAdminGroups.' + ); + } + if (complementaryObjectId === null || complementaryObjectId === undefined) { + throw new Error( + 'Required parameter complementaryObjectId was null or undefined when calling getAuthzAdminGroups.' + ); + } + if (complementaryObjectName === null || complementaryObjectName === undefined) { + throw new Error( + 'Required parameter complementaryObjectName was null or undefined when calling getAuthzAdminGroups.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (role !== undefined && role !== null) { + queryParameters = queryParameters.set('role', role); + } + if (complementaryObjectId !== undefined && complementaryObjectId !== null) { + queryParameters = queryParameters.set('complementaryObjectId', complementaryObjectId); + } + if (complementaryObjectName !== undefined && complementaryObjectName !== null) { + queryParameters = queryParameters.set( + 'complementaryObjectName', + complementaryObjectName + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/authzResolver/getAdminGroups`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets all valid rich admins + * Get all valid richUser administrators (for group-based rights, status must be VALID for both Vo and group) for complementary object and role with specified attributes. + * @param role + * @param complementaryObjectId Property id of complementaryObject to get managers for + * @param complementaryObjectName Property beanName of complementaryObject, meaning object type (Vo | Group | Facility | ... ) + * @param specificAttributes list of specified attributes which are needed in object richUser + * @param allUserAttributes When true, do not specify attributes through list and return them all in objects richUser. Ignoring list of specific attributes + * @param onlyDirectAdmins When true, return only direct users of the complementary object for role with specific attributes + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAuthzRichAdmins( + role: string, + complementaryObjectId: number, + complementaryObjectName: string, + specificAttributes: Array, + allUserAttributes?: boolean, + onlyDirectAdmins?: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAuthzRichAdmins( + role: string, + complementaryObjectId: number, + complementaryObjectName: string, + specificAttributes: Array, + allUserAttributes?: boolean, + onlyDirectAdmins?: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAuthzRichAdmins( + role: string, + complementaryObjectId: number, + complementaryObjectName: string, + specificAttributes: Array, + allUserAttributes?: boolean, + onlyDirectAdmins?: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAuthzRichAdmins( + role: string, + complementaryObjectId: number, + complementaryObjectName: string, + specificAttributes: Array, + allUserAttributes?: boolean, + onlyDirectAdmins?: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (role === null || role === undefined) { + throw new Error( + 'Required parameter role was null or undefined when calling getAuthzRichAdmins.' + ); + } + if (complementaryObjectId === null || complementaryObjectId === undefined) { + throw new Error( + 'Required parameter complementaryObjectId was null or undefined when calling getAuthzRichAdmins.' + ); + } + if (complementaryObjectName === null || complementaryObjectName === undefined) { + throw new Error( + 'Required parameter complementaryObjectName was null or undefined when calling getAuthzRichAdmins.' + ); + } + if (specificAttributes === null || specificAttributes === undefined) { + throw new Error( + 'Required parameter specificAttributes was null or undefined when calling getAuthzRichAdmins.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (role !== undefined && role !== null) { + queryParameters = queryParameters.set('role', role); + } + if (complementaryObjectId !== undefined && complementaryObjectId !== null) { + queryParameters = queryParameters.set('complementaryObjectId', complementaryObjectId); + } + if (complementaryObjectName !== undefined && complementaryObjectName !== null) { + queryParameters = queryParameters.set( + 'complementaryObjectName', + complementaryObjectName + ); + } + if (specificAttributes) { + specificAttributes.forEach((element) => { + queryParameters = queryParameters.append('specificAttributes', element); + }); + } + if (allUserAttributes !== undefined && allUserAttributes !== null) { + queryParameters = queryParameters.set('allUserAttributes', allUserAttributes); + } + if (onlyDirectAdmins !== undefined && onlyDirectAdmins !== null) { + queryParameters = queryParameters.set('onlyDirectAdmins', onlyDirectAdmins); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/authzResolver/getRichAdmins`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all Facilities where the given user (principal if user not sent) has set one of the given roles or the given user is a member of an authorized group with such roles. + * @param roles list of role names List<String> + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilitiesWhereUserIsInRoles( + roles: Array, + user?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getFacilitiesWhereUserIsInRoles( + roles: Array, + user?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getFacilitiesWhereUserIsInRoles( + roles: Array, + user?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getFacilitiesWhereUserIsInRoles( + roles: Array, + user?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (roles === null || roles === undefined) { + throw new Error( + 'Required parameter roles was null or undefined when calling getFacilitiesWhereUserIsInRoles.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (roles) { + roles.forEach((element) => { + queryParameters = queryParameters.append('roles[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/authzResolver/getFacilitiesWhereUserIsInRoles`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns list of group\'s role names. Perun system uses role names in the upper case format. However, for now, they are converted to the lower case format because of the compatibility with external systems. + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupRoleNames( + group: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getGroupRoleNames( + group: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getGroupRoleNames( + group: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getGroupRoleNames( + group: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getGroupRoleNames.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/authzResolver/getGroupRoleNames`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns all roles as an AuthzRoles object for a given group. + * @param groupId id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupRoles( + groupId: number, + observe?: 'body', + reportProgress?: boolean + ): Observable<{ [key: string]: { [key: string]: Array } }>; + public getGroupRoles( + groupId: number, + observe?: 'response', + reportProgress?: boolean + ): Observable } }>>; + public getGroupRoles( + groupId: number, + observe?: 'events', + reportProgress?: boolean + ): Observable } }>>; + public getGroupRoles( + groupId: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (groupId === null || groupId === undefined) { + throw new Error( + 'Required parameter groupId was null or undefined when calling getGroupRoles.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (groupId !== undefined && groupId !== null) { + queryParameters = queryParameters.set('groupId', groupId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get<{ [key: string]: { [key: string]: Array } }>( + `${this.configuration.basePath}/urlinjsonout/authzResolver/getGroupRoles`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all Groups where the given user (principal if user not sent) has set one of the given roles or the given user is a member of an authorized group with such roles. + * @param roles list of role names List<String> + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupsWhereUserIsInRoles( + roles: Array, + user?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getGroupsWhereUserIsInRoles( + roles: Array, + user?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getGroupsWhereUserIsInRoles( + roles: Array, + user?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getGroupsWhereUserIsInRoles( + roles: Array, + user?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (roles === null || roles === undefined) { + throw new Error( + 'Required parameter roles was null or undefined when calling getGroupsWhereUserIsInRoles.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (roles) { + roles.forEach((element) => { + queryParameters = queryParameters.append('roles[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/authzResolver/getGroupsWhereUserIsInRoles`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns User which is associated with credentials used to log-in to Perun. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getLoggedUser(observe?: 'body', reportProgress?: boolean): Observable; + public getLoggedUser( + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getLoggedUser(observe?: 'events', reportProgress?: boolean): Observable>; + public getLoggedUser(observe: any = 'body', reportProgress: boolean = false): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/authzResolver/getLoggedUser`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all Members where the given user (principal if user not sent) has set one of the given roles or the given user is a member of an authorized group with such roles. + * @param roles list of role names List<String> + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMembersWhereUserIsInRoles( + roles: Array, + user?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getMembersWhereUserIsInRoles( + roles: Array, + user?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getMembersWhereUserIsInRoles( + roles: Array, + user?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getMembersWhereUserIsInRoles( + roles: Array, + user?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (roles === null || roles === undefined) { + throw new Error( + 'Required parameter roles was null or undefined when calling getMembersWhereUserIsInRoles.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (roles) { + roles.forEach((element) => { + queryParameters = queryParameters.append('roles[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/authzResolver/getMembersWhereUserIsInRoles`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets current user + * Returns object representing the currently authenticated user. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getPerunPrincipal(observe?: 'body', reportProgress?: boolean): Observable; + public getPerunPrincipal( + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getPerunPrincipal( + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getPerunPrincipal( + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/authzResolver/getPerunPrincipal`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns list of caller\'s role names. Perun system uses role names in the upper case format. However, for now, they are converted to the lower case format because of the compatibility with external systems. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getPrincipalRoleNames( + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getPrincipalRoleNames( + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getPrincipalRoleNames( + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getPrincipalRoleNames( + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/authzResolver/getPrincipalRoleNames`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all Resources where the given user (principal if user not sent) has set one of the given roles or the given user is a member of an authorized group with such roles. + * @param roles list of role names List<String> + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourcesWhereUserIsInRoles( + roles: Array, + user?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getResourcesWhereUserIsInRoles( + roles: Array, + user?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getResourcesWhereUserIsInRoles( + roles: Array, + user?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getResourcesWhereUserIsInRoles( + roles: Array, + user?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (roles === null || roles === undefined) { + throw new Error( + 'Required parameter roles was null or undefined when calling getResourcesWhereUserIsInRoles.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (roles) { + roles.forEach((element) => { + queryParameters = queryParameters.append('roles[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/authzResolver/getResourcesWhereUserIsInRoles`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all SecurityTeams where the given user (principal if user not sent) has set one of the given roles or the given user is a member of an authorized group with such roles. + * @param roles list of role names List<String> + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getSecurityTeamsWhereUserIsInRoles( + roles: Array, + user?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getSecurityTeamsWhereUserIsInRoles( + roles: Array, + user?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getSecurityTeamsWhereUserIsInRoles( + roles: Array, + user?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getSecurityTeamsWhereUserIsInRoles( + roles: Array, + user?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (roles === null || roles === undefined) { + throw new Error( + 'Required parameter roles was null or undefined when calling getSecurityTeamsWhereUserIsInRoles.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (roles) { + roles.forEach((element) => { + queryParameters = queryParameters.append('roles[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/authzResolver/getSecurityTeamsWhereUserIsInRoles`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns list of user\'s role names. Perun system uses role names in the upper case format. However, for now, they are converted to the lower case format because of the compatibility with external systems. + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserRoleNames( + user: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getUserRoleNames( + user: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getUserRoleNames( + user: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getUserRoleNames( + user: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling getUserRoleNames.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/authzResolver/getUserRoleNames`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns all roles as an AuthzRoles object for a given user. + * @param userId id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserRoles( + userId: number, + observe?: 'body', + reportProgress?: boolean + ): Observable<{ [key: string]: { [key: string]: Array } }>; + public getUserRoles( + userId: number, + observe?: 'response', + reportProgress?: boolean + ): Observable } }>>; + public getUserRoles( + userId: number, + observe?: 'events', + reportProgress?: boolean + ): Observable } }>>; + public getUserRoles( + userId: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling getUserRoles.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (userId !== undefined && userId !== null) { + queryParameters = queryParameters.set('userId', userId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get<{ [key: string]: { [key: string]: Array } }>( + `${this.configuration.basePath}/json/authzResolver/getUserRoles`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all Vos where the given user (principal if user not sent) has set one of the given roles or the given user is a member of an authorized group with such roles. + * @param roles list of role names List<String> + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVosWhereUserIsInRoles( + roles: Array, + user?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getVosWhereUserIsInRoles( + roles: Array, + user?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getVosWhereUserIsInRoles( + roles: Array, + user?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getVosWhereUserIsInRoles( + roles: Array, + user?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (roles === null || roles === undefined) { + throw new Error( + 'Required parameter roles was null or undefined when calling getVosWhereUserIsInRoles.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (roles) { + roles.forEach((element) => { + queryParameters = queryParameters.append('roles[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/authzResolver/getVosWhereUserIsInRoles`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns 1 if User has Facility manager role (FACILITYADMIN) or for specific Facility defined by id + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public isFacilityAdmin( + facility?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public isFacilityAdmin( + facility?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public isFacilityAdmin( + facility?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public isFacilityAdmin( + facility?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/urlinjsonout/authzResolver/isFacilityAdmin`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns 1 if User has Group manager role (GROUPADMIN) or for specific Group defined by id + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public isGroupAdmin( + group?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public isGroupAdmin( + group?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public isGroupAdmin( + group?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public isGroupAdmin( + group?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/urlinjsonout/authzResolver/isGroupAdmin`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns 1 if User has Perun admin role (perunadmin). + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public isPerunAdmin(observe?: 'body', reportProgress?: boolean): Observable; + public isPerunAdmin( + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public isPerunAdmin(observe?: 'events', reportProgress?: boolean): Observable>; + public isPerunAdmin(observe: any = 'body', reportProgress: boolean = false): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/authzResolver/isPerunAdmin`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns 1 if User has VO manager role (VOADMIN) or for specific VO defined by id + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public isVoAdmin(vo?: number, observe?: 'body', reportProgress?: boolean): Observable; + public isVoAdmin( + vo?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public isVoAdmin( + vo?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public isVoAdmin( + vo?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/urlinjsonout/authzResolver/isVoAdmin`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns \"OK\" string. Helper method for GUI check if connection is alive. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public keepAlive(observe?: 'body', reportProgress?: boolean): Observable; + public keepAlive( + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public keepAlive(observe?: 'events', reportProgress?: boolean): Observable>; + public keepAlive(observe: any = 'body', reportProgress: boolean = false): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/authzResolver/keepAlive`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Load perun roles and policies from the configuration file perun-roles.yml. Roles are loaded to the database and policies are loaded to the PerunPoliciesContainer. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public loadAuthorizationComponents(observe?: 'body', reportProgress?: boolean): Observable; + public loadAuthorizationComponents( + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public loadAuthorizationComponents( + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public loadAuthorizationComponents( + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/authzResolver/loadAuthorizationComponents`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Set role for authorizedGroup and complementaryObject + * @param setRoleWithGroupComplementaryObject + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setRoleWithGroupComplementaryObject( + setRoleWithGroupComplementaryObject: SetRoleWithGroupComplementaryObject, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setRoleWithGroupComplementaryObject( + setRoleWithGroupComplementaryObject: SetRoleWithGroupComplementaryObject, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setRoleWithGroupComplementaryObject( + setRoleWithGroupComplementaryObject: SetRoleWithGroupComplementaryObject, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setRoleWithGroupComplementaryObject( + setRoleWithGroupComplementaryObject: SetRoleWithGroupComplementaryObject, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if ( + setRoleWithGroupComplementaryObject === null || + setRoleWithGroupComplementaryObject === undefined + ) { + throw new Error( + 'Required parameter setRoleWithGroupComplementaryObject was null or undefined when calling setRoleWithGroupComplementaryObject.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/authzResolver/setRole/g-co`, + setRoleWithGroupComplementaryObject, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Set role for user and complementaryObject + * @param setRoleWithUserComplementaryObject + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setRoleWithUserComplementaryObject( + setRoleWithUserComplementaryObject: SetRoleWithUserComplementaryObject, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setRoleWithUserComplementaryObject( + setRoleWithUserComplementaryObject: SetRoleWithUserComplementaryObject, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setRoleWithUserComplementaryObject( + setRoleWithUserComplementaryObject: SetRoleWithUserComplementaryObject, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setRoleWithUserComplementaryObject( + setRoleWithUserComplementaryObject: SetRoleWithUserComplementaryObject, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if ( + setRoleWithUserComplementaryObject === null || + setRoleWithUserComplementaryObject === undefined + ) { + throw new Error( + 'Required parameter setRoleWithUserComplementaryObject was null or undefined when calling setRoleWithUserComplementaryObject.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/authzResolver/setRole/u-co`, + setRoleWithUserComplementaryObject, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Unset role for authorizedGroup and complementaryObject + * @param unsetRoleWithGroupComplementaryObject + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public unsetRoleWithGroupComplementaryObject( + unsetRoleWithGroupComplementaryObject: UnsetRoleWithGroupComplementaryObject, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public unsetRoleWithGroupComplementaryObject( + unsetRoleWithGroupComplementaryObject: UnsetRoleWithGroupComplementaryObject, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public unsetRoleWithGroupComplementaryObject( + unsetRoleWithGroupComplementaryObject: UnsetRoleWithGroupComplementaryObject, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public unsetRoleWithGroupComplementaryObject( + unsetRoleWithGroupComplementaryObject: UnsetRoleWithGroupComplementaryObject, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if ( + unsetRoleWithGroupComplementaryObject === null || + unsetRoleWithGroupComplementaryObject === undefined + ) { + throw new Error( + 'Required parameter unsetRoleWithGroupComplementaryObject was null or undefined when calling unsetRoleWithGroupComplementaryObject.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/authzResolver/unsetRole/g-co`, + unsetRoleWithGroupComplementaryObject, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Unset role for user and complementaryObject + * @param unsetRoleWithUserComplementaryObject + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public unsetRoleWithUserComplementaryObject( + unsetRoleWithUserComplementaryObject: UnsetRoleWithUserComplementaryObject, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public unsetRoleWithUserComplementaryObject( + unsetRoleWithUserComplementaryObject: UnsetRoleWithUserComplementaryObject, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public unsetRoleWithUserComplementaryObject( + unsetRoleWithUserComplementaryObject: UnsetRoleWithUserComplementaryObject, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public unsetRoleWithUserComplementaryObject( + unsetRoleWithUserComplementaryObject: UnsetRoleWithUserComplementaryObject, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if ( + unsetRoleWithUserComplementaryObject === null || + unsetRoleWithUserComplementaryObject === undefined + ) { + throw new Error( + 'Required parameter unsetRoleWithUserComplementaryObject was null or undefined when calling unsetRoleWithUserComplementaryObject.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - - - /** - * Return all loaded perun policies. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllPolicies(observe?: 'body', reportProgress?: boolean): Observable>; - public getAllPolicies(observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllPolicies(observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllPolicies(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/authzResolver/getAllPolicies`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Return all loaded roles management rules. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllRolesManagementRules(observe?: 'body', reportProgress?: boolean): Observable>; - public getAllRolesManagementRules(observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllRolesManagementRules(observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllRolesManagementRules(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/authzResolver/getAllRolesManagementRules`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all groups of managers (authorizedGroups) for complementaryObject and role - * @param role - * @param complementaryObjectId Property id of complementaryObject to get managers for - * @param complementaryObjectName Property beanName of complementaryObject, meaning object type (Vo | Group | Facility | ... ) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAuthzAdminGroups(role: string, complementaryObjectId: number, complementaryObjectName: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getAuthzAdminGroups(role: string, complementaryObjectId: number, complementaryObjectName: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAuthzAdminGroups(role: string, complementaryObjectId: number, complementaryObjectName: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAuthzAdminGroups(role: string, complementaryObjectId: number, complementaryObjectName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (role === null || role === undefined) { - throw new Error('Required parameter role was null or undefined when calling getAuthzAdminGroups.'); - } - if (complementaryObjectId === null || complementaryObjectId === undefined) { - throw new Error('Required parameter complementaryObjectId was null or undefined when calling getAuthzAdminGroups.'); - } - if (complementaryObjectName === null || complementaryObjectName === undefined) { - throw new Error('Required parameter complementaryObjectName was null or undefined when calling getAuthzAdminGroups.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (role !== undefined && role !== null) { - queryParameters = queryParameters.set('role', role); - } - if (complementaryObjectId !== undefined && complementaryObjectId !== null) { - queryParameters = queryParameters.set('complementaryObjectId', complementaryObjectId); - } - if (complementaryObjectName !== undefined && complementaryObjectName !== null) { - queryParameters = queryParameters.set('complementaryObjectName', complementaryObjectName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/authzResolver/getAdminGroups`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Gets all valid rich admins - * Get all valid richUser administrators (for group-based rights, status must be VALID for both Vo and group) for complementary object and role with specified attributes. - * @param role - * @param complementaryObjectId Property id of complementaryObject to get managers for - * @param complementaryObjectName Property beanName of complementaryObject, meaning object type (Vo | Group | Facility | ... ) - * @param specificAttributes list of specified attributes which are needed in object richUser - * @param allUserAttributes When true, do not specify attributes through list and return them all in objects richUser. Ignoring list of specific attributes - * @param onlyDirectAdmins When true, return only direct users of the complementary object for role with specific attributes - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAuthzRichAdmins(role: string, complementaryObjectId: number, complementaryObjectName: string, specificAttributes: Array, allUserAttributes?: boolean, onlyDirectAdmins?: boolean, observe?: 'body', reportProgress?: boolean): Observable>; - public getAuthzRichAdmins(role: string, complementaryObjectId: number, complementaryObjectName: string, specificAttributes: Array, allUserAttributes?: boolean, onlyDirectAdmins?: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAuthzRichAdmins(role: string, complementaryObjectId: number, complementaryObjectName: string, specificAttributes: Array, allUserAttributes?: boolean, onlyDirectAdmins?: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAuthzRichAdmins(role: string, complementaryObjectId: number, complementaryObjectName: string, specificAttributes: Array, allUserAttributes?: boolean, onlyDirectAdmins?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (role === null || role === undefined) { - throw new Error('Required parameter role was null or undefined when calling getAuthzRichAdmins.'); - } - if (complementaryObjectId === null || complementaryObjectId === undefined) { - throw new Error('Required parameter complementaryObjectId was null or undefined when calling getAuthzRichAdmins.'); - } - if (complementaryObjectName === null || complementaryObjectName === undefined) { - throw new Error('Required parameter complementaryObjectName was null or undefined when calling getAuthzRichAdmins.'); - } - if (specificAttributes === null || specificAttributes === undefined) { - throw new Error('Required parameter specificAttributes was null or undefined when calling getAuthzRichAdmins.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (role !== undefined && role !== null) { - queryParameters = queryParameters.set('role', role); - } - if (complementaryObjectId !== undefined && complementaryObjectId !== null) { - queryParameters = queryParameters.set('complementaryObjectId', complementaryObjectId); - } - if (complementaryObjectName !== undefined && complementaryObjectName !== null) { - queryParameters = queryParameters.set('complementaryObjectName', complementaryObjectName); - } - if (specificAttributes) { - specificAttributes.forEach((element) => { - queryParameters = queryParameters.append('specificAttributes', element); - }) - } - if (allUserAttributes !== undefined && allUserAttributes !== null) { - queryParameters = queryParameters.set('allUserAttributes', allUserAttributes); - } - if (onlyDirectAdmins !== undefined && onlyDirectAdmins !== null) { - queryParameters = queryParameters.set('onlyDirectAdmins', onlyDirectAdmins); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/authzResolver/getRichAdmins`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all Facilities where the given user (principal if user not sent) has set one of the given roles or the given user is a member of an authorized group with such roles. - * @param roles list of role names List<String> - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilitiesWhereUserIsInRoles(roles: Array, user?: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getFacilitiesWhereUserIsInRoles(roles: Array, user?: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getFacilitiesWhereUserIsInRoles(roles: Array, user?: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getFacilitiesWhereUserIsInRoles(roles: Array, user?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (roles === null || roles === undefined) { - throw new Error('Required parameter roles was null or undefined when calling getFacilitiesWhereUserIsInRoles.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (roles) { - roles.forEach((element) => { - queryParameters = queryParameters.append('roles[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/authzResolver/getFacilitiesWhereUserIsInRoles`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns list of group\'s role names. Perun system uses role names in the upper case format. However, for now, they are converted to the lower case format because of the compatibility with external systems. - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupRoleNames(group: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getGroupRoleNames(group: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getGroupRoleNames(group: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getGroupRoleNames(group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getGroupRoleNames.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/authzResolver/getGroupRoleNames`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns all roles as an AuthzRoles object for a given group. - * @param groupId id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupRoles(groupId: number, observe?: 'body', reportProgress?: boolean): Observable<{ [key: string]: { [key: string]: Array; }; }>; - public getGroupRoles(groupId: number, observe?: 'response', reportProgress?: boolean): Observable; }; }>>; - public getGroupRoles(groupId: number, observe?: 'events', reportProgress?: boolean): Observable; }; }>>; - public getGroupRoles(groupId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (groupId === null || groupId === undefined) { - throw new Error('Required parameter groupId was null or undefined when calling getGroupRoles.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (groupId !== undefined && groupId !== null) { - queryParameters = queryParameters.set('groupId', groupId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get<{ [key: string]: { [key: string]: Array; }; }>(`${this.configuration.basePath}/urlinjsonout/authzResolver/getGroupRoles`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all Groups where the given user (principal if user not sent) has set one of the given roles or the given user is a member of an authorized group with such roles. - * @param roles list of role names List<String> - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupsWhereUserIsInRoles(roles: Array, user?: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getGroupsWhereUserIsInRoles(roles: Array, user?: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getGroupsWhereUserIsInRoles(roles: Array, user?: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getGroupsWhereUserIsInRoles(roles: Array, user?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (roles === null || roles === undefined) { - throw new Error('Required parameter roles was null or undefined when calling getGroupsWhereUserIsInRoles.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (roles) { - roles.forEach((element) => { - queryParameters = queryParameters.append('roles[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/authzResolver/getGroupsWhereUserIsInRoles`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns User which is associated with credentials used to log-in to Perun. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getLoggedUser(observe?: 'body', reportProgress?: boolean): Observable; - public getLoggedUser(observe?: 'response', reportProgress?: boolean): Observable>; - public getLoggedUser(observe?: 'events', reportProgress?: boolean): Observable>; - public getLoggedUser(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/authzResolver/getLoggedUser`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all Members where the given user (principal if user not sent) has set one of the given roles or the given user is a member of an authorized group with such roles. - * @param roles list of role names List<String> - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMembersWhereUserIsInRoles(roles: Array, user?: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getMembersWhereUserIsInRoles(roles: Array, user?: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getMembersWhereUserIsInRoles(roles: Array, user?: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getMembersWhereUserIsInRoles(roles: Array, user?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (roles === null || roles === undefined) { - throw new Error('Required parameter roles was null or undefined when calling getMembersWhereUserIsInRoles.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (roles) { - roles.forEach((element) => { - queryParameters = queryParameters.append('roles[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/authzResolver/getMembersWhereUserIsInRoles`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Gets current user - * Returns object representing the currently authenticated user. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getPerunPrincipal(observe?: 'body', reportProgress?: boolean): Observable; - public getPerunPrincipal(observe?: 'response', reportProgress?: boolean): Observable>; - public getPerunPrincipal(observe?: 'events', reportProgress?: boolean): Observable>; - public getPerunPrincipal(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/authzResolver/getPerunPrincipal`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns list of caller\'s role names. Perun system uses role names in the upper case format. However, for now, they are converted to the lower case format because of the compatibility with external systems. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getPrincipalRoleNames(observe?: 'body', reportProgress?: boolean): Observable>; - public getPrincipalRoleNames(observe?: 'response', reportProgress?: boolean): Observable>>; - public getPrincipalRoleNames(observe?: 'events', reportProgress?: boolean): Observable>>; - public getPrincipalRoleNames(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/authzResolver/getPrincipalRoleNames`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all Resources where the given user (principal if user not sent) has set one of the given roles or the given user is a member of an authorized group with such roles. - * @param roles list of role names List<String> - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourcesWhereUserIsInRoles(roles: Array, user?: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getResourcesWhereUserIsInRoles(roles: Array, user?: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getResourcesWhereUserIsInRoles(roles: Array, user?: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getResourcesWhereUserIsInRoles(roles: Array, user?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (roles === null || roles === undefined) { - throw new Error('Required parameter roles was null or undefined when calling getResourcesWhereUserIsInRoles.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (roles) { - roles.forEach((element) => { - queryParameters = queryParameters.append('roles[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/authzResolver/getResourcesWhereUserIsInRoles`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all SecurityTeams where the given user (principal if user not sent) has set one of the given roles or the given user is a member of an authorized group with such roles. - * @param roles list of role names List<String> - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getSecurityTeamsWhereUserIsInRoles(roles: Array, user?: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getSecurityTeamsWhereUserIsInRoles(roles: Array, user?: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getSecurityTeamsWhereUserIsInRoles(roles: Array, user?: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getSecurityTeamsWhereUserIsInRoles(roles: Array, user?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (roles === null || roles === undefined) { - throw new Error('Required parameter roles was null or undefined when calling getSecurityTeamsWhereUserIsInRoles.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (roles) { - roles.forEach((element) => { - queryParameters = queryParameters.append('roles[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/authzResolver/getSecurityTeamsWhereUserIsInRoles`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns list of user\'s role names. Perun system uses role names in the upper case format. However, for now, they are converted to the lower case format because of the compatibility with external systems. - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserRoleNames(user: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getUserRoleNames(user: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getUserRoleNames(user: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getUserRoleNames(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getUserRoleNames.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/authzResolver/getUserRoleNames`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns all roles as an AuthzRoles object for a given user. - * @param userId id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserRoles(userId: number, observe?: 'body', reportProgress?: boolean): Observable<{ [key: string]: { [key: string]: Array; }; }>; - public getUserRoles(userId: number, observe?: 'response', reportProgress?: boolean): Observable; }; }>>; - public getUserRoles(userId: number, observe?: 'events', reportProgress?: boolean): Observable; }; }>>; - public getUserRoles(userId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (userId === null || userId === undefined) { - throw new Error('Required parameter userId was null or undefined when calling getUserRoles.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (userId !== undefined && userId !== null) { - queryParameters = queryParameters.set('userId', userId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get<{ [key: string]: { [key: string]: Array; }; }>(`${this.configuration.basePath}/json/authzResolver/getUserRoles`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all Vos where the given user (principal if user not sent) has set one of the given roles or the given user is a member of an authorized group with such roles. - * @param roles list of role names List<String> - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVosWhereUserIsInRoles(roles: Array, user?: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getVosWhereUserIsInRoles(roles: Array, user?: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getVosWhereUserIsInRoles(roles: Array, user?: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getVosWhereUserIsInRoles(roles: Array, user?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (roles === null || roles === undefined) { - throw new Error('Required parameter roles was null or undefined when calling getVosWhereUserIsInRoles.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (roles) { - roles.forEach((element) => { - queryParameters = queryParameters.append('roles[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/authzResolver/getVosWhereUserIsInRoles`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns 1 if User has Facility manager role (FACILITYADMIN) or for specific Facility defined by id - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public isFacilityAdmin(facility?: number, observe?: 'body', reportProgress?: boolean): Observable; - public isFacilityAdmin(facility?: number, observe?: 'response', reportProgress?: boolean): Observable>; - public isFacilityAdmin(facility?: number, observe?: 'events', reportProgress?: boolean): Observable>; - public isFacilityAdmin(facility?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/urlinjsonout/authzResolver/isFacilityAdmin`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns 1 if User has Group manager role (GROUPADMIN) or for specific Group defined by id - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public isGroupAdmin(group?: number, observe?: 'body', reportProgress?: boolean): Observable; - public isGroupAdmin(group?: number, observe?: 'response', reportProgress?: boolean): Observable>; - public isGroupAdmin(group?: number, observe?: 'events', reportProgress?: boolean): Observable>; - public isGroupAdmin(group?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/urlinjsonout/authzResolver/isGroupAdmin`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns 1 if User has Perun admin role (perunadmin). - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public isPerunAdmin(observe?: 'body', reportProgress?: boolean): Observable; - public isPerunAdmin(observe?: 'response', reportProgress?: boolean): Observable>; - public isPerunAdmin(observe?: 'events', reportProgress?: boolean): Observable>; - public isPerunAdmin(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/authzResolver/isPerunAdmin`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns 1 if User has VO manager role (VOADMIN) or for specific VO defined by id - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public isVoAdmin(vo?: number, observe?: 'body', reportProgress?: boolean): Observable; - public isVoAdmin(vo?: number, observe?: 'response', reportProgress?: boolean): Observable>; - public isVoAdmin(vo?: number, observe?: 'events', reportProgress?: boolean): Observable>; - public isVoAdmin(vo?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/urlinjsonout/authzResolver/isVoAdmin`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns \"OK\" string. Helper method for GUI check if connection is alive. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public keepAlive(observe?: 'body', reportProgress?: boolean): Observable; - public keepAlive(observe?: 'response', reportProgress?: boolean): Observable>; - public keepAlive(observe?: 'events', reportProgress?: boolean): Observable>; - public keepAlive(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/authzResolver/keepAlive`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Load perun roles and policies from the configuration file perun-roles.yml. Roles are loaded to the database and policies are loaded to the PerunPoliciesContainer. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public loadAuthorizationComponents(observe?: 'body', reportProgress?: boolean): Observable; - public loadAuthorizationComponents(observe?: 'response', reportProgress?: boolean): Observable>; - public loadAuthorizationComponents(observe?: 'events', reportProgress?: boolean): Observable>; - public loadAuthorizationComponents(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/authzResolver/loadAuthorizationComponents`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Set role for authorizedGroup and complementaryObject - * @param setRoleWithGroupComplementaryObject - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setRoleWithGroupComplementaryObject(setRoleWithGroupComplementaryObject: SetRoleWithGroupComplementaryObject, observe?: 'body', reportProgress?: boolean): Observable; - public setRoleWithGroupComplementaryObject(setRoleWithGroupComplementaryObject: SetRoleWithGroupComplementaryObject, observe?: 'response', reportProgress?: boolean): Observable>; - public setRoleWithGroupComplementaryObject(setRoleWithGroupComplementaryObject: SetRoleWithGroupComplementaryObject, observe?: 'events', reportProgress?: boolean): Observable>; - public setRoleWithGroupComplementaryObject(setRoleWithGroupComplementaryObject: SetRoleWithGroupComplementaryObject, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (setRoleWithGroupComplementaryObject === null || setRoleWithGroupComplementaryObject === undefined) { - throw new Error('Required parameter setRoleWithGroupComplementaryObject was null or undefined when calling setRoleWithGroupComplementaryObject.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/authzResolver/setRole/g-co`, - setRoleWithGroupComplementaryObject, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Set role for user and complementaryObject - * @param setRoleWithUserComplementaryObject - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setRoleWithUserComplementaryObject(setRoleWithUserComplementaryObject: SetRoleWithUserComplementaryObject, observe?: 'body', reportProgress?: boolean): Observable; - public setRoleWithUserComplementaryObject(setRoleWithUserComplementaryObject: SetRoleWithUserComplementaryObject, observe?: 'response', reportProgress?: boolean): Observable>; - public setRoleWithUserComplementaryObject(setRoleWithUserComplementaryObject: SetRoleWithUserComplementaryObject, observe?: 'events', reportProgress?: boolean): Observable>; - public setRoleWithUserComplementaryObject(setRoleWithUserComplementaryObject: SetRoleWithUserComplementaryObject, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (setRoleWithUserComplementaryObject === null || setRoleWithUserComplementaryObject === undefined) { - throw new Error('Required parameter setRoleWithUserComplementaryObject was null or undefined when calling setRoleWithUserComplementaryObject.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/authzResolver/setRole/u-co`, - setRoleWithUserComplementaryObject, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Unset role for authorizedGroup and complementaryObject - * @param unsetRoleWithGroupComplementaryObject - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public unsetRoleWithGroupComplementaryObject(unsetRoleWithGroupComplementaryObject: UnsetRoleWithGroupComplementaryObject, observe?: 'body', reportProgress?: boolean): Observable; - public unsetRoleWithGroupComplementaryObject(unsetRoleWithGroupComplementaryObject: UnsetRoleWithGroupComplementaryObject, observe?: 'response', reportProgress?: boolean): Observable>; - public unsetRoleWithGroupComplementaryObject(unsetRoleWithGroupComplementaryObject: UnsetRoleWithGroupComplementaryObject, observe?: 'events', reportProgress?: boolean): Observable>; - public unsetRoleWithGroupComplementaryObject(unsetRoleWithGroupComplementaryObject: UnsetRoleWithGroupComplementaryObject, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (unsetRoleWithGroupComplementaryObject === null || unsetRoleWithGroupComplementaryObject === undefined) { - throw new Error('Required parameter unsetRoleWithGroupComplementaryObject was null or undefined when calling unsetRoleWithGroupComplementaryObject.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/authzResolver/unsetRole/g-co`, - unsetRoleWithGroupComplementaryObject, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Unset role for user and complementaryObject - * @param unsetRoleWithUserComplementaryObject - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public unsetRoleWithUserComplementaryObject(unsetRoleWithUserComplementaryObject: UnsetRoleWithUserComplementaryObject, observe?: 'body', reportProgress?: boolean): Observable; - public unsetRoleWithUserComplementaryObject(unsetRoleWithUserComplementaryObject: UnsetRoleWithUserComplementaryObject, observe?: 'response', reportProgress?: boolean): Observable>; - public unsetRoleWithUserComplementaryObject(unsetRoleWithUserComplementaryObject: UnsetRoleWithUserComplementaryObject, observe?: 'events', reportProgress?: boolean): Observable>; - public unsetRoleWithUserComplementaryObject(unsetRoleWithUserComplementaryObject: UnsetRoleWithUserComplementaryObject, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (unsetRoleWithUserComplementaryObject === null || unsetRoleWithUserComplementaryObject === undefined) { - throw new Error('Required parameter unsetRoleWithUserComplementaryObject was null or undefined when calling unsetRoleWithUserComplementaryObject.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/authzResolver/unsetRole/u-co`, - unsetRoleWithUserComplementaryObject, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); } + return this.httpClient.post( + `${this.configuration.basePath}/json/authzResolver/unsetRole/u-co`, + unsetRoleWithUserComplementaryObject, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } } diff --git a/libs/perun/openapi/src/lib/api/cabinetManager.service.ts b/libs/perun/openapi/src/lib/api/cabinetManager.service.ts index 0db4cee4d..d0484073a 100644 --- a/libs/perun/openapi/src/lib/api/cabinetManager.service.ts +++ b/libs/perun/openapi/src/lib/api/cabinetManager.service.ts @@ -11,11 +11,17 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { Author } from '../model/author'; import { Authorship } from '../model/authorship'; @@ -37,1685 +43,2251 @@ import { PublicationSystem } from '../model/publicationSystem'; import { Thanks } from '../model/thanks'; import { ThanksForGUI } from '../model/thanksForGUI'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - - +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class CabinetManagerService { + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string, + @Optional() configuration: Configuration + ) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + /** + * Creates Authorship. Everything except current date must be already set in Authorship object. Authorship is checked for existence before creation, if exists, existing object is returned. When authorship is successfully created, users priority coefficient is updated. + * @param inputCreateAuthorship + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createAutorship( + inputCreateAuthorship: InputCreateAuthorship, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public createAutorship( + inputCreateAuthorship: InputCreateAuthorship, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public createAutorship( + inputCreateAuthorship: InputCreateAuthorship, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public createAutorship( + inputCreateAuthorship: InputCreateAuthorship, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputCreateAuthorship === null || inputCreateAuthorship === undefined) { + throw new Error( + 'Required parameter inputCreateAuthorship was null or undefined when calling createAutorship.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/cabinetManager/createAuthorship`, + inputCreateAuthorship, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Creates new Category for Publications with specified name and rank. Category object\'s parameter name must be non-empty, max 128 chars long and rank must be double with single digit after decimal point. Other parameters are ignored. + * @param inputCreateCategory + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createCategoryCat( + inputCreateCategory: InputCreateCategory, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public createCategoryCat( + inputCreateCategory: InputCreateCategory, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public createCategoryCat( + inputCreateCategory: InputCreateCategory, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public createCategoryCat( + inputCreateCategory: InputCreateCategory, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputCreateCategory === null || inputCreateCategory === undefined) { + throw new Error( + 'Required parameter inputCreateCategory was null or undefined when calling createCategoryCat.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/cabinetManager/createCategory/cat`, + inputCreateCategory, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Creates new Category for Publications with specified name and rank. + * @param inputCreateCategory1 + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createCategoryNR( + inputCreateCategory1: InputCreateCategory1, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public createCategoryNR( + inputCreateCategory1: InputCreateCategory1, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public createCategoryNR( + inputCreateCategory1: InputCreateCategory1, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public createCategoryNR( + inputCreateCategory1: InputCreateCategory1, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputCreateCategory1 === null || inputCreateCategory1 === undefined) { + throw new Error( + 'Required parameter inputCreateCategory1 was null or undefined when calling createCategoryNR.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/cabinetManager/createCategory/n-r`, + inputCreateCategory1, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Create Publication. If exists by its ID or EXT_ID,PUB_SYS_ID then existing publication is returned. + * @param inputCreatePublication + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createPublication( + inputCreatePublication: InputCreatePublication, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public createPublication( + inputCreatePublication: InputCreatePublication, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public createPublication( + inputCreatePublication: InputCreatePublication, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public createPublication( + inputCreatePublication: InputCreatePublication, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputCreatePublication === null || inputCreatePublication === undefined) { + throw new Error( + 'Required parameter inputCreatePublication was null or undefined when calling createPublication.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/cabinetManager/createPublication`, + inputCreatePublication, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Creates new PublicationSystem. + * @param inputCreatePublicationSystem + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createPublicationSystem( + inputCreatePublicationSystem: InputCreatePublicationSystem, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public createPublicationSystem( + inputCreatePublicationSystem: InputCreatePublicationSystem, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public createPublicationSystem( + inputCreatePublicationSystem: InputCreatePublicationSystem, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public createPublicationSystem( + inputCreatePublicationSystem: InputCreatePublicationSystem, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputCreatePublicationSystem === null || inputCreatePublicationSystem === undefined) { + throw new Error( + 'Required parameter inputCreatePublicationSystem was null or undefined when calling createPublicationSystem.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/cabinetManager/createPublicationSystem`, + inputCreatePublicationSystem, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Creates new Thanks for Publication + * @param inputCreateThanks + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createThanks( + inputCreateThanks: InputCreateThanks, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public createThanks( + inputCreateThanks: InputCreateThanks, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public createThanks( + inputCreateThanks: InputCreateThanks, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public createThanks( + inputCreateThanks: InputCreateThanks, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputCreateThanks === null || inputCreateThanks === undefined) { + throw new Error( + 'Required parameter inputCreateThanks was null or undefined when calling createThanks.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/cabinetManager/createThanks`, + inputCreateThanks, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Delete Authorship by its userId and publicationId. + * @param publicationId id of publication + * @param userId id of user + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteAuthorship( + publicationId: number, + userId: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public deleteAuthorship( + publicationId: number, + userId: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public deleteAuthorship( + publicationId: number, + userId: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public deleteAuthorship( + publicationId: number, + userId: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (publicationId === null || publicationId === undefined) { + throw new Error( + 'Required parameter publicationId was null or undefined when calling deleteAuthorship.' + ); + } + if (userId === null || userId === undefined) { + throw new Error( + 'Required parameter userId was null or undefined when calling deleteAuthorship.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (publicationId !== undefined && publicationId !== null) { + queryParameters = queryParameters.set('publicationId', publicationId); + } + if (userId !== undefined && userId !== null) { + queryParameters = queryParameters.set('userId', userId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/cabinetManager/deleteAuthorship`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Delete category by its ID. If category contains any publications, it can\'t be deleted. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteCategory(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public deleteCategory( + id: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public deleteCategory( + id: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public deleteCategory( + id: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling deleteCategory.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/cabinetManager/deleteCategory`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Delete publication by its ID. Only Author of the record or PerunAdmin can do this. - Author deletes Authorships and Thanks from publication. - PerunAdmin also delete publication record. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deletePublication(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public deletePublication( + id: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public deletePublication( + id: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public deletePublication( + id: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (id === null || id === undefined) { + throw new Error( + 'Required parameter id was null or undefined when calling deletePublication.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/cabinetManager/deletePublication`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Deletes PublicationSystem by its ID. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deletePublicationSystem( + id: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public deletePublicationSystem( + id: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public deletePublicationSystem( + id: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public deletePublicationSystem( + id: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (id === null || id === undefined) { + throw new Error( + 'Required parameter id was null or undefined when calling deletePublicationSystem.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/cabinetManager/deletePublicationSystem`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Delete Thanks by its ID. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteThanks(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public deleteThanks( + id: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public deleteThanks( + id: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public deleteThanks( + id: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling deleteThanks.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/cabinetManager/deleteThanks`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Return all Authors of Publications. Empty list of none found. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findAllAuthors(observe?: 'body', reportProgress?: boolean): Observable>; + public findAllAuthors( + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public findAllAuthors( + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public findAllAuthors(observe: any = 'body', reportProgress: boolean = false): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/cabinetManager/findAllAuthors`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Return all Authors of Publication specified by its ID. Empty list of none found. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findAuthorsByPublicationId( + id: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public findAuthorsByPublicationId( + id: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public findAuthorsByPublicationId( + id: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public findAuthorsByPublicationId( + id: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (id === null || id === undefined) { + throw new Error( + 'Required parameter id was null or undefined when calling findAuthorsByPublicationId.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/cabinetManager/findAuthorsByPublicationId`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Finds publications of perun\'s user specified in param Search is done in external publication systems (MU, ZCU) All parameters are required. + * @param user id of User + * @param yearSince Year since + * @param yearTill Year till + * @param pubSysNamespace (MU or ZCU) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findExternalPublications( + user: number, + yearSince: number, + yearTill: number, + pubSysNamespace: string, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public findExternalPublications( + user: number, + yearSince: number, + yearTill: number, + pubSysNamespace: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public findExternalPublications( + user: number, + yearSince: number, + yearTill: number, + pubSysNamespace: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public findExternalPublications( + user: number, + yearSince: number, + yearTill: number, + pubSysNamespace: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling findExternalPublications.' + ); + } + if (yearSince === null || yearSince === undefined) { + throw new Error( + 'Required parameter yearSince was null or undefined when calling findExternalPublications.' + ); + } + if (yearTill === null || yearTill === undefined) { + throw new Error( + 'Required parameter yearTill was null or undefined when calling findExternalPublications.' + ); + } + if (pubSysNamespace === null || pubSysNamespace === undefined) { + throw new Error( + 'Required parameter pubSysNamespace was null or undefined when calling findExternalPublications.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (yearSince !== undefined && yearSince !== null) { + queryParameters = queryParameters.set('yearSince', yearSince); + } + if (yearTill !== undefined && yearTill !== null) { + queryParameters = queryParameters.set('yearTill', yearTill); + } + if (pubSysNamespace !== undefined && pubSysNamespace !== null) { + queryParameters = queryParameters.set('pubSysNamespace', pubSysNamespace); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/cabinetManager/findExternalPublications`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Find new Authors for Publication. Empty list of none found. Used by users to search for colleagues to add them as co-authors. + * @param searchString Text to search by + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findNewAuthors( + searchString: string, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public findNewAuthors( + searchString: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public findNewAuthors( + searchString: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public findNewAuthors( + searchString: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (searchString === null || searchString === undefined) { + throw new Error( + 'Required parameter searchString was null or undefined when calling findNewAuthors.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (searchString !== undefined && searchString !== null) { + queryParameters = queryParameters.set('searchString', searchString); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/cabinetManager/findNewAuthors`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Return Publication by its ID. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findPublicationById( + id: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public findPublicationById( + id: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public findPublicationById( + id: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public findPublicationById( + id: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (id === null || id === undefined) { + throw new Error( + 'Required parameter id was null or undefined when calling findPublicationById.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/cabinetManager/findPublicationById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Finds publications in Cabinet by filter. + * @param userId User id + * @param yearSince Year since + * @param yearTill Year till + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findPublicationsByFilter( + userId: number, + yearSince?: number, + yearTill?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public findPublicationsByFilter( + userId: number, + yearSince?: number, + yearTill?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public findPublicationsByFilter( + userId: number, + yearSince?: number, + yearTill?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public findPublicationsByFilter( + userId: number, + yearSince?: number, + yearTill?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (userId === null || userId === undefined) { + throw new Error( + 'Required parameter userId was null or undefined when calling findPublicationsByFilter.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (yearSince !== undefined && yearSince !== null) { + queryParameters = queryParameters.set('yearSince', yearSince); + } + if (yearTill !== undefined && yearTill !== null) { + queryParameters = queryParameters.set('yearTill', yearTill); + } + if (userId !== undefined && userId !== null) { + queryParameters = queryParameters.set('userId', userId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/cabinetManager/findPublicationsByFilter`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Finds rich publications in Cabinet by GUI filter: id = exact match (used when search for publication of authors) title = if \"like\" this substring year = exact match isbn = if \"like\" this substring category = exact match yearSince = if year >= yearSince yearTill = if year <= yearTill userId = exact match or 0 If you don\'t want to filter by publication params, do not include the attribute in the query. + * @param title Title + * @param isbn ISBN + * @param doi DOI + * @param id Publication id + * @param year Year + * @param category Category + * @param yearSince Year since + * @param yearTill Year till + * @param userId User id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findPublicationsByGUIFilter( + title?: string, + isbn?: string, + doi?: string, + id?: number, + year?: number, + category?: number, + yearSince?: number, + yearTill?: number, + userId?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public findPublicationsByGUIFilter( + title?: string, + isbn?: string, + doi?: string, + id?: number, + year?: number, + category?: number, + yearSince?: number, + yearTill?: number, + userId?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public findPublicationsByGUIFilter( + title?: string, + isbn?: string, + doi?: string, + id?: number, + year?: number, + category?: number, + yearSince?: number, + yearTill?: number, + userId?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public findPublicationsByGUIFilter( + title?: string, + isbn?: string, + doi?: string, + id?: number, + year?: number, + category?: number, + yearSince?: number, + yearTill?: number, + userId?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (title !== undefined && title !== null) { + queryParameters = queryParameters.set('title', title); + } + if (isbn !== undefined && isbn !== null) { + queryParameters = queryParameters.set('isbn', isbn); + } + if (doi !== undefined && doi !== null) { + queryParameters = queryParameters.set('doi', doi); + } + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + if (year !== undefined && year !== null) { + queryParameters = queryParameters.set('year', year); + } + if (category !== undefined && category !== null) { + queryParameters = queryParameters.set('category', category); + } + if (yearSince !== undefined && yearSince !== null) { + queryParameters = queryParameters.set('yearSince', yearSince); + } + if (yearTill !== undefined && yearTill !== null) { + queryParameters = queryParameters.set('yearTill', yearTill); + } + if (userId !== undefined && userId !== null) { + queryParameters = queryParameters.set('userId', userId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/cabinetManager/findPublicationsByGUIFilter`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Finds similar publications + * @param title Title + * @param doi DOI + * @param isbn ISBN + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findSimilarPublications( + title?: string, + doi?: string, + isbn?: string, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public findSimilarPublications( + title?: string, + doi?: string, + isbn?: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public findSimilarPublications( + title?: string, + doi?: string, + isbn?: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public findSimilarPublications( + title?: string, + doi?: string, + isbn?: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (title !== undefined && title !== null) { + queryParameters = queryParameters.set('title', title); + } + if (doi !== undefined && doi !== null) { + queryParameters = queryParameters.set('doi', doi); + } + if (isbn !== undefined && isbn !== null) { + queryParameters = queryParameters.set('isbn', isbn); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/cabinetManager/findSimilarPublications`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Return list of all Categories in Perun or empty list of none present. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getCategories(observe?: 'body', reportProgress?: boolean): Observable>; + public getCategories( + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getCategories( + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getCategories(observe: any = 'body', reportProgress: boolean = false): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/cabinetManager/getCategories`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all PublicationSystems in Perun. If none, return empty list. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getPublicationSystems( + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getPublicationSystems( + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getPublicationSystems( + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getPublicationSystems( + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/cabinetManager/getPublicationSystems`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets overall rank of given user as sum of all his publications Authorships. + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRank(user: number, observe?: 'body', reportProgress?: boolean): Observable; + public getRank( + user: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getRank( + user: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getRank( + user: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getRank.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/cabinetManager/getRank`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get ThanksForGUI of Publication specified by its ID or empty list. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRichThanksByPublicationId( + id: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getRichThanksByPublicationId( + id: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getRichThanksByPublicationId( + id: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getRichThanksByPublicationId( + id: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (id === null || id === undefined) { + throw new Error( + 'Required parameter id was null or undefined when calling getRichThanksByPublicationId.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/cabinetManager/getRichThanksByPublicationId`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * (Un)Lock passed Publications for changes. + * @param inputLockPublications + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public lockPublications( + inputLockPublications: InputLockPublications, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public lockPublications( + inputLockPublications: InputLockPublications, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public lockPublications( + inputLockPublications: InputLockPublications, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public lockPublications( + inputLockPublications: InputLockPublications, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputLockPublications === null || inputLockPublications === undefined) { + throw new Error( + 'Required parameter inputLockPublications was null or undefined when calling lockPublications.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/cabinetManager/lockPublications`, + inputLockPublications, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Updates publications category in Perun. Category to update is found by ID. When category rank is changed, priorityCoefficient for all authors of books from this category, is recalculated. + * @param inputUpdateCategory + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateCategory( + inputUpdateCategory: InputUpdateCategory, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public updateCategory( + inputUpdateCategory: InputUpdateCategory, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public updateCategory( + inputUpdateCategory: InputUpdateCategory, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public updateCategory( + inputUpdateCategory: InputUpdateCategory, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputUpdateCategory === null || inputUpdateCategory === undefined) { + throw new Error( + 'Required parameter inputUpdateCategory was null or undefined when calling updateCategory.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/cabinetManager/updateCategory`, + inputUpdateCategory, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Update existing publication by its ID. + * @param inputUpdatePublication + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updatePublication( + inputUpdatePublication: InputUpdatePublication, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public updatePublication( + inputUpdatePublication: InputUpdatePublication, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public updatePublication( + inputUpdatePublication: InputUpdatePublication, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public updatePublication( + inputUpdatePublication: InputUpdatePublication, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputUpdatePublication === null || inputUpdatePublication === undefined) { + throw new Error( + 'Required parameter inputUpdatePublication was null or undefined when calling updatePublication.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/cabinetManager/updatePublication`, + inputUpdatePublication, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Updates PublicationSystem by its ID. + * @param inputUpdatePublicationSystem + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updatePublicationSystem( + inputUpdatePublicationSystem: InputUpdatePublicationSystem, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public updatePublicationSystem( + inputUpdatePublicationSystem: InputUpdatePublicationSystem, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public updatePublicationSystem( + inputUpdatePublicationSystem: InputUpdatePublicationSystem, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public updatePublicationSystem( + inputUpdatePublicationSystem: InputUpdatePublicationSystem, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputUpdatePublicationSystem === null || inputUpdatePublicationSystem === undefined) { + throw new Error( + 'Required parameter inputUpdatePublicationSystem was null or undefined when calling updatePublicationSystem.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - - - /** - * Creates Authorship. Everything except current date must be already set in Authorship object. Authorship is checked for existence before creation, if exists, existing object is returned. When authorship is successfully created, users priority coefficient is updated. - * @param inputCreateAuthorship - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createAutorship(inputCreateAuthorship: InputCreateAuthorship, observe?: 'body', reportProgress?: boolean): Observable; - public createAutorship(inputCreateAuthorship: InputCreateAuthorship, observe?: 'response', reportProgress?: boolean): Observable>; - public createAutorship(inputCreateAuthorship: InputCreateAuthorship, observe?: 'events', reportProgress?: boolean): Observable>; - public createAutorship(inputCreateAuthorship: InputCreateAuthorship, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputCreateAuthorship === null || inputCreateAuthorship === undefined) { - throw new Error('Required parameter inputCreateAuthorship was null or undefined when calling createAutorship.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/cabinetManager/createAuthorship`, - inputCreateAuthorship, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Creates new Category for Publications with specified name and rank. Category object\'s parameter name must be non-empty, max 128 chars long and rank must be double with single digit after decimal point. Other parameters are ignored. - * @param inputCreateCategory - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createCategoryCat(inputCreateCategory: InputCreateCategory, observe?: 'body', reportProgress?: boolean): Observable; - public createCategoryCat(inputCreateCategory: InputCreateCategory, observe?: 'response', reportProgress?: boolean): Observable>; - public createCategoryCat(inputCreateCategory: InputCreateCategory, observe?: 'events', reportProgress?: boolean): Observable>; - public createCategoryCat(inputCreateCategory: InputCreateCategory, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputCreateCategory === null || inputCreateCategory === undefined) { - throw new Error('Required parameter inputCreateCategory was null or undefined when calling createCategoryCat.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/cabinetManager/createCategory/cat`, - inputCreateCategory, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Creates new Category for Publications with specified name and rank. - * @param inputCreateCategory1 - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createCategoryNR(inputCreateCategory1: InputCreateCategory1, observe?: 'body', reportProgress?: boolean): Observable; - public createCategoryNR(inputCreateCategory1: InputCreateCategory1, observe?: 'response', reportProgress?: boolean): Observable>; - public createCategoryNR(inputCreateCategory1: InputCreateCategory1, observe?: 'events', reportProgress?: boolean): Observable>; - public createCategoryNR(inputCreateCategory1: InputCreateCategory1, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputCreateCategory1 === null || inputCreateCategory1 === undefined) { - throw new Error('Required parameter inputCreateCategory1 was null or undefined when calling createCategoryNR.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/cabinetManager/createCategory/n-r`, - inputCreateCategory1, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Create Publication. If exists by its ID or EXT_ID,PUB_SYS_ID then existing publication is returned. - * @param inputCreatePublication - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createPublication(inputCreatePublication: InputCreatePublication, observe?: 'body', reportProgress?: boolean): Observable; - public createPublication(inputCreatePublication: InputCreatePublication, observe?: 'response', reportProgress?: boolean): Observable>; - public createPublication(inputCreatePublication: InputCreatePublication, observe?: 'events', reportProgress?: boolean): Observable>; - public createPublication(inputCreatePublication: InputCreatePublication, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputCreatePublication === null || inputCreatePublication === undefined) { - throw new Error('Required parameter inputCreatePublication was null or undefined when calling createPublication.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/cabinetManager/createPublication`, - inputCreatePublication, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Creates new PublicationSystem. - * @param inputCreatePublicationSystem - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createPublicationSystem(inputCreatePublicationSystem: InputCreatePublicationSystem, observe?: 'body', reportProgress?: boolean): Observable; - public createPublicationSystem(inputCreatePublicationSystem: InputCreatePublicationSystem, observe?: 'response', reportProgress?: boolean): Observable>; - public createPublicationSystem(inputCreatePublicationSystem: InputCreatePublicationSystem, observe?: 'events', reportProgress?: boolean): Observable>; - public createPublicationSystem(inputCreatePublicationSystem: InputCreatePublicationSystem, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputCreatePublicationSystem === null || inputCreatePublicationSystem === undefined) { - throw new Error('Required parameter inputCreatePublicationSystem was null or undefined when calling createPublicationSystem.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/cabinetManager/createPublicationSystem`, - inputCreatePublicationSystem, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Creates new Thanks for Publication - * @param inputCreateThanks - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createThanks(inputCreateThanks: InputCreateThanks, observe?: 'body', reportProgress?: boolean): Observable; - public createThanks(inputCreateThanks: InputCreateThanks, observe?: 'response', reportProgress?: boolean): Observable>; - public createThanks(inputCreateThanks: InputCreateThanks, observe?: 'events', reportProgress?: boolean): Observable>; - public createThanks(inputCreateThanks: InputCreateThanks, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputCreateThanks === null || inputCreateThanks === undefined) { - throw new Error('Required parameter inputCreateThanks was null or undefined when calling createThanks.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/cabinetManager/createThanks`, - inputCreateThanks, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Delete Authorship by its userId and publicationId. - * @param publicationId id of publication - * @param userId id of user - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteAuthorship(publicationId: number, userId: number, observe?: 'body', reportProgress?: boolean): Observable; - public deleteAuthorship(publicationId: number, userId: number, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteAuthorship(publicationId: number, userId: number, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteAuthorship(publicationId: number, userId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (publicationId === null || publicationId === undefined) { - throw new Error('Required parameter publicationId was null or undefined when calling deleteAuthorship.'); - } - if (userId === null || userId === undefined) { - throw new Error('Required parameter userId was null or undefined when calling deleteAuthorship.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (publicationId !== undefined && publicationId !== null) { - queryParameters = queryParameters.set('publicationId', publicationId); - } - if (userId !== undefined && userId !== null) { - queryParameters = queryParameters.set('userId', userId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/cabinetManager/deleteAuthorship`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Delete category by its ID. If category contains any publications, it can\'t be deleted. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteCategory(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public deleteCategory(id: number, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteCategory(id: number, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteCategory(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling deleteCategory.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/cabinetManager/deleteCategory`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Delete publication by its ID. Only Author of the record or PerunAdmin can do this. - Author deletes Authorships and Thanks from publication. - PerunAdmin also delete publication record. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deletePublication(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public deletePublication(id: number, observe?: 'response', reportProgress?: boolean): Observable>; - public deletePublication(id: number, observe?: 'events', reportProgress?: boolean): Observable>; - public deletePublication(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling deletePublication.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/cabinetManager/deletePublication`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Deletes PublicationSystem by its ID. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deletePublicationSystem(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public deletePublicationSystem(id: number, observe?: 'response', reportProgress?: boolean): Observable>; - public deletePublicationSystem(id: number, observe?: 'events', reportProgress?: boolean): Observable>; - public deletePublicationSystem(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling deletePublicationSystem.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/cabinetManager/deletePublicationSystem`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Delete Thanks by its ID. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteThanks(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public deleteThanks(id: number, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteThanks(id: number, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteThanks(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling deleteThanks.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/cabinetManager/deleteThanks`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Return all Authors of Publications. Empty list of none found. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findAllAuthors(observe?: 'body', reportProgress?: boolean): Observable>; - public findAllAuthors(observe?: 'response', reportProgress?: boolean): Observable>>; - public findAllAuthors(observe?: 'events', reportProgress?: boolean): Observable>>; - public findAllAuthors(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/cabinetManager/findAllAuthors`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Return all Authors of Publication specified by its ID. Empty list of none found. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findAuthorsByPublicationId(id: number, observe?: 'body', reportProgress?: boolean): Observable>; - public findAuthorsByPublicationId(id: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public findAuthorsByPublicationId(id: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public findAuthorsByPublicationId(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling findAuthorsByPublicationId.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/cabinetManager/findAuthorsByPublicationId`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Finds publications of perun\'s user specified in param Search is done in external publication systems (MU, ZCU) All parameters are required. - * @param user id of User - * @param yearSince Year since - * @param yearTill Year till - * @param pubSysNamespace (MU or ZCU) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findExternalPublications(user: number, yearSince: number, yearTill: number, pubSysNamespace: string, observe?: 'body', reportProgress?: boolean): Observable>; - public findExternalPublications(user: number, yearSince: number, yearTill: number, pubSysNamespace: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public findExternalPublications(user: number, yearSince: number, yearTill: number, pubSysNamespace: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public findExternalPublications(user: number, yearSince: number, yearTill: number, pubSysNamespace: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling findExternalPublications.'); - } - if (yearSince === null || yearSince === undefined) { - throw new Error('Required parameter yearSince was null or undefined when calling findExternalPublications.'); - } - if (yearTill === null || yearTill === undefined) { - throw new Error('Required parameter yearTill was null or undefined when calling findExternalPublications.'); - } - if (pubSysNamespace === null || pubSysNamespace === undefined) { - throw new Error('Required parameter pubSysNamespace was null or undefined when calling findExternalPublications.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (yearSince !== undefined && yearSince !== null) { - queryParameters = queryParameters.set('yearSince', yearSince); - } - if (yearTill !== undefined && yearTill !== null) { - queryParameters = queryParameters.set('yearTill', yearTill); - } - if (pubSysNamespace !== undefined && pubSysNamespace !== null) { - queryParameters = queryParameters.set('pubSysNamespace', pubSysNamespace); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/cabinetManager/findExternalPublications`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Find new Authors for Publication. Empty list of none found. Used by users to search for colleagues to add them as co-authors. - * @param searchString Text to search by - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findNewAuthors(searchString: string, observe?: 'body', reportProgress?: boolean): Observable>; - public findNewAuthors(searchString: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public findNewAuthors(searchString: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public findNewAuthors(searchString: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (searchString === null || searchString === undefined) { - throw new Error('Required parameter searchString was null or undefined when calling findNewAuthors.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (searchString !== undefined && searchString !== null) { - queryParameters = queryParameters.set('searchString', searchString); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/cabinetManager/findNewAuthors`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Return Publication by its ID. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findPublicationById(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public findPublicationById(id: number, observe?: 'response', reportProgress?: boolean): Observable>; - public findPublicationById(id: number, observe?: 'events', reportProgress?: boolean): Observable>; - public findPublicationById(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling findPublicationById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/cabinetManager/findPublicationById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Finds publications in Cabinet by filter. - * @param userId User id - * @param yearSince Year since - * @param yearTill Year till - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findPublicationsByFilter(userId: number, yearSince?: number, yearTill?: number, observe?: 'body', reportProgress?: boolean): Observable>; - public findPublicationsByFilter(userId: number, yearSince?: number, yearTill?: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public findPublicationsByFilter(userId: number, yearSince?: number, yearTill?: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public findPublicationsByFilter(userId: number, yearSince?: number, yearTill?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (userId === null || userId === undefined) { - throw new Error('Required parameter userId was null or undefined when calling findPublicationsByFilter.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (yearSince !== undefined && yearSince !== null) { - queryParameters = queryParameters.set('yearSince', yearSince); - } - if (yearTill !== undefined && yearTill !== null) { - queryParameters = queryParameters.set('yearTill', yearTill); - } - if (userId !== undefined && userId !== null) { - queryParameters = queryParameters.set('userId', userId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/cabinetManager/findPublicationsByFilter`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Finds rich publications in Cabinet by GUI filter: id = exact match (used when search for publication of authors) title = if \"like\" this substring year = exact match isbn = if \"like\" this substring category = exact match yearSince = if year >= yearSince yearTill = if year <= yearTill userId = exact match or 0 If you don\'t want to filter by publication params, do not include the attribute in the query. - * @param title Title - * @param isbn ISBN - * @param doi DOI - * @param id Publication id - * @param year Year - * @param category Category - * @param yearSince Year since - * @param yearTill Year till - * @param userId User id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findPublicationsByGUIFilter(title?: string, isbn?: string, doi?: string, id?: number, year?: number, category?: number, yearSince?: number, yearTill?: number, userId?: number, observe?: 'body', reportProgress?: boolean): Observable>; - public findPublicationsByGUIFilter(title?: string, isbn?: string, doi?: string, id?: number, year?: number, category?: number, yearSince?: number, yearTill?: number, userId?: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public findPublicationsByGUIFilter(title?: string, isbn?: string, doi?: string, id?: number, year?: number, category?: number, yearSince?: number, yearTill?: number, userId?: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public findPublicationsByGUIFilter(title?: string, isbn?: string, doi?: string, id?: number, year?: number, category?: number, yearSince?: number, yearTill?: number, userId?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (title !== undefined && title !== null) { - queryParameters = queryParameters.set('title', title); - } - if (isbn !== undefined && isbn !== null) { - queryParameters = queryParameters.set('isbn', isbn); - } - if (doi !== undefined && doi !== null) { - queryParameters = queryParameters.set('doi', doi); - } - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - if (year !== undefined && year !== null) { - queryParameters = queryParameters.set('year', year); - } - if (category !== undefined && category !== null) { - queryParameters = queryParameters.set('category', category); - } - if (yearSince !== undefined && yearSince !== null) { - queryParameters = queryParameters.set('yearSince', yearSince); - } - if (yearTill !== undefined && yearTill !== null) { - queryParameters = queryParameters.set('yearTill', yearTill); - } - if (userId !== undefined && userId !== null) { - queryParameters = queryParameters.set('userId', userId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/cabinetManager/findPublicationsByGUIFilter`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Finds similar publications - * @param title Title - * @param doi DOI - * @param isbn ISBN - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findSimilarPublications(title?: string, doi?: string, isbn?: string, observe?: 'body', reportProgress?: boolean): Observable>; - public findSimilarPublications(title?: string, doi?: string, isbn?: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public findSimilarPublications(title?: string, doi?: string, isbn?: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public findSimilarPublications(title?: string, doi?: string, isbn?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (title !== undefined && title !== null) { - queryParameters = queryParameters.set('title', title); - } - if (doi !== undefined && doi !== null) { - queryParameters = queryParameters.set('doi', doi); - } - if (isbn !== undefined && isbn !== null) { - queryParameters = queryParameters.set('isbn', isbn); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/cabinetManager/findSimilarPublications`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Return list of all Categories in Perun or empty list of none present. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getCategories(observe?: 'body', reportProgress?: boolean): Observable>; - public getCategories(observe?: 'response', reportProgress?: boolean): Observable>>; - public getCategories(observe?: 'events', reportProgress?: boolean): Observable>>; - public getCategories(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/cabinetManager/getCategories`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all PublicationSystems in Perun. If none, return empty list. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getPublicationSystems(observe?: 'body', reportProgress?: boolean): Observable>; - public getPublicationSystems(observe?: 'response', reportProgress?: boolean): Observable>>; - public getPublicationSystems(observe?: 'events', reportProgress?: boolean): Observable>>; - public getPublicationSystems(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/cabinetManager/getPublicationSystems`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Gets overall rank of given user as sum of all his publications Authorships. - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRank(user: number, observe?: 'body', reportProgress?: boolean): Observable; - public getRank(user: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getRank(user: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getRank(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getRank.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/cabinetManager/getRank`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get ThanksForGUI of Publication specified by its ID or empty list. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRichThanksByPublicationId(id: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getRichThanksByPublicationId(id: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getRichThanksByPublicationId(id: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getRichThanksByPublicationId(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getRichThanksByPublicationId.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/cabinetManager/getRichThanksByPublicationId`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * (Un)Lock passed Publications for changes. - * @param inputLockPublications - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public lockPublications(inputLockPublications: InputLockPublications, observe?: 'body', reportProgress?: boolean): Observable; - public lockPublications(inputLockPublications: InputLockPublications, observe?: 'response', reportProgress?: boolean): Observable>; - public lockPublications(inputLockPublications: InputLockPublications, observe?: 'events', reportProgress?: boolean): Observable>; - public lockPublications(inputLockPublications: InputLockPublications, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputLockPublications === null || inputLockPublications === undefined) { - throw new Error('Required parameter inputLockPublications was null or undefined when calling lockPublications.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/cabinetManager/lockPublications`, - inputLockPublications, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Updates publications category in Perun. Category to update is found by ID. When category rank is changed, priorityCoefficient for all authors of books from this category, is recalculated. - * @param inputUpdateCategory - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateCategory(inputUpdateCategory: InputUpdateCategory, observe?: 'body', reportProgress?: boolean): Observable; - public updateCategory(inputUpdateCategory: InputUpdateCategory, observe?: 'response', reportProgress?: boolean): Observable>; - public updateCategory(inputUpdateCategory: InputUpdateCategory, observe?: 'events', reportProgress?: boolean): Observable>; - public updateCategory(inputUpdateCategory: InputUpdateCategory, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputUpdateCategory === null || inputUpdateCategory === undefined) { - throw new Error('Required parameter inputUpdateCategory was null or undefined when calling updateCategory.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/cabinetManager/updateCategory`, - inputUpdateCategory, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Update existing publication by its ID. - * @param inputUpdatePublication - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updatePublication(inputUpdatePublication: InputUpdatePublication, observe?: 'body', reportProgress?: boolean): Observable; - public updatePublication(inputUpdatePublication: InputUpdatePublication, observe?: 'response', reportProgress?: boolean): Observable>; - public updatePublication(inputUpdatePublication: InputUpdatePublication, observe?: 'events', reportProgress?: boolean): Observable>; - public updatePublication(inputUpdatePublication: InputUpdatePublication, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputUpdatePublication === null || inputUpdatePublication === undefined) { - throw new Error('Required parameter inputUpdatePublication was null or undefined when calling updatePublication.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/cabinetManager/updatePublication`, - inputUpdatePublication, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Updates PublicationSystem by its ID. - * @param inputUpdatePublicationSystem - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updatePublicationSystem(inputUpdatePublicationSystem: InputUpdatePublicationSystem, observe?: 'body', reportProgress?: boolean): Observable; - public updatePublicationSystem(inputUpdatePublicationSystem: InputUpdatePublicationSystem, observe?: 'response', reportProgress?: boolean): Observable>; - public updatePublicationSystem(inputUpdatePublicationSystem: InputUpdatePublicationSystem, observe?: 'events', reportProgress?: boolean): Observable>; - public updatePublicationSystem(inputUpdatePublicationSystem: InputUpdatePublicationSystem, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputUpdatePublicationSystem === null || inputUpdatePublicationSystem === undefined) { - throw new Error('Required parameter inputUpdatePublicationSystem was null or undefined when calling updatePublicationSystem.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/cabinetManager/updatePublicationSystem`, - inputUpdatePublicationSystem, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); } + return this.httpClient.post( + `${this.configuration.basePath}/json/cabinetManager/updatePublicationSystem`, + inputUpdatePublicationSystem, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } } diff --git a/libs/perun/openapi/src/lib/api/databaseManager.service.ts b/libs/perun/openapi/src/lib/api/databaseManager.service.ts index 2fd7c0988..c658d79ec 100644 --- a/libs/perun/openapi/src/lib/api/databaseManager.service.ts +++ b/libs/perun/openapi/src/lib/api/databaseManager.service.ts @@ -11,234 +11,285 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { PerunException } from '../model/perunException'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - - +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class DatabaseManagerService { + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string, + @Optional() configuration: Configuration + ) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + /** + * Returns current database version, e.g. \"3.1.55\" + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getCurrentDatabaseVersion(observe?: 'body', reportProgress?: boolean): Observable; + public getCurrentDatabaseVersion( + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getCurrentDatabaseVersion( + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getCurrentDatabaseVersion( + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - - - /** - * Returns current database version, e.g. \"3.1.55\" - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getCurrentDatabaseVersion(observe?: 'body', reportProgress?: boolean): Observable; - public getCurrentDatabaseVersion(observe?: 'response', reportProgress?: boolean): Observable>; - public getCurrentDatabaseVersion(observe?: 'events', reportProgress?: boolean): Observable>; - public getCurrentDatabaseVersion(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/databaseManager/getCurrentDatabaseVersion`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns current database driver info, e.g. \"PostgreSQL JDBC Driver-42.2.8\" - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDatabaseDriverInformation(observe?: 'body', reportProgress?: boolean): Observable; - public getDatabaseDriverInformation(observe?: 'response', reportProgress?: boolean): Observable>; - public getDatabaseDriverInformation(observe?: 'events', reportProgress?: boolean): Observable>; - public getDatabaseDriverInformation(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/databaseManager/getDatabaseDriverInformation`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns current database info, e.g. \"PostgreSQL-12.0 (Debian 12.0-2.pgdg100+1)\" - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDatabaseInformation(observe?: 'body', reportProgress?: boolean): Observable; - public getDatabaseInformation(observe?: 'response', reportProgress?: boolean): Observable>; - public getDatabaseInformation(observe?: 'events', reportProgress?: boolean): Observable>; - public getDatabaseInformation(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/databaseManager/getDatabaseInformation`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get time in ns \"nanoseconds\" of calling 1 simple update query to DB - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getTimeOfQueryPerformance(observe?: 'body', reportProgress?: boolean): Observable; - public getTimeOfQueryPerformance(observe?: 'response', reportProgress?: boolean): Observable>; - public getTimeOfQueryPerformance(observe?: 'events', reportProgress?: boolean): Observable>; - public getTimeOfQueryPerformance(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/databaseManager/getTimeOfQueryPerformance`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/databaseManager/getCurrentDatabaseVersion`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns current database driver info, e.g. \"PostgreSQL JDBC Driver-42.2.8\" + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDatabaseDriverInformation( + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getDatabaseDriverInformation( + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getDatabaseDriverInformation( + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getDatabaseDriverInformation( + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/databaseManager/getDatabaseDriverInformation`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns current database info, e.g. \"PostgreSQL-12.0 (Debian 12.0-2.pgdg100+1)\" + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDatabaseInformation(observe?: 'body', reportProgress?: boolean): Observable; + public getDatabaseInformation( + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getDatabaseInformation( + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getDatabaseInformation( + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/databaseManager/getDatabaseInformation`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get time in ns \"nanoseconds\" of calling 1 simple update query to DB + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getTimeOfQueryPerformance(observe?: 'body', reportProgress?: boolean): Observable; + public getTimeOfQueryPerformance( + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getTimeOfQueryPerformance( + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getTimeOfQueryPerformance( + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); } + return this.httpClient.get( + `${this.configuration.basePath}/json/databaseManager/getTimeOfQueryPerformance`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } } diff --git a/libs/perun/openapi/src/lib/api/extSourcesManager.service.ts b/libs/perun/openapi/src/lib/api/extSourcesManager.service.ts index f100cd52c..7702317e4 100644 --- a/libs/perun/openapi/src/lib/api/extSourcesManager.service.ts +++ b/libs/perun/openapi/src/lib/api/extSourcesManager.service.ts @@ -11,823 +11,1096 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { ExtSource } from '../model/extSource'; import { ExtSourceObject } from '../model/extSourceObject'; import { PerunException } from '../model/perunException'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - - +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class ExtSourcesManagerService { + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string, + @Optional() configuration: Configuration + ) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + /** + * Associate an external source definition with a GROUP. + * @param group id of Group + * @param source external source id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addExtSourceWithGroupSource( + group: number, + source: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public addExtSourceWithGroupSource( + group: number, + source: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public addExtSourceWithGroupSource( + group: number, + source: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public addExtSourceWithGroupSource( + group: number, + source: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling addExtSourceWithGroupSource.' + ); + } + if (source === null || source === undefined) { + throw new Error( + 'Required parameter source was null or undefined when calling addExtSourceWithGroupSource.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (source !== undefined && source !== null) { + queryParameters = queryParameters.set('source', source); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/extSourcesManager/addExtSource/g-s`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Associate an external source definition with a VO. + * @param vo id of Vo + * @param source external source id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addExtSourceWithVoSource( + vo: number, + source: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public addExtSourceWithVoSource( + vo: number, + source: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public addExtSourceWithVoSource( + vo: number, + source: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public addExtSourceWithVoSource( + vo: number, + source: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling addExtSourceWithVoSource.' + ); + } + if (source === null || source === undefined) { + throw new Error( + 'Required parameter source was null or undefined when calling addExtSourceWithVoSource.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (source !== undefined && source !== null) { + queryParameters = queryParameters.set('source', source); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/extSourcesManager/addExtSource/v-s`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Creates an external source. ExtSource object must contain: name, type. Other parameters are ignored. + * @param extSourceObject + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createExtSourceFromExtSourceObject( + extSourceObject: ExtSourceObject, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public createExtSourceFromExtSourceObject( + extSourceObject: ExtSourceObject, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public createExtSourceFromExtSourceObject( + extSourceObject: ExtSourceObject, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public createExtSourceFromExtSourceObject( + extSourceObject: ExtSourceObject, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (extSourceObject === null || extSourceObject === undefined) { + throw new Error( + 'Required parameter extSourceObject was null or undefined when calling createExtSourceFromExtSourceObject.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/extSourcesManager/createExtSource/es`, + extSourceObject, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Creates an external source. + * @param name name of entity + * @param type type of ExtSource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createExtSourceWithNameType( + name: string, + type: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public createExtSourceWithNameType( + name: string, + type: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public createExtSourceWithNameType( + name: string, + type: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public createExtSourceWithNameType( + name: string, + type: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (name === null || name === undefined) { + throw new Error( + 'Required parameter name was null or undefined when calling createExtSourceWithNameType.' + ); + } + if (type === null || type === undefined) { + throw new Error( + 'Required parameter type was null or undefined when calling createExtSourceWithNameType.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (name !== undefined && name !== null) { + queryParameters = queryParameters.set('name', name); + } + if (type !== undefined && type !== null) { + queryParameters = queryParameters.set('type', type); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/extSourcesManager/createExtSource/n-t`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Delete an external source. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteExtSource(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public deleteExtSource( + id: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public deleteExtSource( + id: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public deleteExtSource( + id: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling deleteExtSource.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/extSourcesManager/deleteExtSource`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns an external source by its id. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getExtSourceById( + id: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getExtSourceById( + id: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getExtSourceById( + id: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getExtSourceById( + id: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getExtSourceById.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/extSourcesManager/getExtSourceById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns an external source by its name. + * @param name name of entity + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getExtSourceByName( + name: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getExtSourceByName( + name: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getExtSourceByName( + name: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getExtSourceByName( + name: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (name === null || name === undefined) { + throw new Error( + 'Required parameter name was null or undefined when calling getExtSourceByName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (name !== undefined && name !== null) { + queryParameters = queryParameters.set('name', name); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/extSourcesManager/getExtSourceByName`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns the list of all external sources. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getExtSources(observe?: 'body', reportProgress?: boolean): Observable>; + public getExtSources( + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getExtSources( + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getExtSources(observe: any = 'body', reportProgress: boolean = false): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/extSourcesManager/getExtSources`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns the list of external sources associated with a GROUP. + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupExtSources( + group: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getGroupExtSources( + group: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getGroupExtSources( + group: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getGroupExtSources( + group: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getGroupExtSources.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/extSourcesManager/getGroupExtSources`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns the list of external sources associated with a VO. + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVoExtSources( + vo: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getVoExtSources( + vo: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getVoExtSources( + vo: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getVoExtSources( + vo: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getVoExtSources.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - - - /** - * Associate an external source definition with a GROUP. - * @param group id of Group - * @param source external source id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addExtSourceWithGroupSource(group: number, source: number, observe?: 'body', reportProgress?: boolean): Observable; - public addExtSourceWithGroupSource(group: number, source: number, observe?: 'response', reportProgress?: boolean): Observable>; - public addExtSourceWithGroupSource(group: number, source: number, observe?: 'events', reportProgress?: boolean): Observable>; - public addExtSourceWithGroupSource(group: number, source: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling addExtSourceWithGroupSource.'); - } - if (source === null || source === undefined) { - throw new Error('Required parameter source was null or undefined when calling addExtSourceWithGroupSource.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (source !== undefined && source !== null) { - queryParameters = queryParameters.set('source', source); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/extSourcesManager/addExtSource/g-s`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Associate an external source definition with a VO. - * @param vo id of Vo - * @param source external source id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addExtSourceWithVoSource(vo: number, source: number, observe?: 'body', reportProgress?: boolean): Observable; - public addExtSourceWithVoSource(vo: number, source: number, observe?: 'response', reportProgress?: boolean): Observable>; - public addExtSourceWithVoSource(vo: number, source: number, observe?: 'events', reportProgress?: boolean): Observable>; - public addExtSourceWithVoSource(vo: number, source: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling addExtSourceWithVoSource.'); - } - if (source === null || source === undefined) { - throw new Error('Required parameter source was null or undefined when calling addExtSourceWithVoSource.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (source !== undefined && source !== null) { - queryParameters = queryParameters.set('source', source); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/extSourcesManager/addExtSource/v-s`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Creates an external source. ExtSource object must contain: name, type. Other parameters are ignored. - * @param extSourceObject - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createExtSourceFromExtSourceObject(extSourceObject: ExtSourceObject, observe?: 'body', reportProgress?: boolean): Observable; - public createExtSourceFromExtSourceObject(extSourceObject: ExtSourceObject, observe?: 'response', reportProgress?: boolean): Observable>; - public createExtSourceFromExtSourceObject(extSourceObject: ExtSourceObject, observe?: 'events', reportProgress?: boolean): Observable>; - public createExtSourceFromExtSourceObject(extSourceObject: ExtSourceObject, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (extSourceObject === null || extSourceObject === undefined) { - throw new Error('Required parameter extSourceObject was null or undefined when calling createExtSourceFromExtSourceObject.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/extSourcesManager/createExtSource/es`, - extSourceObject, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Creates an external source. - * @param name name of entity - * @param type type of ExtSource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createExtSourceWithNameType(name: string, type: string, observe?: 'body', reportProgress?: boolean): Observable; - public createExtSourceWithNameType(name: string, type: string, observe?: 'response', reportProgress?: boolean): Observable>; - public createExtSourceWithNameType(name: string, type: string, observe?: 'events', reportProgress?: boolean): Observable>; - public createExtSourceWithNameType(name: string, type: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling createExtSourceWithNameType.'); - } - if (type === null || type === undefined) { - throw new Error('Required parameter type was null or undefined when calling createExtSourceWithNameType.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (name !== undefined && name !== null) { - queryParameters = queryParameters.set('name', name); - } - if (type !== undefined && type !== null) { - queryParameters = queryParameters.set('type', type); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/extSourcesManager/createExtSource/n-t`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Delete an external source. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteExtSource(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public deleteExtSource(id: number, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteExtSource(id: number, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteExtSource(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling deleteExtSource.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/extSourcesManager/deleteExtSource`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns an external source by its id. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getExtSourceById(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public getExtSourceById(id: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getExtSourceById(id: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getExtSourceById(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getExtSourceById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/extSourcesManager/getExtSourceById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns an external source by its name. - * @param name name of entity - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getExtSourceByName(name: string, observe?: 'body', reportProgress?: boolean): Observable; - public getExtSourceByName(name: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getExtSourceByName(name: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getExtSourceByName(name: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling getExtSourceByName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (name !== undefined && name !== null) { - queryParameters = queryParameters.set('name', name); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/extSourcesManager/getExtSourceByName`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns the list of all external sources. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getExtSources(observe?: 'body', reportProgress?: boolean): Observable>; - public getExtSources(observe?: 'response', reportProgress?: boolean): Observable>>; - public getExtSources(observe?: 'events', reportProgress?: boolean): Observable>>; - public getExtSources(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/extSourcesManager/getExtSources`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns the list of external sources associated with a GROUP. - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupExtSources(group: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getGroupExtSources(group: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getGroupExtSources(group: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getGroupExtSources(group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getGroupExtSources.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/extSourcesManager/getGroupExtSources`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns the list of external sources associated with a VO. - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVoExtSources(vo: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getVoExtSources(vo: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getVoExtSources(vo: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getVoExtSources(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getVoExtSources.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/extSourcesManager/getVoExtSources`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Loads ext source definitions from the configuration file and updates entries stored in the DB. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public loadExtSourcesDefinitions(observe?: 'body', reportProgress?: boolean): Observable; - public loadExtSourcesDefinitions(observe?: 'response', reportProgress?: boolean): Observable>; - public loadExtSourcesDefinitions(observe?: 'events', reportProgress?: boolean): Observable>; - public loadExtSourcesDefinitions(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/extSourcesManager/loadExtSourcesDefinitions`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove an association of an external source from a GROUP. - * @param group id of Group - * @param source external source id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeExtSourceWithGroupSource(group: number, source: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeExtSourceWithGroupSource(group: number, source: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeExtSourceWithGroupSource(group: number, source: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeExtSourceWithGroupSource(group: number, source: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling removeExtSourceWithGroupSource.'); - } - if (source === null || source === undefined) { - throw new Error('Required parameter source was null or undefined when calling removeExtSourceWithGroupSource.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (source !== undefined && source !== null) { - queryParameters = queryParameters.set('source', source); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/extSourcesManager/removeExtSource/g-s`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove an association of an external source from a VO. - * @param vo id of Vo - * @param source external source id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeExtSourceWithVoSource(vo: number, source: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeExtSourceWithVoSource(vo: number, source: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeExtSourceWithVoSource(vo: number, source: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeExtSourceWithVoSource(vo: number, source: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling removeExtSourceWithVoSource.'); - } - if (source === null || source === undefined) { - throw new Error('Required parameter source was null or undefined when calling removeExtSourceWithVoSource.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (source !== undefined && source !== null) { - queryParameters = queryParameters.set('source', source); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/extSourcesManager/removeExtSource/v-s`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/extSourcesManager/getVoExtSources`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Loads ext source definitions from the configuration file and updates entries stored in the DB. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public loadExtSourcesDefinitions(observe?: 'body', reportProgress?: boolean): Observable; + public loadExtSourcesDefinitions( + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public loadExtSourcesDefinitions( + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public loadExtSourcesDefinitions( + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/extSourcesManager/loadExtSourcesDefinitions`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove an association of an external source from a GROUP. + * @param group id of Group + * @param source external source id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeExtSourceWithGroupSource( + group: number, + source: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeExtSourceWithGroupSource( + group: number, + source: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeExtSourceWithGroupSource( + group: number, + source: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeExtSourceWithGroupSource( + group: number, + source: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling removeExtSourceWithGroupSource.' + ); + } + if (source === null || source === undefined) { + throw new Error( + 'Required parameter source was null or undefined when calling removeExtSourceWithGroupSource.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (source !== undefined && source !== null) { + queryParameters = queryParameters.set('source', source); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/extSourcesManager/removeExtSource/g-s`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove an association of an external source from a VO. + * @param vo id of Vo + * @param source external source id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeExtSourceWithVoSource( + vo: number, + source: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeExtSourceWithVoSource( + vo: number, + source: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeExtSourceWithVoSource( + vo: number, + source: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeExtSourceWithVoSource( + vo: number, + source: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling removeExtSourceWithVoSource.' + ); + } + if (source === null || source === undefined) { + throw new Error( + 'Required parameter source was null or undefined when calling removeExtSourceWithVoSource.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (source !== undefined && source !== null) { + queryParameters = queryParameters.set('source', source); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); } + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/extSourcesManager/removeExtSource/v-s`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } } diff --git a/libs/perun/openapi/src/lib/api/facilitiesManager.service.ts b/libs/perun/openapi/src/lib/api/facilitiesManager.service.ts index 248859e50..42de7a3ed 100644 --- a/libs/perun/openapi/src/lib/api/facilitiesManager.service.ts +++ b/libs/perun/openapi/src/lib/api/facilitiesManager.service.ts @@ -11,11 +11,17 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { BanOnFacility } from '../model/banOnFacility'; import { EnrichedFacility } from '../model/enrichedFacility'; @@ -36,6151 +42,8481 @@ import { SecurityTeam } from '../model/securityTeam'; import { User } from '../model/user'; import { Vo } from '../model/vo'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - - +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class FacilitiesManagerService { + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string, + @Optional() configuration: Configuration + ) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + /** + * Adds a group as a Facility admin. + * @param facility id of Facility + * @param authorizedGroup Group id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addFacilityAdminGroup( + facility: number, + authorizedGroup: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public addFacilityAdminGroup( + facility: number, + authorizedGroup: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public addFacilityAdminGroup( + facility: number, + authorizedGroup: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public addFacilityAdminGroup( + facility: number, + authorizedGroup: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling addFacilityAdminGroup.' + ); + } + if (authorizedGroup === null || authorizedGroup === undefined) { + throw new Error( + 'Required parameter authorizedGroup was null or undefined when calling addFacilityAdminGroup.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (authorizedGroup !== undefined && authorizedGroup !== null) { + queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/addAdmin/group`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Adds a group as a Facility admin. + * @param facility name of Facility + * @param authorizedGroup Group id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addFacilityAdminGroupByFacilityName( + facility: string, + authorizedGroup: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public addFacilityAdminGroupByFacilityName( + facility: string, + authorizedGroup: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public addFacilityAdminGroupByFacilityName( + facility: string, + authorizedGroup: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public addFacilityAdminGroupByFacilityName( + facility: string, + authorizedGroup: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling addFacilityAdminGroupByFacilityName.' + ); + } + if (authorizedGroup === null || authorizedGroup === undefined) { + throw new Error( + 'Required parameter authorizedGroup was null or undefined when calling addFacilityAdminGroupByFacilityName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (authorizedGroup !== undefined && authorizedGroup !== null) { + queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/addAdmin/group/f-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Adds a user as a Facility admin. + * @param facility id of Facility + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addFacilityAdminUser( + facility: number, + user: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public addFacilityAdminUser( + facility: number, + user: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public addFacilityAdminUser( + facility: number, + user: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public addFacilityAdminUser( + facility: number, + user: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling addFacilityAdminUser.' + ); + } + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling addFacilityAdminUser.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/addAdmin/user`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Adds a user as a Facility admin. + * @param facility name of Facility + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addFacilityAdminUserByFacilityName( + facility: string, + user: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public addFacilityAdminUserByFacilityName( + facility: string, + user: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public addFacilityAdminUserByFacilityName( + facility: string, + user: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public addFacilityAdminUserByFacilityName( + facility: string, + user: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling addFacilityAdminUserByFacilityName.' + ); + } + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling addFacilityAdminUserByFacilityName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/addAdmin/user/f-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Adds owner of a facility. + * @param facility id of Facility + * @param owner id of Owner + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addFacilityOwner( + facility: number, + owner: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public addFacilityOwner( + facility: number, + owner: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public addFacilityOwner( + facility: number, + owner: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public addFacilityOwner( + facility: number, + owner: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling addFacilityOwner.' + ); + } + if (owner === null || owner === undefined) { + throw new Error( + 'Required parameter owner was null or undefined when calling addFacilityOwner.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (owner !== undefined && owner !== null) { + queryParameters = queryParameters.set('owner', owner); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/addOwner`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Adds owner of a facility. + * @param facility name of Facility + * @param owner id of Owner + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addFacilityOwnerByFacilityName( + facility: string, + owner: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public addFacilityOwnerByFacilityName( + facility: string, + owner: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public addFacilityOwnerByFacilityName( + facility: string, + owner: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public addFacilityOwnerByFacilityName( + facility: string, + owner: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling addFacilityOwnerByFacilityName.' + ); + } + if (owner === null || owner === undefined) { + throw new Error( + 'Required parameter owner was null or undefined when calling addFacilityOwnerByFacilityName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (owner !== undefined && owner !== null) { + queryParameters = queryParameters.set('owner', owner); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/addOwner/f-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Adds owner of a facility. + * @param facility name of Facility + * @param owner name of Owner + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addFacilityOwnerByFacilityNameOwnerName( + facility: string, + owner: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public addFacilityOwnerByFacilityNameOwnerName( + facility: string, + owner: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public addFacilityOwnerByFacilityNameOwnerName( + facility: string, + owner: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public addFacilityOwnerByFacilityNameOwnerName( + facility: string, + owner: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling addFacilityOwnerByFacilityNameOwnerName.' + ); + } + if (owner === null || owner === undefined) { + throw new Error( + 'Required parameter owner was null or undefined when calling addFacilityOwnerByFacilityNameOwnerName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (owner !== undefined && owner !== null) { + queryParameters = queryParameters.set('owner', owner); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/addOwner/f-o-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Adds owner of a facility. + * @param facility id of Facility + * @param owner name of Owner + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addFacilityOwnerByOwnerName( + facility: number, + owner: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public addFacilityOwnerByOwnerName( + facility: number, + owner: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public addFacilityOwnerByOwnerName( + facility: number, + owner: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public addFacilityOwnerByOwnerName( + facility: number, + owner: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling addFacilityOwnerByOwnerName.' + ); + } + if (owner === null || owner === undefined) { + throw new Error( + 'Required parameter owner was null or undefined when calling addFacilityOwnerByOwnerName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (owner !== undefined && owner !== null) { + queryParameters = queryParameters.set('owner', owner); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/addOwner/o-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Adds a host to the Facility. + * InvalidHostnameException is thrown when host has invalid hostname. + * @param facility id of Facility + * @param hostname DNS name of host + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addHost( + facility: number, + hostname: string, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public addHost( + facility: number, + hostname: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public addHost( + facility: number, + hostname: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public addHost( + facility: number, + hostname: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling addHost.'); + } + if (hostname === null || hostname === undefined) { + throw new Error('Required parameter hostname was null or undefined when calling addHost.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (hostname !== undefined && hostname !== null) { + queryParameters = queryParameters.set('hostname', hostname); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post>( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/addHost`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Adds a host to the Facility. + * InvalidHostnameException is thrown when host has invalid hostname. + * @param facility name of Facility + * @param hostname DNS name of host + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addHostByFacilityName( + facility: string, + hostname: string, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public addHostByFacilityName( + facility: string, + hostname: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public addHostByFacilityName( + facility: string, + hostname: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public addHostByFacilityName( + facility: string, + hostname: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling addHostByFacilityName.' + ); + } + if (hostname === null || hostname === undefined) { + throw new Error( + 'Required parameter hostname was null or undefined when calling addHostByFacilityName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (hostname !== undefined && hostname !== null) { + queryParameters = queryParameters.set('hostname', hostname); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post>( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/addHost/f-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Adds hosts to the Facility. + * InvalidHostnameException is thrown when any host has invalid hostname. + * @param facility id of Facility + * @param hostnames list of host names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addHosts( + facility: number, + hostnames: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public addHosts( + facility: number, + hostnames: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public addHosts( + facility: number, + hostnames: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public addHosts( + facility: number, + hostnames: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling addHosts.'); + } + if (hostnames === null || hostnames === undefined) { + throw new Error('Required parameter hostnames was null or undefined when calling addHosts.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (hostnames) { + hostnames.forEach((element) => { + queryParameters = queryParameters.append('hostnames[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post>( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/addHosts`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Adds hosts to the Facility. + * InvalidHostnameException is thrown when any host has invalid hostname. + * @param facility name of Facility + * @param hostnames list of host names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addHostsByFacilityName( + facility: string, + hostnames: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public addHostsByFacilityName( + facility: string, + hostnames: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public addHostsByFacilityName( + facility: string, + hostnames: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public addHostsByFacilityName( + facility: string, + hostnames: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling addHostsByFacilityName.' + ); + } + if (hostnames === null || hostnames === undefined) { + throw new Error( + 'Required parameter hostnames was null or undefined when calling addHostsByFacilityName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (hostnames) { + hostnames.forEach((element) => { + queryParameters = queryParameters.append('hostnames[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post>( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/addHosts/f-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Assign given security team to given facility (means the facility trusts the security team) + * @param facility id of Facility + * @param securityTeam SecurityTeam id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public assignSecurityTeam( + facility: number, + securityTeam: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public assignSecurityTeam( + facility: number, + securityTeam: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public assignSecurityTeam( + facility: number, + securityTeam: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public assignSecurityTeam( + facility: number, + securityTeam: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling assignSecurityTeam.' + ); + } + if (securityTeam === null || securityTeam === undefined) { + throw new Error( + 'Required parameter securityTeam was null or undefined when calling assignSecurityTeam.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (securityTeam !== undefined && securityTeam !== null) { + queryParameters = queryParameters.set('securityTeam', securityTeam); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/assignSecurityTeam`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Assign given security team to given facility (means the facility trusts the security team) + * @param facility name of Facility + * @param securityTeam SecurityTeam id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public assignSecurityTeamByFacilityName( + facility: string, + securityTeam: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public assignSecurityTeamByFacilityName( + facility: string, + securityTeam: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public assignSecurityTeamByFacilityName( + facility: string, + securityTeam: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public assignSecurityTeamByFacilityName( + facility: string, + securityTeam: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling assignSecurityTeamByFacilityName.' + ); + } + if (securityTeam === null || securityTeam === undefined) { + throw new Error( + 'Required parameter securityTeam was null or undefined when calling assignSecurityTeamByFacilityName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (securityTeam !== undefined && securityTeam !== null) { + queryParameters = queryParameters.set('securityTeam', securityTeam); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/assignSecurityTeam/f-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Copy attributes (settings) from source facility to destination facility. You must be facility manager of both. + * @param srcFacility source facility id + * @param destFacility destination facility id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyAttributes( + srcFacility: number, + destFacility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public copyAttributes( + srcFacility: number, + destFacility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public copyAttributes( + srcFacility: number, + destFacility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public copyAttributes( + srcFacility: number, + destFacility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (srcFacility === null || srcFacility === undefined) { + throw new Error( + 'Required parameter srcFacility was null or undefined when calling copyAttributes.' + ); + } + if (destFacility === null || destFacility === undefined) { + throw new Error( + 'Required parameter destFacility was null or undefined when calling copyAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (srcFacility !== undefined && srcFacility !== null) { + queryParameters = queryParameters.set('srcFacility', srcFacility); + } + if (destFacility !== undefined && destFacility !== null) { + queryParameters = queryParameters.set('destFacility', destFacility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyAttributes`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Copy attributes (settings) from source facility to destination facility. You must be facility manager of both. + * @param srcFacility source facility id + * @param destFacilityName destination facility name + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyAttributesByDestinationName( + srcFacility: number, + destFacilityName: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public copyAttributesByDestinationName( + srcFacility: number, + destFacilityName: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public copyAttributesByDestinationName( + srcFacility: number, + destFacilityName: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public copyAttributesByDestinationName( + srcFacility: number, + destFacilityName: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (srcFacility === null || srcFacility === undefined) { + throw new Error( + 'Required parameter srcFacility was null or undefined when calling copyAttributesByDestinationName.' + ); + } + if (destFacilityName === null || destFacilityName === undefined) { + throw new Error( + 'Required parameter destFacilityName was null or undefined when calling copyAttributesByDestinationName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (srcFacility !== undefined && srcFacility !== null) { + queryParameters = queryParameters.set('srcFacility', srcFacility); + } + if (destFacilityName !== undefined && destFacilityName !== null) { + queryParameters = queryParameters.set('destFacilityName', destFacilityName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyAttributes/dest-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Copy attributes (settings) from source facility to destination facility. You must be facility manager of both. + * @param srcFacilityName source facility name + * @param destFacilityName destination facility name + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyAttributesBySourceDestinationNames( + srcFacilityName: string, + destFacilityName: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public copyAttributesBySourceDestinationNames( + srcFacilityName: string, + destFacilityName: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public copyAttributesBySourceDestinationNames( + srcFacilityName: string, + destFacilityName: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public copyAttributesBySourceDestinationNames( + srcFacilityName: string, + destFacilityName: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (srcFacilityName === null || srcFacilityName === undefined) { + throw new Error( + 'Required parameter srcFacilityName was null or undefined when calling copyAttributesBySourceDestinationNames.' + ); + } + if (destFacilityName === null || destFacilityName === undefined) { + throw new Error( + 'Required parameter destFacilityName was null or undefined when calling copyAttributesBySourceDestinationNames.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (srcFacilityName !== undefined && srcFacilityName !== null) { + queryParameters = queryParameters.set('srcFacilityName', srcFacilityName); + } + if (destFacilityName !== undefined && destFacilityName !== null) { + queryParameters = queryParameters.set('destFacilityName', destFacilityName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyAttributes/src-dest-names`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Copy attributes (settings) from source facility to destination facility. You must be facility manager of both. + * @param srcFacilityName source facility name + * @param destFacility destination facility id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyAttributesBySourceName( + srcFacilityName: string, + destFacility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public copyAttributesBySourceName( + srcFacilityName: string, + destFacility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public copyAttributesBySourceName( + srcFacilityName: string, + destFacility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public copyAttributesBySourceName( + srcFacilityName: string, + destFacility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (srcFacilityName === null || srcFacilityName === undefined) { + throw new Error( + 'Required parameter srcFacilityName was null or undefined when calling copyAttributesBySourceName.' + ); + } + if (destFacility === null || destFacility === undefined) { + throw new Error( + 'Required parameter destFacility was null or undefined when calling copyAttributesBySourceName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (srcFacilityName !== undefined && srcFacilityName !== null) { + queryParameters = queryParameters.set('srcFacilityName', srcFacilityName); + } + if (destFacility !== undefined && destFacility !== null) { + queryParameters = queryParameters.set('destFacility', destFacility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyAttributes/src-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Copy managers from source facility to destination facility. You must be facility manager of both. + * @param srcFacility source facility id + * @param destFacility destination facility id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyManagers( + srcFacility: number, + destFacility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public copyManagers( + srcFacility: number, + destFacility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public copyManagers( + srcFacility: number, + destFacility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public copyManagers( + srcFacility: number, + destFacility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (srcFacility === null || srcFacility === undefined) { + throw new Error( + 'Required parameter srcFacility was null or undefined when calling copyManagers.' + ); + } + if (destFacility === null || destFacility === undefined) { + throw new Error( + 'Required parameter destFacility was null or undefined when calling copyManagers.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (srcFacility !== undefined && srcFacility !== null) { + queryParameters = queryParameters.set('srcFacility', srcFacility); + } + if (destFacility !== undefined && destFacility !== null) { + queryParameters = queryParameters.set('destFacility', destFacility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyManagers`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Copy managers from source facility to destination facility. You must be facility manager of both. + * @param srcFacility source facility id + * @param destFacilityName destination facility name + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyManagersByDestinationName( + srcFacility: number, + destFacilityName: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public copyManagersByDestinationName( + srcFacility: number, + destFacilityName: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public copyManagersByDestinationName( + srcFacility: number, + destFacilityName: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public copyManagersByDestinationName( + srcFacility: number, + destFacilityName: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (srcFacility === null || srcFacility === undefined) { + throw new Error( + 'Required parameter srcFacility was null or undefined when calling copyManagersByDestinationName.' + ); + } + if (destFacilityName === null || destFacilityName === undefined) { + throw new Error( + 'Required parameter destFacilityName was null or undefined when calling copyManagersByDestinationName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (srcFacility !== undefined && srcFacility !== null) { + queryParameters = queryParameters.set('srcFacility', srcFacility); + } + if (destFacilityName !== undefined && destFacilityName !== null) { + queryParameters = queryParameters.set('destFacilityName', destFacilityName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyManagers/dest-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Copy managers from source facility to destination facility. You must be facility manager of both. + * @param srcFacilityName source facility name + * @param destFacilityName destination facility name + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyManagersBySourceDestinationNames( + srcFacilityName: string, + destFacilityName: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public copyManagersBySourceDestinationNames( + srcFacilityName: string, + destFacilityName: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public copyManagersBySourceDestinationNames( + srcFacilityName: string, + destFacilityName: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public copyManagersBySourceDestinationNames( + srcFacilityName: string, + destFacilityName: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (srcFacilityName === null || srcFacilityName === undefined) { + throw new Error( + 'Required parameter srcFacilityName was null or undefined when calling copyManagersBySourceDestinationNames.' + ); + } + if (destFacilityName === null || destFacilityName === undefined) { + throw new Error( + 'Required parameter destFacilityName was null or undefined when calling copyManagersBySourceDestinationNames.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (srcFacilityName !== undefined && srcFacilityName !== null) { + queryParameters = queryParameters.set('srcFacilityName', srcFacilityName); + } + if (destFacilityName !== undefined && destFacilityName !== null) { + queryParameters = queryParameters.set('destFacilityName', destFacilityName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyManagers/src-dest-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Copy managers from source facility to destination facility. You must be facility manager of both. + * @param srcFacilityName source facility name + * @param destFacility destination facility id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyManagersBySourceName( + srcFacilityName: string, + destFacility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public copyManagersBySourceName( + srcFacilityName: string, + destFacility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public copyManagersBySourceName( + srcFacilityName: string, + destFacility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public copyManagersBySourceName( + srcFacilityName: string, + destFacility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (srcFacilityName === null || srcFacilityName === undefined) { + throw new Error( + 'Required parameter srcFacilityName was null or undefined when calling copyManagersBySourceName.' + ); + } + if (destFacility === null || destFacility === undefined) { + throw new Error( + 'Required parameter destFacility was null or undefined when calling copyManagersBySourceName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (srcFacilityName !== undefined && srcFacilityName !== null) { + queryParameters = queryParameters.set('srcFacilityName', srcFacilityName); + } + if (destFacility !== undefined && destFacility !== null) { + queryParameters = queryParameters.set('destFacility', destFacility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyManagers/src-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Copy owners from source facility to destination facility. You must be facility manager of both. + * @param srcFacility source facility id + * @param destFacility destination facility id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyOwners( + srcFacility: number, + destFacility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public copyOwners( + srcFacility: number, + destFacility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public copyOwners( + srcFacility: number, + destFacility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public copyOwners( + srcFacility: number, + destFacility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (srcFacility === null || srcFacility === undefined) { + throw new Error( + 'Required parameter srcFacility was null or undefined when calling copyOwners.' + ); + } + if (destFacility === null || destFacility === undefined) { + throw new Error( + 'Required parameter destFacility was null or undefined when calling copyOwners.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (srcFacility !== undefined && srcFacility !== null) { + queryParameters = queryParameters.set('srcFacility', srcFacility); + } + if (destFacility !== undefined && destFacility !== null) { + queryParameters = queryParameters.set('destFacility', destFacility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyOwners`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Copy owners from source facility to destination facility. You must be facility manager of both. + * @param srcFacility source facility id + * @param destFacilityName destination facility name + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyOwnersByDestinationName( + srcFacility: number, + destFacilityName: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public copyOwnersByDestinationName( + srcFacility: number, + destFacilityName: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public copyOwnersByDestinationName( + srcFacility: number, + destFacilityName: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public copyOwnersByDestinationName( + srcFacility: number, + destFacilityName: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (srcFacility === null || srcFacility === undefined) { + throw new Error( + 'Required parameter srcFacility was null or undefined when calling copyOwnersByDestinationName.' + ); + } + if (destFacilityName === null || destFacilityName === undefined) { + throw new Error( + 'Required parameter destFacilityName was null or undefined when calling copyOwnersByDestinationName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (srcFacility !== undefined && srcFacility !== null) { + queryParameters = queryParameters.set('srcFacility', srcFacility); + } + if (destFacilityName !== undefined && destFacilityName !== null) { + queryParameters = queryParameters.set('destFacilityName', destFacilityName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyOwners/dest-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Copy owners from source facility to destination facility. You must be facility manager of both. + * @param srcFacilityName source facility name + * @param destFacilityName destination facility name + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyOwnersBySourceDestinationNames( + srcFacilityName: string, + destFacilityName: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public copyOwnersBySourceDestinationNames( + srcFacilityName: string, + destFacilityName: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public copyOwnersBySourceDestinationNames( + srcFacilityName: string, + destFacilityName: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public copyOwnersBySourceDestinationNames( + srcFacilityName: string, + destFacilityName: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (srcFacilityName === null || srcFacilityName === undefined) { + throw new Error( + 'Required parameter srcFacilityName was null or undefined when calling copyOwnersBySourceDestinationNames.' + ); + } + if (destFacilityName === null || destFacilityName === undefined) { + throw new Error( + 'Required parameter destFacilityName was null or undefined when calling copyOwnersBySourceDestinationNames.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (srcFacilityName !== undefined && srcFacilityName !== null) { + queryParameters = queryParameters.set('srcFacilityName', srcFacilityName); + } + if (destFacilityName !== undefined && destFacilityName !== null) { + queryParameters = queryParameters.set('destFacilityName', destFacilityName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyOwners/src-dest-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Copy owners from source facility to destination facility. You must be facility manager of both. + * @param srcFacilityName source facility name + * @param destFacility destination facility id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyOwnersBySourceName( + srcFacilityName: string, + destFacility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public copyOwnersBySourceName( + srcFacilityName: string, + destFacility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public copyOwnersBySourceName( + srcFacilityName: string, + destFacility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public copyOwnersBySourceName( + srcFacilityName: string, + destFacility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (srcFacilityName === null || srcFacilityName === undefined) { + throw new Error( + 'Required parameter srcFacilityName was null or undefined when calling copyOwnersBySourceName.' + ); + } + if (destFacility === null || destFacility === undefined) { + throw new Error( + 'Required parameter destFacility was null or undefined when calling copyOwnersBySourceName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (srcFacilityName !== undefined && srcFacilityName !== null) { + queryParameters = queryParameters.set('srcFacilityName', srcFacilityName); + } + if (destFacility !== undefined && destFacility !== null) { + queryParameters = queryParameters.set('destFacility', destFacility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyOwners/src-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Creates a facility. Caller is automatically set as facility manager. + * @param name name of entity + * @param description optional description of a facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createFacility( + name: string, + description?: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public createFacility( + name: string, + description?: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public createFacility( + name: string, + description?: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public createFacility( + name: string, + description?: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling createFacility.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (name !== undefined && name !== null) { + queryParameters = queryParameters.set('name', name); + } + if (description !== undefined && description !== null) { + queryParameters = queryParameters.set('description', description); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/createFacility`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Deletes a facility. + * @param facility id of Facility + * @param force If true, delete entity forcefully. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteFacility( + facility: number, + force?: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public deleteFacility( + facility: number, + force?: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public deleteFacility( + facility: number, + force?: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public deleteFacility( + facility: number, + force?: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling deleteFacility.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (force !== undefined && force !== null) { + queryParameters = queryParameters.set('force', force); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/deleteFacility`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Deletes a facility. + * @param facility name of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteFacilityByFacilityName( + facility: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public deleteFacilityByFacilityName( + facility: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public deleteFacilityByFacilityName( + facility: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public deleteFacilityByFacilityName( + facility: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling deleteFacilityByFacilityName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/deleteFacility/f-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all facilities. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllFacilities(observe?: 'body', reportProgress?: boolean): Observable>; + public getAllFacilities( + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllFacilities( + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAllFacilities(observe: any = 'body', reportProgress: boolean = false): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getFacilities`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all assigned groups on Facility, optionally filtered by Vo or Service or both. + * @param facility id of Facility + * @param vo id of Vo + * @param service id of Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllowedGroups( + facility: number, + vo?: number, + service?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAllowedGroups( + facility: number, + vo?: number, + service?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllowedGroups( + facility: number, + vo?: number, + service?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAllowedGroups( + facility: number, + vo?: number, + service?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getAllowedGroups.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getAllowedGroups`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all assigned groups on Facility, optionally filtered by Vo or Service or both. + * @param facility name of Facility + * @param vo id of Vo + * @param service id of Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllowedGroupsByFacilityName( + facility: string, + vo?: number, + service?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAllowedGroupsByFacilityName( + facility: string, + vo?: number, + service?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllowedGroupsByFacilityName( + facility: string, + vo?: number, + service?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAllowedGroupsByFacilityName( + facility: string, + vo?: number, + service?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getAllowedGroupsByFacilityName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getAllowedGroups/f-name`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all assigned RichGroups on Facility with specified set of attributes, optionally filtered by Vo or Service or both. + * @param facility id of Facility + * @param attrNames list of attribute names List<String> + * @param vo id of Vo + * @param service id of Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllowedRichGroupsWithAttributes( + facility: number, + attrNames: Array, + vo?: number, + service?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAllowedRichGroupsWithAttributes( + facility: number, + attrNames: Array, + vo?: number, + service?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllowedRichGroupsWithAttributes( + facility: number, + attrNames: Array, + vo?: number, + service?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAllowedRichGroupsWithAttributes( + facility: number, + attrNames: Array, + vo?: number, + service?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getAllowedRichGroupsWithAttributes.' + ); + } + if (attrNames === null || attrNames === undefined) { + throw new Error( + 'Required parameter attrNames was null or undefined when calling getAllowedRichGroupsWithAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getAllowedRichGroupsWithAttributes`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all assigned RichGroups on Facility with specified set of attributes, optionally filtered by Vo or Service or both. + * @param facility name of Facility + * @param attrNames list of attribute names List<String> + * @param vo id of Vo + * @param service id of Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllowedRichGroupsWithAttributesByFacilityName( + facility: string, + attrNames: Array, + vo?: number, + service?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAllowedRichGroupsWithAttributesByFacilityName( + facility: string, + attrNames: Array, + vo?: number, + service?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllowedRichGroupsWithAttributesByFacilityName( + facility: string, + attrNames: Array, + vo?: number, + service?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAllowedRichGroupsWithAttributesByFacilityName( + facility: string, + attrNames: Array, + vo?: number, + service?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getAllowedRichGroupsWithAttributesByFacilityName.' + ); + } + if (attrNames === null || attrNames === undefined) { + throw new Error( + 'Required parameter attrNames was null or undefined when calling getAllowedRichGroupsWithAttributesByFacilityName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getAllowedRichGroupsWithAttributes/f-name`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Return all users which can use this facility + * @param facility id of Facility + * @param vo VO id, if provided, filter out users who aren\'t in specific VO + * @param service Service id, if provided, filter out users who aren\'t allowed to use the service on the facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllowedUsersOfFacility( + facility: number, + vo?: number, + service?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAllowedUsersOfFacility( + facility: number, + vo?: number, + service?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllowedUsersOfFacility( + facility: number, + vo?: number, + service?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAllowedUsersOfFacility( + facility: number, + vo?: number, + service?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getAllowedUsersOfFacility.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getAllowedUsers/v-f-s`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Return all users which can use this facility + * @param facility name of Facility + * @param vo VO id, if provided, filter out users who aren\'t in specific VO + * @param service Service id, if provided, filter out users who aren\'t allowed to use the service on the facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllowedUsersOfFacilityByFacilityName( + facility: string, + vo?: number, + service?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAllowedUsersOfFacilityByFacilityName( + facility: string, + vo?: number, + service?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllowedUsersOfFacilityByFacilityName( + facility: string, + vo?: number, + service?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAllowedUsersOfFacilityByFacilityName( + facility: string, + vo?: number, + service?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getAllowedUsersOfFacilityByFacilityName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getAllowedUsers/v-f-s/f-name`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Return all VO which can use a facility. (VO must have the resource which belongs to this facility.) + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllowedVos( + facility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAllowedVos( + facility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllowedVos( + facility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAllowedVos( + facility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getAllowedVos.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post>( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/getAllowedVos`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Return all VO which can use a facility. (VO must have the resource which belongs to this facility.) + * @param facility name of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllowedVosByFacilityName( + facility: string, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAllowedVosByFacilityName( + facility: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllowedVosByFacilityName( + facility: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAllowedVosByFacilityName( + facility: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getAllowedVosByFacilityName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post>( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/getAllowedVos/f-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get facilities which are assigned to a Group (via resource). + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedFacilitiesByGroup( + group: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAssignedFacilitiesByGroup( + group: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAssignedFacilitiesByGroup( + group: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAssignedFacilitiesByGroup( + group: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getAssignedFacilitiesByGroup.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getAssignedFacilities/group`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get facilities which have the member access on. + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedFacilitiesByMember( + member: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAssignedFacilitiesByMember( + member: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAssignedFacilitiesByMember( + member: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAssignedFacilitiesByMember( + member: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getAssignedFacilitiesByMember.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getAssignedFacilities/member`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get facilities where the service is defined.. + * @param service id of Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedFacilitiesByService( + service: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAssignedFacilitiesByService( + service: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAssignedFacilitiesByService( + service: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAssignedFacilitiesByService( + service: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling getAssignedFacilitiesByService.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getAssignedFacilities/service`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * et facilities which have the user access on. + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedFacilitiesByUser( + user: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAssignedFacilitiesByUser( + user: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAssignedFacilitiesByUser( + user: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAssignedFacilitiesByUser( + user: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling getAssignedFacilitiesByUser.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getAssignedFacilities/user`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns resources with specific service assigned to the facility. + * @param facility id of Facility + * @param service id of Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedResourcesByAssignedServiceForFacility( + facility: number, + service: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAssignedResourcesByAssignedServiceForFacility( + facility: number, + service: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAssignedResourcesByAssignedServiceForFacility( + facility: number, + service: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAssignedResourcesByAssignedServiceForFacility( + facility: number, + service: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getAssignedResourcesByAssignedServiceForFacility.' + ); + } + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling getAssignedResourcesByAssignedServiceForFacility.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getAssignedResourcesByAssignedService`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns all resources assigned to a facility. + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedResourcesForFacility( + facility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAssignedResourcesForFacility( + facility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAssignedResourcesForFacility( + facility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAssignedResourcesForFacility( + facility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getAssignedResourcesForFacility.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getAssignedResources`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns all resources assigned to a facility. + * @param facility name of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedResourcesForFacilityByFacilityName( + facility: string, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAssignedResourcesForFacilityByFacilityName( + facility: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAssignedResourcesForFacilityByFacilityName( + facility: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAssignedResourcesForFacilityByFacilityName( + facility: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getAssignedResourcesForFacilityByFacilityName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getAssignedResources/f-name`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns all rich resources assigned to a facility with VO property filled. + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedRichResourcesForFacility( + facility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAssignedRichResourcesForFacility( + facility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAssignedRichResourcesForFacility( + facility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAssignedRichResourcesForFacility( + facility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getAssignedRichResourcesForFacility.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getAssignedRichResources`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns all rich resources assigned to a facility with VO property filled. + * @param facility name of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedRichResourcesForFacilityByFacilityName( + facility: string, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAssignedRichResourcesForFacilityByFacilityName( + facility: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAssignedRichResourcesForFacilityByFacilityName( + facility: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAssignedRichResourcesForFacilityByFacilityName( + facility: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getAssignedRichResourcesForFacilityByFacilityName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getAssignedRichResources/f-name`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Return assigned security teams for specific facility + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedSecurityTeams( + facility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAssignedSecurityTeams( + facility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAssignedSecurityTeams( + facility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAssignedSecurityTeams( + facility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getAssignedSecurityTeams.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getAssignedSecurityTeams`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Return assigned security teams for specific facility + * @param facility name of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedSecurityTeamsByFacilityName( + facility: string, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAssignedSecurityTeamsByFacilityName( + facility: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAssignedSecurityTeamsByFacilityName( + facility: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAssignedSecurityTeamsByFacilityName( + facility: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getAssignedSecurityTeamsByFacilityName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getAssignedSecurityTeams/f-name`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Lists all users assigned to facility containing resources where service is assigned. + * @param facility id of Facility + * @param service id of Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedUsers( + facility: number, + service?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAssignedUsers( + facility: number, + service?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAssignedUsers( + facility: number, + service?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAssignedUsers( + facility: number, + service?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getAssignedUsers.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getAssignedUsers`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Lists all users assigned to facility containing resources where service is assigned. + * @param facility name of Facility + * @param service id of Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedUsersByFacilityName( + facility: string, + service?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAssignedUsersByFacilityName( + facility: string, + service?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAssignedUsersByFacilityName( + facility: string, + service?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAssignedUsersByFacilityName( + facility: string, + service?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getAssignedUsersByFacilityName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getAssignedUsers/f-name`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all bans for user on the facility. + * @param facilityId id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getBansForFacility( + facilityId: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getBansForFacility( + facilityId: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getBansForFacility( + facilityId: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getBansForFacility( + facilityId: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facilityId === null || facilityId === undefined) { + throw new Error( + 'Required parameter facilityId was null or undefined when calling getBansForFacility.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facilityId !== undefined && facilityId !== null) { + queryParameters = queryParameters.set('facilityId', facilityId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getBansForFacility`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all bans for user on any facility. + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getBansForUser( + user: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getBansForUser( + user: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getBansForUser( + user: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getBansForUser( + user: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getBansForUser.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getBansForUser`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets all enriched facilities user has access rights to. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getEnrichedFacilities( + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getEnrichedFacilities( + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getEnrichedFacilities( + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getEnrichedFacilities( + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getEnrichedFacilities`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Return all enriched hosts of given facility. That is host with all its attributes. + * @param facility id of Facility + * @param attrNames list of attribute names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getEnrichedHosts( + facility: number, + attrNames: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getEnrichedHosts( + facility: number, + attrNames: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getEnrichedHosts( + facility: number, + attrNames: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getEnrichedHosts( + facility: number, + attrNames: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getEnrichedHosts.' + ); + } + if (attrNames === null || attrNames === undefined) { + throw new Error( + 'Required parameter attrNames was null or undefined when calling getEnrichedHosts.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getEnrichedHosts`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns all facilities that have the attribute \'attributeName\' with the string value \'attributeValue\'. + * Searching only def and opt attributes. Large attributes are not supported. + * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) + * @param attributeValue string value of Attribute + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilitiesByAttribute( + attributeName: string, + attributeValue: string, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getFacilitiesByAttribute( + attributeName: string, + attributeValue: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getFacilitiesByAttribute( + attributeName: string, + attributeValue: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getFacilitiesByAttribute( + attributeName: string, + attributeValue: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (attributeName === null || attributeName === undefined) { + throw new Error( + 'Required parameter attributeName was null or undefined when calling getFacilitiesByAttribute.' + ); + } + if (attributeValue === null || attributeValue === undefined) { + throw new Error( + 'Required parameter attributeValue was null or undefined when calling getFacilitiesByAttribute.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (attributeName !== undefined && attributeName !== null) { + queryParameters = queryParameters.set('attributeName', attributeName); + } + if (attributeValue !== undefined && attributeValue !== null) { + queryParameters = queryParameters.set('attributeValue', attributeValue); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getFacilitiesByAttribute`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Searches for the Facilities by theirs destination. + * @param destination string name of destination + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilitiesByDestination( + destination: string, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getFacilitiesByDestination( + destination: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getFacilitiesByDestination( + destination: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getFacilitiesByDestination( + destination: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (destination === null || destination === undefined) { + throw new Error( + 'Required parameter destination was null or undefined when calling getFacilitiesByDestination.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (destination !== undefined && destination !== null) { + queryParameters = queryParameters.set('destination', destination); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getFacilitiesByDestination`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Return all facilities where exists host with the specific hostname + * @param hostname specific hostname + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilitiesByHostName( + hostname: string, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getFacilitiesByHostName( + hostname: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getFacilitiesByHostName( + hostname: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getFacilitiesByHostName( + hostname: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (hostname === null || hostname === undefined) { + throw new Error( + 'Required parameter hostname was null or undefined when calling getFacilitiesByHostName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (hostname !== undefined && hostname !== null) { + queryParameters = queryParameters.set('hostname', hostname); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getFacilitiesByHostName`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns list of Facilities by their ids. + * @param ids list of ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilitiesByIds( + ids: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getFacilitiesByIds( + ids: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getFacilitiesByIds( + ids: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getFacilitiesByIds( + ids: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (ids === null || ids === undefined) { + throw new Error( + 'Required parameter ids was null or undefined when calling getFacilitiesByIds.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (ids) { + ids.forEach((element) => { + queryParameters = queryParameters.append('ids[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getFacilitiesByIds`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets count of all facilities. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilitiesCount(observe?: 'body', reportProgress?: boolean): Observable; + public getFacilitiesCount( + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getFacilitiesCount( + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getFacilitiesCount( + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/facilitiesManager/getFacilitiesCount`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns list of Facilities, where the user is a direct Administrator or a VALID member of an administrator group. + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilitiesWhereUserIsAdmin( + user: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getFacilitiesWhereUserIsAdmin( + user: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getFacilitiesWhereUserIsAdmin( + user: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getFacilitiesWhereUserIsAdmin( + user: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling getFacilitiesWhereUserIsAdmin.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getFacilitiesWhereUserIsAdmin`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all Facility group admins. + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityAdminGroups( + facility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getFacilityAdminGroups( + facility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getFacilityAdminGroups( + facility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getFacilityAdminGroups( + facility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getFacilityAdminGroups.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getAdminGroups`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get list of all facility administrators for supported role and given facility. If onlyDirectAdmins is true, return only direct admins of the group for supported role. Includes users who are VALID members of administrator groups. Supported roles: FacilityAdmin + * @param facility id of Facility + * @param onlyDirectAdmins if true, get only direct facility administrators (if false, get both direct and indirect) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityAdminUsers( + facility: number, + onlyDirectAdmins: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getFacilityAdminUsers( + facility: number, + onlyDirectAdmins: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getFacilityAdminUsers( + facility: number, + onlyDirectAdmins: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getFacilityAdminUsers( + facility: number, + onlyDirectAdmins: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getFacilityAdminUsers.' + ); + } + if (onlyDirectAdmins === null || onlyDirectAdmins === undefined) { + throw new Error( + 'Required parameter onlyDirectAdmins was null or undefined when calling getFacilityAdminUsers.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (onlyDirectAdmins !== undefined && onlyDirectAdmins !== null) { + queryParameters = queryParameters.set('onlyDirectAdmins', onlyDirectAdmins); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getAdmins`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get list of all facility administrators for supported role and given facility. If onlyDirectAdmins is true, return only direct admins of the group for supported role. Includes users who are VALID members of administrator groups. Supported roles: FacilityAdmin + * @param facility name of Facility + * @param onlyDirectAdmins if true, get only direct facility administrators (if false, get both direct and indirect) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityAdminUsersByFacilityName( + facility: string, + onlyDirectAdmins: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getFacilityAdminUsersByFacilityName( + facility: string, + onlyDirectAdmins: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getFacilityAdminUsersByFacilityName( + facility: string, + onlyDirectAdmins: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getFacilityAdminUsersByFacilityName( + facility: string, + onlyDirectAdmins: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getFacilityAdminUsersByFacilityName.' + ); + } + if (onlyDirectAdmins === null || onlyDirectAdmins === undefined) { + throw new Error( + 'Required parameter onlyDirectAdmins was null or undefined when calling getFacilityAdminUsersByFacilityName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (onlyDirectAdmins !== undefined && onlyDirectAdmins !== null) { + queryParameters = queryParameters.set('onlyDirectAdmins', onlyDirectAdmins); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getAdmins/f-name`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get ban by userId and facilityId. + * @param user id of User + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityBan( + user: number, + facility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getFacilityBan( + user: number, + facility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getFacilityBan( + user: number, + facility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getFacilityBan( + user: number, + facility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling getFacilityBan.'); + } + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getFacilityBan.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/facilitiesManager/getBan`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get Ban for user on facility by it\'s id. + * @param banId BanOnFacility id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityBanById( + banId: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getFacilityBanById( + banId: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getFacilityBanById( + banId: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getFacilityBanById( + banId: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (banId === null || banId === undefined) { + throw new Error( + 'Required parameter banId was null or undefined when calling getFacilityBanById.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (banId !== undefined && banId !== null) { + queryParameters = queryParameters.set('banId', banId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/facilitiesManager/getBanById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns Facility with specified id. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityById( + id: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getFacilityById( + id: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getFacilityById( + id: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getFacilityById( + id: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getFacilityById.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/facilitiesManager/getFacilityById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns Facility with specified name. + * @param name name of entity + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityByName( + name: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getFacilityByName( + name: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getFacilityByName( + name: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getFacilityByName( + name: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (name === null || name === undefined) { + throw new Error( + 'Required parameter name was null or undefined when calling getFacilityByName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (name !== undefined && name !== null) { + queryParameters = queryParameters.set('name', name); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/facilitiesManager/getFacilityByName`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Return facility which has the host. + * @param host id of Host + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityForHost( + host: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getFacilityForHost( + host: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getFacilityForHost( + host: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getFacilityForHost( + host: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (host === null || host === undefined) { + throw new Error( + 'Required parameter host was null or undefined when calling getFacilityForHost.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (host !== undefined && host !== null) { + queryParameters = queryParameters.set('host', host); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/facilitiesManager/getFacilityForHost`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns owners of a facility. + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityOwners( + facility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getFacilityOwners( + facility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getFacilityOwners( + facility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getFacilityOwners( + facility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getFacilityOwners.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getOwners`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns owners of a facility. + * @param facility name of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityOwnersByFacilityName( + facility: string, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getFacilityOwnersByFacilityName( + facility: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getFacilityOwnersByFacilityName( + facility: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getFacilityOwnersByFacilityName( + facility: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getFacilityOwnersByFacilityName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getOwners/f-name`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns a host by its id. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getHostById(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public getHostById( + id: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getHostById( + id: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getHostById( + id: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getHostById.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/facilitiesManager/getHostById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns Hosts of a Facility. + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getHosts( + facility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getHosts( + facility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getHosts( + facility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getHosts( + facility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getHosts.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getHosts`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns Hosts of a Facility. + * @param facility name of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getHostsByFacilityName( + facility: string, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getHostsByFacilityName( + facility: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getHostsByFacilityName( + facility: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getHostsByFacilityName( + facility: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getHostsByFacilityName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getHosts/f-name`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns hosts by hostname. (from all facilities) + * @param hostname name of a host + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getHostsByHostname( + hostname: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getHostsByHostname( + hostname: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getHostsByHostname( + hostname: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getHostsByHostname( + hostname: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (hostname === null || hostname === undefined) { + throw new Error( + 'Required parameter hostname was null or undefined when calling getHostsByHostname.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (hostname !== undefined && hostname !== null) { + queryParameters = queryParameters.set('hostname', hostname); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/facilitiesManager/getHostsByHostname`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Count hosts of Facility. + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getHostsCount( + facility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getHostsCount( + facility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getHostsCount( + facility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getHostsCount( + facility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getHostsCount.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/facilitiesManager/getHostsCount`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Count hosts of Facility. + * @param facility name of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getHostsCountByFacilityName( + facility: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getHostsCountByFacilityName( + facility: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getHostsCountByFacilityName( + facility: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getHostsCountByFacilityName( + facility: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getHostsCountByFacilityName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/facilitiesManager/getHostsCount/f-name`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns list of all facilities owned by the owner. + * @param owner id of Owner + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getOwnerFacilities( + owner: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getOwnerFacilities( + owner: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getOwnerFacilities( + owner: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getOwnerFacilities( + owner: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (owner === null || owner === undefined) { + throw new Error( + 'Required parameter owner was null or undefined when calling getOwnerFacilities.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (owner !== undefined && owner !== null) { + queryParameters = queryParameters.set('owner', owner); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getOwnerFacilities`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets all possible rich facilities with all their owners. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRichFacilities( + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getRichFacilities( + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getRichFacilities( + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getRichFacilities( + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getRichFacilities`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove specific ban by userId and facilityId. + * @param user id of User + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeBanByUserIdFacilityId( + user: number, + facility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeBanByUserIdFacilityId( + user: number, + facility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeBanByUserIdFacilityId( + user: number, + facility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeBanByUserIdFacilityId( + user: number, + facility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling removeBanByUserIdFacilityId.' + ); + } + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling removeBanByUserIdFacilityId.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeBan/byUserIdFacilityId`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Removes a group as a Facility admin. + * @param facility id of Facility + * @param authorizedGroup Group id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeFacilityAdminGroup( + facility: number, + authorizedGroup: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeFacilityAdminGroup( + facility: number, + authorizedGroup: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeFacilityAdminGroup( + facility: number, + authorizedGroup: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeFacilityAdminGroup( + facility: number, + authorizedGroup: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling removeFacilityAdminGroup.' + ); + } + if (authorizedGroup === null || authorizedGroup === undefined) { + throw new Error( + 'Required parameter authorizedGroup was null or undefined when calling removeFacilityAdminGroup.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (authorizedGroup !== undefined && authorizedGroup !== null) { + queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeAdmin/group`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Removes a group as a Facility admin. + * @param facility name of Facility + * @param authorizedGroup Group id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeFacilityAdminGroupByFacilityName( + facility: string, + authorizedGroup: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeFacilityAdminGroupByFacilityName( + facility: string, + authorizedGroup: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeFacilityAdminGroupByFacilityName( + facility: string, + authorizedGroup: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeFacilityAdminGroupByFacilityName( + facility: string, + authorizedGroup: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling removeFacilityAdminGroupByFacilityName.' + ); + } + if (authorizedGroup === null || authorizedGroup === undefined) { + throw new Error( + 'Required parameter authorizedGroup was null or undefined when calling removeFacilityAdminGroupByFacilityName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (authorizedGroup !== undefined && authorizedGroup !== null) { + queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeAdmin/group/f-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Removes a user as a Facility admin. + * @param facility id of Facility + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeFacilityAdminUser( + facility: number, + user: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeFacilityAdminUser( + facility: number, + user: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeFacilityAdminUser( + facility: number, + user: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeFacilityAdminUser( + facility: number, + user: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling removeFacilityAdminUser.' + ); + } + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling removeFacilityAdminUser.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeAdmin/user`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Removes a user as a Facility admin. + * @param facility name of Facility + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeFacilityAdminUserByFacilityName( + facility: string, + user: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeFacilityAdminUserByFacilityName( + facility: string, + user: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeFacilityAdminUserByFacilityName( + facility: string, + user: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeFacilityAdminUserByFacilityName( + facility: string, + user: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling removeFacilityAdminUserByFacilityName.' + ); + } + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling removeFacilityAdminUserByFacilityName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeAdmin/user/f-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove specific ban by it\'s id. + * @param banId BanOnFacility id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeFacilityBanById( + banId: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeFacilityBanById( + banId: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeFacilityBanById( + banId: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeFacilityBanById( + banId: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (banId === null || banId === undefined) { + throw new Error( + 'Required parameter banId was null or undefined when calling removeFacilityBanById.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (banId !== undefined && banId !== null) { + queryParameters = queryParameters.set('banId', banId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeBan/byId`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Removes owner from a facility. + * @param facility id of Facility + * @param owner id of Owner + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeFacilityOwner( + facility: number, + owner: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeFacilityOwner( + facility: number, + owner: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeFacilityOwner( + facility: number, + owner: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeFacilityOwner( + facility: number, + owner: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling removeFacilityOwner.' + ); + } + if (owner === null || owner === undefined) { + throw new Error( + 'Required parameter owner was null or undefined when calling removeFacilityOwner.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (owner !== undefined && owner !== null) { + queryParameters = queryParameters.set('owner', owner); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeOwner`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Removes owner from a facility. + * @param facility name of Facility + * @param owner id of Owner + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeFacilityOwnerByFacilityName( + facility: string, + owner: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeFacilityOwnerByFacilityName( + facility: string, + owner: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeFacilityOwnerByFacilityName( + facility: string, + owner: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeFacilityOwnerByFacilityName( + facility: string, + owner: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling removeFacilityOwnerByFacilityName.' + ); + } + if (owner === null || owner === undefined) { + throw new Error( + 'Required parameter owner was null or undefined when calling removeFacilityOwnerByFacilityName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (owner !== undefined && owner !== null) { + queryParameters = queryParameters.set('owner', owner); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeOwner/f-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Removes owner from a facility. + * @param facility name of Facility + * @param owner name of Owner + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeFacilityOwnerByFacilityNameOwnerName( + facility: string, + owner: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeFacilityOwnerByFacilityNameOwnerName( + facility: string, + owner: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeFacilityOwnerByFacilityNameOwnerName( + facility: string, + owner: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeFacilityOwnerByFacilityNameOwnerName( + facility: string, + owner: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling removeFacilityOwnerByFacilityNameOwnerName.' + ); + } + if (owner === null || owner === undefined) { + throw new Error( + 'Required parameter owner was null or undefined when calling removeFacilityOwnerByFacilityNameOwnerName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (owner !== undefined && owner !== null) { + queryParameters = queryParameters.set('owner', owner); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeOwner/f-o-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Removes owner from a facility. + * @param facility id of Facility + * @param owner name of Owner + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeFacilityOwnerByOwnerName( + facility: number, + owner: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeFacilityOwnerByOwnerName( + facility: number, + owner: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeFacilityOwnerByOwnerName( + facility: number, + owner: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeFacilityOwnerByOwnerName( + facility: number, + owner: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling removeFacilityOwnerByOwnerName.' + ); + } + if (owner === null || owner === undefined) { + throw new Error( + 'Required parameter owner was null or undefined when calling removeFacilityOwnerByOwnerName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (owner !== undefined && owner !== null) { + queryParameters = queryParameters.set('owner', owner); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeOwner/o-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Removes a host. + * @param host id of Host + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeHost(host: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeHost( + host: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeHost( + host: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeHost( + host: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (host === null || host === undefined) { + throw new Error('Required parameter host was null or undefined when calling removeHost.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (host !== undefined && host !== null) { + queryParameters = queryParameters.set('host', host); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeHost`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove host from the Facility based on hostname. If there is ambiguity, method throws exception and no host is removed. + * @param hostname specific hostname + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeHostByHostname( + hostname: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeHostByHostname( + hostname: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeHostByHostname( + hostname: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeHostByHostname( + hostname: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (hostname === null || hostname === undefined) { + throw new Error( + 'Required parameter hostname was null or undefined when calling removeHostByHostname.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (hostname !== undefined && hostname !== null) { + queryParameters = queryParameters.set('hostname', hostname); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeHostByHostname`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove hosts from a Facility. + * @param facility id of Facility + * @param hosts list of host ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeHosts( + facility: number, + hosts: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeHosts( + facility: number, + hosts: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeHosts( + facility: number, + hosts: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeHosts( + facility: number, + hosts: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling removeHosts.' + ); + } + if (hosts === null || hosts === undefined) { + throw new Error('Required parameter hosts was null or undefined when calling removeHosts.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (hosts) { + hosts.forEach((element) => { + queryParameters = queryParameters.append('hosts[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeHosts`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove hosts from a Facility. + * @param facility name of Facility + * @param hosts list of host ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeHostsByFacilityName( + facility: string, + hosts: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeHostsByFacilityName( + facility: string, + hosts: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeHostsByFacilityName( + facility: string, + hosts: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeHostsByFacilityName( + facility: string, + hosts: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling removeHostsByFacilityName.' + ); + } + if (hosts === null || hosts === undefined) { + throw new Error( + 'Required parameter hosts was null or undefined when calling removeHostsByFacilityName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (hosts) { + hosts.forEach((element) => { + queryParameters = queryParameters.append('hosts[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeHosts/f-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove (Unassign) given security team from given facility + * @param facility id of Facility + * @param securityTeam SecurityTeam id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeSecurityTeam( + facility: number, + securityTeam: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeSecurityTeam( + facility: number, + securityTeam: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeSecurityTeam( + facility: number, + securityTeam: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeSecurityTeam( + facility: number, + securityTeam: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling removeSecurityTeam.' + ); + } + if (securityTeam === null || securityTeam === undefined) { + throw new Error( + 'Required parameter securityTeam was null or undefined when calling removeSecurityTeam.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (securityTeam !== undefined && securityTeam !== null) { + queryParameters = queryParameters.set('securityTeam', securityTeam); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeSecurityTeam`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove (Unassign) given security team from given facility + * @param facility name of Facility + * @param securityTeam SecurityTeam id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeSecurityTeamByFacilityName( + facility: string, + securityTeam: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeSecurityTeamByFacilityName( + facility: string, + securityTeam: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeSecurityTeamByFacilityName( + facility: string, + securityTeam: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeSecurityTeamByFacilityName( + facility: string, + securityTeam: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling removeSecurityTeamByFacilityName.' + ); + } + if (securityTeam === null || securityTeam === undefined) { + throw new Error( + 'Required parameter securityTeam was null or undefined when calling removeSecurityTeamByFacilityName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (securityTeam !== undefined && securityTeam !== null) { + queryParameters = queryParameters.set('securityTeam', securityTeam); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeSecurityTeam/f-name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Set ban for user on facility. + * @param inputSetBanForUserOnFacility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setFacilityBan( + inputSetBanForUserOnFacility: InputSetBanForUserOnFacility, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setFacilityBan( + inputSetBanForUserOnFacility: InputSetBanForUserOnFacility, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setFacilityBan( + inputSetBanForUserOnFacility: InputSetBanForUserOnFacility, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setFacilityBan( + inputSetBanForUserOnFacility: InputSetBanForUserOnFacility, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputSetBanForUserOnFacility === null || inputSetBanForUserOnFacility === undefined) { + throw new Error( + 'Required parameter inputSetBanForUserOnFacility was null or undefined when calling setFacilityBan.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/facilitiesManager/setBan`, + inputSetBanForUserOnFacility, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Updates a facility. + * @param inputUpdateFacility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateFacility( + inputUpdateFacility: InputUpdateFacility, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public updateFacility( + inputUpdateFacility: InputUpdateFacility, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public updateFacility( + inputUpdateFacility: InputUpdateFacility, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public updateFacility( + inputUpdateFacility: InputUpdateFacility, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputUpdateFacility === null || inputUpdateFacility === undefined) { + throw new Error( + 'Required parameter inputUpdateFacility was null or undefined when calling updateFacility.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/facilitiesManager/updateFacility`, + inputUpdateFacility, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Update existing ban (description, validation timestamp) + * @param inputUpdateBanForFacility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateFacilityBan( + inputUpdateBanForFacility: InputUpdateBanForFacility, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public updateFacilityBan( + inputUpdateBanForFacility: InputUpdateBanForFacility, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public updateFacilityBan( + inputUpdateBanForFacility: InputUpdateBanForFacility, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public updateFacilityBan( + inputUpdateBanForFacility: InputUpdateBanForFacility, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputUpdateBanForFacility === null || inputUpdateBanForFacility === undefined) { + throw new Error( + 'Required parameter inputUpdateBanForFacility was null or undefined when calling updateFacilityBan.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - - - /** - * Adds a group as a Facility admin. - * @param facility id of Facility - * @param authorizedGroup Group id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addFacilityAdminGroup(facility: number, authorizedGroup: number, observe?: 'body', reportProgress?: boolean): Observable; - public addFacilityAdminGroup(facility: number, authorizedGroup: number, observe?: 'response', reportProgress?: boolean): Observable>; - public addFacilityAdminGroup(facility: number, authorizedGroup: number, observe?: 'events', reportProgress?: boolean): Observable>; - public addFacilityAdminGroup(facility: number, authorizedGroup: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling addFacilityAdminGroup.'); - } - if (authorizedGroup === null || authorizedGroup === undefined) { - throw new Error('Required parameter authorizedGroup was null or undefined when calling addFacilityAdminGroup.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (authorizedGroup !== undefined && authorizedGroup !== null) { - queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/addAdmin/group`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Adds a group as a Facility admin. - * @param facility name of Facility - * @param authorizedGroup Group id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addFacilityAdminGroupByFacilityName(facility: string, authorizedGroup: number, observe?: 'body', reportProgress?: boolean): Observable; - public addFacilityAdminGroupByFacilityName(facility: string, authorizedGroup: number, observe?: 'response', reportProgress?: boolean): Observable>; - public addFacilityAdminGroupByFacilityName(facility: string, authorizedGroup: number, observe?: 'events', reportProgress?: boolean): Observable>; - public addFacilityAdminGroupByFacilityName(facility: string, authorizedGroup: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling addFacilityAdminGroupByFacilityName.'); - } - if (authorizedGroup === null || authorizedGroup === undefined) { - throw new Error('Required parameter authorizedGroup was null or undefined when calling addFacilityAdminGroupByFacilityName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (authorizedGroup !== undefined && authorizedGroup !== null) { - queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/addAdmin/group/f-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Adds a user as a Facility admin. - * @param facility id of Facility - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addFacilityAdminUser(facility: number, user: number, observe?: 'body', reportProgress?: boolean): Observable; - public addFacilityAdminUser(facility: number, user: number, observe?: 'response', reportProgress?: boolean): Observable>; - public addFacilityAdminUser(facility: number, user: number, observe?: 'events', reportProgress?: boolean): Observable>; - public addFacilityAdminUser(facility: number, user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling addFacilityAdminUser.'); - } - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling addFacilityAdminUser.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/addAdmin/user`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Adds a user as a Facility admin. - * @param facility name of Facility - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addFacilityAdminUserByFacilityName(facility: string, user: number, observe?: 'body', reportProgress?: boolean): Observable; - public addFacilityAdminUserByFacilityName(facility: string, user: number, observe?: 'response', reportProgress?: boolean): Observable>; - public addFacilityAdminUserByFacilityName(facility: string, user: number, observe?: 'events', reportProgress?: boolean): Observable>; - public addFacilityAdminUserByFacilityName(facility: string, user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling addFacilityAdminUserByFacilityName.'); - } - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling addFacilityAdminUserByFacilityName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/addAdmin/user/f-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Adds owner of a facility. - * @param facility id of Facility - * @param owner id of Owner - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addFacilityOwner(facility: number, owner: number, observe?: 'body', reportProgress?: boolean): Observable; - public addFacilityOwner(facility: number, owner: number, observe?: 'response', reportProgress?: boolean): Observable>; - public addFacilityOwner(facility: number, owner: number, observe?: 'events', reportProgress?: boolean): Observable>; - public addFacilityOwner(facility: number, owner: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling addFacilityOwner.'); - } - if (owner === null || owner === undefined) { - throw new Error('Required parameter owner was null or undefined when calling addFacilityOwner.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (owner !== undefined && owner !== null) { - queryParameters = queryParameters.set('owner', owner); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/addOwner`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Adds owner of a facility. - * @param facility name of Facility - * @param owner id of Owner - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addFacilityOwnerByFacilityName(facility: string, owner: number, observe?: 'body', reportProgress?: boolean): Observable; - public addFacilityOwnerByFacilityName(facility: string, owner: number, observe?: 'response', reportProgress?: boolean): Observable>; - public addFacilityOwnerByFacilityName(facility: string, owner: number, observe?: 'events', reportProgress?: boolean): Observable>; - public addFacilityOwnerByFacilityName(facility: string, owner: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling addFacilityOwnerByFacilityName.'); - } - if (owner === null || owner === undefined) { - throw new Error('Required parameter owner was null or undefined when calling addFacilityOwnerByFacilityName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (owner !== undefined && owner !== null) { - queryParameters = queryParameters.set('owner', owner); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/addOwner/f-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Adds owner of a facility. - * @param facility name of Facility - * @param owner name of Owner - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addFacilityOwnerByFacilityNameOwnerName(facility: string, owner: string, observe?: 'body', reportProgress?: boolean): Observable; - public addFacilityOwnerByFacilityNameOwnerName(facility: string, owner: string, observe?: 'response', reportProgress?: boolean): Observable>; - public addFacilityOwnerByFacilityNameOwnerName(facility: string, owner: string, observe?: 'events', reportProgress?: boolean): Observable>; - public addFacilityOwnerByFacilityNameOwnerName(facility: string, owner: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling addFacilityOwnerByFacilityNameOwnerName.'); - } - if (owner === null || owner === undefined) { - throw new Error('Required parameter owner was null or undefined when calling addFacilityOwnerByFacilityNameOwnerName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (owner !== undefined && owner !== null) { - queryParameters = queryParameters.set('owner', owner); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/addOwner/f-o-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Adds owner of a facility. - * @param facility id of Facility - * @param owner name of Owner - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addFacilityOwnerByOwnerName(facility: number, owner: string, observe?: 'body', reportProgress?: boolean): Observable; - public addFacilityOwnerByOwnerName(facility: number, owner: string, observe?: 'response', reportProgress?: boolean): Observable>; - public addFacilityOwnerByOwnerName(facility: number, owner: string, observe?: 'events', reportProgress?: boolean): Observable>; - public addFacilityOwnerByOwnerName(facility: number, owner: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling addFacilityOwnerByOwnerName.'); - } - if (owner === null || owner === undefined) { - throw new Error('Required parameter owner was null or undefined when calling addFacilityOwnerByOwnerName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (owner !== undefined && owner !== null) { - queryParameters = queryParameters.set('owner', owner); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/addOwner/o-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Adds a host to the Facility. - * InvalidHostnameException is thrown when host has invalid hostname. - * @param facility id of Facility - * @param hostname DNS name of host - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addHost(facility: number, hostname: string, observe?: 'body', reportProgress?: boolean): Observable>; - public addHost(facility: number, hostname: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public addHost(facility: number, hostname: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public addHost(facility: number, hostname: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling addHost.'); - } - if (hostname === null || hostname === undefined) { - throw new Error('Required parameter hostname was null or undefined when calling addHost.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (hostname !== undefined && hostname !== null) { - queryParameters = queryParameters.set('hostname', hostname); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post>(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/addHost`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Adds a host to the Facility. - * InvalidHostnameException is thrown when host has invalid hostname. - * @param facility name of Facility - * @param hostname DNS name of host - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addHostByFacilityName(facility: string, hostname: string, observe?: 'body', reportProgress?: boolean): Observable>; - public addHostByFacilityName(facility: string, hostname: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public addHostByFacilityName(facility: string, hostname: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public addHostByFacilityName(facility: string, hostname: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling addHostByFacilityName.'); - } - if (hostname === null || hostname === undefined) { - throw new Error('Required parameter hostname was null or undefined when calling addHostByFacilityName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (hostname !== undefined && hostname !== null) { - queryParameters = queryParameters.set('hostname', hostname); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post>(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/addHost/f-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Adds hosts to the Facility. - * InvalidHostnameException is thrown when any host has invalid hostname. - * @param facility id of Facility - * @param hostnames list of host names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addHosts(facility: number, hostnames: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public addHosts(facility: number, hostnames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public addHosts(facility: number, hostnames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public addHosts(facility: number, hostnames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling addHosts.'); - } - if (hostnames === null || hostnames === undefined) { - throw new Error('Required parameter hostnames was null or undefined when calling addHosts.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (hostnames) { - hostnames.forEach((element) => { - queryParameters = queryParameters.append('hostnames[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post>(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/addHosts`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Adds hosts to the Facility. - * InvalidHostnameException is thrown when any host has invalid hostname. - * @param facility name of Facility - * @param hostnames list of host names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addHostsByFacilityName(facility: string, hostnames: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public addHostsByFacilityName(facility: string, hostnames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public addHostsByFacilityName(facility: string, hostnames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public addHostsByFacilityName(facility: string, hostnames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling addHostsByFacilityName.'); - } - if (hostnames === null || hostnames === undefined) { - throw new Error('Required parameter hostnames was null or undefined when calling addHostsByFacilityName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (hostnames) { - hostnames.forEach((element) => { - queryParameters = queryParameters.append('hostnames[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post>(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/addHosts/f-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Assign given security team to given facility (means the facility trusts the security team) - * @param facility id of Facility - * @param securityTeam SecurityTeam id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public assignSecurityTeam(facility: number, securityTeam: number, observe?: 'body', reportProgress?: boolean): Observable; - public assignSecurityTeam(facility: number, securityTeam: number, observe?: 'response', reportProgress?: boolean): Observable>; - public assignSecurityTeam(facility: number, securityTeam: number, observe?: 'events', reportProgress?: boolean): Observable>; - public assignSecurityTeam(facility: number, securityTeam: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling assignSecurityTeam.'); - } - if (securityTeam === null || securityTeam === undefined) { - throw new Error('Required parameter securityTeam was null or undefined when calling assignSecurityTeam.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (securityTeam !== undefined && securityTeam !== null) { - queryParameters = queryParameters.set('securityTeam', securityTeam); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/assignSecurityTeam`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Assign given security team to given facility (means the facility trusts the security team) - * @param facility name of Facility - * @param securityTeam SecurityTeam id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public assignSecurityTeamByFacilityName(facility: string, securityTeam: number, observe?: 'body', reportProgress?: boolean): Observable; - public assignSecurityTeamByFacilityName(facility: string, securityTeam: number, observe?: 'response', reportProgress?: boolean): Observable>; - public assignSecurityTeamByFacilityName(facility: string, securityTeam: number, observe?: 'events', reportProgress?: boolean): Observable>; - public assignSecurityTeamByFacilityName(facility: string, securityTeam: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling assignSecurityTeamByFacilityName.'); - } - if (securityTeam === null || securityTeam === undefined) { - throw new Error('Required parameter securityTeam was null or undefined when calling assignSecurityTeamByFacilityName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (securityTeam !== undefined && securityTeam !== null) { - queryParameters = queryParameters.set('securityTeam', securityTeam); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/assignSecurityTeam/f-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Copy attributes (settings) from source facility to destination facility. You must be facility manager of both. - * @param srcFacility source facility id - * @param destFacility destination facility id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyAttributes(srcFacility: number, destFacility: number, observe?: 'body', reportProgress?: boolean): Observable; - public copyAttributes(srcFacility: number, destFacility: number, observe?: 'response', reportProgress?: boolean): Observable>; - public copyAttributes(srcFacility: number, destFacility: number, observe?: 'events', reportProgress?: boolean): Observable>; - public copyAttributes(srcFacility: number, destFacility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (srcFacility === null || srcFacility === undefined) { - throw new Error('Required parameter srcFacility was null or undefined when calling copyAttributes.'); - } - if (destFacility === null || destFacility === undefined) { - throw new Error('Required parameter destFacility was null or undefined when calling copyAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (srcFacility !== undefined && srcFacility !== null) { - queryParameters = queryParameters.set('srcFacility', srcFacility); - } - if (destFacility !== undefined && destFacility !== null) { - queryParameters = queryParameters.set('destFacility', destFacility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyAttributes`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Copy attributes (settings) from source facility to destination facility. You must be facility manager of both. - * @param srcFacility source facility id - * @param destFacilityName destination facility name - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyAttributesByDestinationName(srcFacility: number, destFacilityName: string, observe?: 'body', reportProgress?: boolean): Observable; - public copyAttributesByDestinationName(srcFacility: number, destFacilityName: string, observe?: 'response', reportProgress?: boolean): Observable>; - public copyAttributesByDestinationName(srcFacility: number, destFacilityName: string, observe?: 'events', reportProgress?: boolean): Observable>; - public copyAttributesByDestinationName(srcFacility: number, destFacilityName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (srcFacility === null || srcFacility === undefined) { - throw new Error('Required parameter srcFacility was null or undefined when calling copyAttributesByDestinationName.'); - } - if (destFacilityName === null || destFacilityName === undefined) { - throw new Error('Required parameter destFacilityName was null or undefined when calling copyAttributesByDestinationName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (srcFacility !== undefined && srcFacility !== null) { - queryParameters = queryParameters.set('srcFacility', srcFacility); - } - if (destFacilityName !== undefined && destFacilityName !== null) { - queryParameters = queryParameters.set('destFacilityName', destFacilityName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyAttributes/dest-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Copy attributes (settings) from source facility to destination facility. You must be facility manager of both. - * @param srcFacilityName source facility name - * @param destFacilityName destination facility name - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyAttributesBySourceDestinationNames(srcFacilityName: string, destFacilityName: string, observe?: 'body', reportProgress?: boolean): Observable; - public copyAttributesBySourceDestinationNames(srcFacilityName: string, destFacilityName: string, observe?: 'response', reportProgress?: boolean): Observable>; - public copyAttributesBySourceDestinationNames(srcFacilityName: string, destFacilityName: string, observe?: 'events', reportProgress?: boolean): Observable>; - public copyAttributesBySourceDestinationNames(srcFacilityName: string, destFacilityName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (srcFacilityName === null || srcFacilityName === undefined) { - throw new Error('Required parameter srcFacilityName was null or undefined when calling copyAttributesBySourceDestinationNames.'); - } - if (destFacilityName === null || destFacilityName === undefined) { - throw new Error('Required parameter destFacilityName was null or undefined when calling copyAttributesBySourceDestinationNames.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (srcFacilityName !== undefined && srcFacilityName !== null) { - queryParameters = queryParameters.set('srcFacilityName', srcFacilityName); - } - if (destFacilityName !== undefined && destFacilityName !== null) { - queryParameters = queryParameters.set('destFacilityName', destFacilityName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyAttributes/src-dest-names`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Copy attributes (settings) from source facility to destination facility. You must be facility manager of both. - * @param srcFacilityName source facility name - * @param destFacility destination facility id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyAttributesBySourceName(srcFacilityName: string, destFacility: number, observe?: 'body', reportProgress?: boolean): Observable; - public copyAttributesBySourceName(srcFacilityName: string, destFacility: number, observe?: 'response', reportProgress?: boolean): Observable>; - public copyAttributesBySourceName(srcFacilityName: string, destFacility: number, observe?: 'events', reportProgress?: boolean): Observable>; - public copyAttributesBySourceName(srcFacilityName: string, destFacility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (srcFacilityName === null || srcFacilityName === undefined) { - throw new Error('Required parameter srcFacilityName was null or undefined when calling copyAttributesBySourceName.'); - } - if (destFacility === null || destFacility === undefined) { - throw new Error('Required parameter destFacility was null or undefined when calling copyAttributesBySourceName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (srcFacilityName !== undefined && srcFacilityName !== null) { - queryParameters = queryParameters.set('srcFacilityName', srcFacilityName); - } - if (destFacility !== undefined && destFacility !== null) { - queryParameters = queryParameters.set('destFacility', destFacility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyAttributes/src-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Copy managers from source facility to destination facility. You must be facility manager of both. - * @param srcFacility source facility id - * @param destFacility destination facility id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyManagers(srcFacility: number, destFacility: number, observe?: 'body', reportProgress?: boolean): Observable; - public copyManagers(srcFacility: number, destFacility: number, observe?: 'response', reportProgress?: boolean): Observable>; - public copyManagers(srcFacility: number, destFacility: number, observe?: 'events', reportProgress?: boolean): Observable>; - public copyManagers(srcFacility: number, destFacility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (srcFacility === null || srcFacility === undefined) { - throw new Error('Required parameter srcFacility was null or undefined when calling copyManagers.'); - } - if (destFacility === null || destFacility === undefined) { - throw new Error('Required parameter destFacility was null or undefined when calling copyManagers.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (srcFacility !== undefined && srcFacility !== null) { - queryParameters = queryParameters.set('srcFacility', srcFacility); - } - if (destFacility !== undefined && destFacility !== null) { - queryParameters = queryParameters.set('destFacility', destFacility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyManagers`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Copy managers from source facility to destination facility. You must be facility manager of both. - * @param srcFacility source facility id - * @param destFacilityName destination facility name - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyManagersByDestinationName(srcFacility: number, destFacilityName: string, observe?: 'body', reportProgress?: boolean): Observable; - public copyManagersByDestinationName(srcFacility: number, destFacilityName: string, observe?: 'response', reportProgress?: boolean): Observable>; - public copyManagersByDestinationName(srcFacility: number, destFacilityName: string, observe?: 'events', reportProgress?: boolean): Observable>; - public copyManagersByDestinationName(srcFacility: number, destFacilityName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (srcFacility === null || srcFacility === undefined) { - throw new Error('Required parameter srcFacility was null or undefined when calling copyManagersByDestinationName.'); - } - if (destFacilityName === null || destFacilityName === undefined) { - throw new Error('Required parameter destFacilityName was null or undefined when calling copyManagersByDestinationName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (srcFacility !== undefined && srcFacility !== null) { - queryParameters = queryParameters.set('srcFacility', srcFacility); - } - if (destFacilityName !== undefined && destFacilityName !== null) { - queryParameters = queryParameters.set('destFacilityName', destFacilityName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyManagers/dest-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Copy managers from source facility to destination facility. You must be facility manager of both. - * @param srcFacilityName source facility name - * @param destFacilityName destination facility name - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyManagersBySourceDestinationNames(srcFacilityName: string, destFacilityName: string, observe?: 'body', reportProgress?: boolean): Observable; - public copyManagersBySourceDestinationNames(srcFacilityName: string, destFacilityName: string, observe?: 'response', reportProgress?: boolean): Observable>; - public copyManagersBySourceDestinationNames(srcFacilityName: string, destFacilityName: string, observe?: 'events', reportProgress?: boolean): Observable>; - public copyManagersBySourceDestinationNames(srcFacilityName: string, destFacilityName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (srcFacilityName === null || srcFacilityName === undefined) { - throw new Error('Required parameter srcFacilityName was null or undefined when calling copyManagersBySourceDestinationNames.'); - } - if (destFacilityName === null || destFacilityName === undefined) { - throw new Error('Required parameter destFacilityName was null or undefined when calling copyManagersBySourceDestinationNames.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (srcFacilityName !== undefined && srcFacilityName !== null) { - queryParameters = queryParameters.set('srcFacilityName', srcFacilityName); - } - if (destFacilityName !== undefined && destFacilityName !== null) { - queryParameters = queryParameters.set('destFacilityName', destFacilityName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyManagers/src-dest-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Copy managers from source facility to destination facility. You must be facility manager of both. - * @param srcFacilityName source facility name - * @param destFacility destination facility id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyManagersBySourceName(srcFacilityName: string, destFacility: number, observe?: 'body', reportProgress?: boolean): Observable; - public copyManagersBySourceName(srcFacilityName: string, destFacility: number, observe?: 'response', reportProgress?: boolean): Observable>; - public copyManagersBySourceName(srcFacilityName: string, destFacility: number, observe?: 'events', reportProgress?: boolean): Observable>; - public copyManagersBySourceName(srcFacilityName: string, destFacility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (srcFacilityName === null || srcFacilityName === undefined) { - throw new Error('Required parameter srcFacilityName was null or undefined when calling copyManagersBySourceName.'); - } - if (destFacility === null || destFacility === undefined) { - throw new Error('Required parameter destFacility was null or undefined when calling copyManagersBySourceName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (srcFacilityName !== undefined && srcFacilityName !== null) { - queryParameters = queryParameters.set('srcFacilityName', srcFacilityName); - } - if (destFacility !== undefined && destFacility !== null) { - queryParameters = queryParameters.set('destFacility', destFacility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyManagers/src-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Copy owners from source facility to destination facility. You must be facility manager of both. - * @param srcFacility source facility id - * @param destFacility destination facility id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyOwners(srcFacility: number, destFacility: number, observe?: 'body', reportProgress?: boolean): Observable; - public copyOwners(srcFacility: number, destFacility: number, observe?: 'response', reportProgress?: boolean): Observable>; - public copyOwners(srcFacility: number, destFacility: number, observe?: 'events', reportProgress?: boolean): Observable>; - public copyOwners(srcFacility: number, destFacility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (srcFacility === null || srcFacility === undefined) { - throw new Error('Required parameter srcFacility was null or undefined when calling copyOwners.'); - } - if (destFacility === null || destFacility === undefined) { - throw new Error('Required parameter destFacility was null or undefined when calling copyOwners.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (srcFacility !== undefined && srcFacility !== null) { - queryParameters = queryParameters.set('srcFacility', srcFacility); - } - if (destFacility !== undefined && destFacility !== null) { - queryParameters = queryParameters.set('destFacility', destFacility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyOwners`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Copy owners from source facility to destination facility. You must be facility manager of both. - * @param srcFacility source facility id - * @param destFacilityName destination facility name - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyOwnersByDestinationName(srcFacility: number, destFacilityName: string, observe?: 'body', reportProgress?: boolean): Observable; - public copyOwnersByDestinationName(srcFacility: number, destFacilityName: string, observe?: 'response', reportProgress?: boolean): Observable>; - public copyOwnersByDestinationName(srcFacility: number, destFacilityName: string, observe?: 'events', reportProgress?: boolean): Observable>; - public copyOwnersByDestinationName(srcFacility: number, destFacilityName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (srcFacility === null || srcFacility === undefined) { - throw new Error('Required parameter srcFacility was null or undefined when calling copyOwnersByDestinationName.'); - } - if (destFacilityName === null || destFacilityName === undefined) { - throw new Error('Required parameter destFacilityName was null or undefined when calling copyOwnersByDestinationName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (srcFacility !== undefined && srcFacility !== null) { - queryParameters = queryParameters.set('srcFacility', srcFacility); - } - if (destFacilityName !== undefined && destFacilityName !== null) { - queryParameters = queryParameters.set('destFacilityName', destFacilityName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyOwners/dest-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Copy owners from source facility to destination facility. You must be facility manager of both. - * @param srcFacilityName source facility name - * @param destFacilityName destination facility name - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyOwnersBySourceDestinationNames(srcFacilityName: string, destFacilityName: string, observe?: 'body', reportProgress?: boolean): Observable; - public copyOwnersBySourceDestinationNames(srcFacilityName: string, destFacilityName: string, observe?: 'response', reportProgress?: boolean): Observable>; - public copyOwnersBySourceDestinationNames(srcFacilityName: string, destFacilityName: string, observe?: 'events', reportProgress?: boolean): Observable>; - public copyOwnersBySourceDestinationNames(srcFacilityName: string, destFacilityName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (srcFacilityName === null || srcFacilityName === undefined) { - throw new Error('Required parameter srcFacilityName was null or undefined when calling copyOwnersBySourceDestinationNames.'); - } - if (destFacilityName === null || destFacilityName === undefined) { - throw new Error('Required parameter destFacilityName was null or undefined when calling copyOwnersBySourceDestinationNames.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (srcFacilityName !== undefined && srcFacilityName !== null) { - queryParameters = queryParameters.set('srcFacilityName', srcFacilityName); - } - if (destFacilityName !== undefined && destFacilityName !== null) { - queryParameters = queryParameters.set('destFacilityName', destFacilityName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyOwners/src-dest-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Copy owners from source facility to destination facility. You must be facility manager of both. - * @param srcFacilityName source facility name - * @param destFacility destination facility id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyOwnersBySourceName(srcFacilityName: string, destFacility: number, observe?: 'body', reportProgress?: boolean): Observable; - public copyOwnersBySourceName(srcFacilityName: string, destFacility: number, observe?: 'response', reportProgress?: boolean): Observable>; - public copyOwnersBySourceName(srcFacilityName: string, destFacility: number, observe?: 'events', reportProgress?: boolean): Observable>; - public copyOwnersBySourceName(srcFacilityName: string, destFacility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (srcFacilityName === null || srcFacilityName === undefined) { - throw new Error('Required parameter srcFacilityName was null or undefined when calling copyOwnersBySourceName.'); - } - if (destFacility === null || destFacility === undefined) { - throw new Error('Required parameter destFacility was null or undefined when calling copyOwnersBySourceName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (srcFacilityName !== undefined && srcFacilityName !== null) { - queryParameters = queryParameters.set('srcFacilityName', srcFacilityName); - } - if (destFacility !== undefined && destFacility !== null) { - queryParameters = queryParameters.set('destFacility', destFacility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/copyOwners/src-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Creates a facility. Caller is automatically set as facility manager. - * @param name name of entity - * @param description optional description of a facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createFacility(name: string, description?: string, observe?: 'body', reportProgress?: boolean): Observable; - public createFacility(name: string, description?: string, observe?: 'response', reportProgress?: boolean): Observable>; - public createFacility(name: string, description?: string, observe?: 'events', reportProgress?: boolean): Observable>; - public createFacility(name: string, description?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling createFacility.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (name !== undefined && name !== null) { - queryParameters = queryParameters.set('name', name); - } - if (description !== undefined && description !== null) { - queryParameters = queryParameters.set('description', description); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/createFacility`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Deletes a facility. - * @param facility id of Facility - * @param force If true, delete entity forcefully. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteFacility(facility: number, force?: boolean, observe?: 'body', reportProgress?: boolean): Observable; - public deleteFacility(facility: number, force?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteFacility(facility: number, force?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteFacility(facility: number, force?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling deleteFacility.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (force !== undefined && force !== null) { - queryParameters = queryParameters.set('force', force); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/deleteFacility`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Deletes a facility. - * @param facility name of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteFacilityByFacilityName(facility: string, observe?: 'body', reportProgress?: boolean): Observable; - public deleteFacilityByFacilityName(facility: string, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteFacilityByFacilityName(facility: string, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteFacilityByFacilityName(facility: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling deleteFacilityByFacilityName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/deleteFacility/f-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all facilities. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllFacilities(observe?: 'body', reportProgress?: boolean): Observable>; - public getAllFacilities(observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllFacilities(observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllFacilities(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getFacilities`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all assigned groups on Facility, optionally filtered by Vo or Service or both. - * @param facility id of Facility - * @param vo id of Vo - * @param service id of Service - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllowedGroups(facility: number, vo?: number, service?: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAllowedGroups(facility: number, vo?: number, service?: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllowedGroups(facility: number, vo?: number, service?: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllowedGroups(facility: number, vo?: number, service?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getAllowedGroups.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAllowedGroups`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all assigned groups on Facility, optionally filtered by Vo or Service or both. - * @param facility name of Facility - * @param vo id of Vo - * @param service id of Service - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllowedGroupsByFacilityName(facility: string, vo?: number, service?: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAllowedGroupsByFacilityName(facility: string, vo?: number, service?: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllowedGroupsByFacilityName(facility: string, vo?: number, service?: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllowedGroupsByFacilityName(facility: string, vo?: number, service?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getAllowedGroupsByFacilityName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAllowedGroups/f-name`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all assigned RichGroups on Facility with specified set of attributes, optionally filtered by Vo or Service or both. - * @param facility id of Facility - * @param attrNames list of attribute names List<String> - * @param vo id of Vo - * @param service id of Service - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllowedRichGroupsWithAttributes(facility: number, attrNames: Array, vo?: number, service?: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAllowedRichGroupsWithAttributes(facility: number, attrNames: Array, vo?: number, service?: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllowedRichGroupsWithAttributes(facility: number, attrNames: Array, vo?: number, service?: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllowedRichGroupsWithAttributes(facility: number, attrNames: Array, vo?: number, service?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getAllowedRichGroupsWithAttributes.'); - } - if (attrNames === null || attrNames === undefined) { - throw new Error('Required parameter attrNames was null or undefined when calling getAllowedRichGroupsWithAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAllowedRichGroupsWithAttributes`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all assigned RichGroups on Facility with specified set of attributes, optionally filtered by Vo or Service or both. - * @param facility name of Facility - * @param attrNames list of attribute names List<String> - * @param vo id of Vo - * @param service id of Service - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllowedRichGroupsWithAttributesByFacilityName(facility: string, attrNames: Array, vo?: number, service?: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAllowedRichGroupsWithAttributesByFacilityName(facility: string, attrNames: Array, vo?: number, service?: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllowedRichGroupsWithAttributesByFacilityName(facility: string, attrNames: Array, vo?: number, service?: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllowedRichGroupsWithAttributesByFacilityName(facility: string, attrNames: Array, vo?: number, service?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getAllowedRichGroupsWithAttributesByFacilityName.'); - } - if (attrNames === null || attrNames === undefined) { - throw new Error('Required parameter attrNames was null or undefined when calling getAllowedRichGroupsWithAttributesByFacilityName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAllowedRichGroupsWithAttributes/f-name`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Return all users which can use this facility - * @param facility id of Facility - * @param vo VO id, if provided, filter out users who aren\'t in specific VO - * @param service Service id, if provided, filter out users who aren\'t allowed to use the service on the facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllowedUsersOfFacility(facility: number, vo?: number, service?: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAllowedUsersOfFacility(facility: number, vo?: number, service?: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllowedUsersOfFacility(facility: number, vo?: number, service?: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllowedUsersOfFacility(facility: number, vo?: number, service?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getAllowedUsersOfFacility.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAllowedUsers/v-f-s`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Return all users which can use this facility - * @param facility name of Facility - * @param vo VO id, if provided, filter out users who aren\'t in specific VO - * @param service Service id, if provided, filter out users who aren\'t allowed to use the service on the facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllowedUsersOfFacilityByFacilityName(facility: string, vo?: number, service?: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAllowedUsersOfFacilityByFacilityName(facility: string, vo?: number, service?: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllowedUsersOfFacilityByFacilityName(facility: string, vo?: number, service?: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllowedUsersOfFacilityByFacilityName(facility: string, vo?: number, service?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getAllowedUsersOfFacilityByFacilityName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAllowedUsers/v-f-s/f-name`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Return all VO which can use a facility. (VO must have the resource which belongs to this facility.) - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllowedVos(facility: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAllowedVos(facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllowedVos(facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllowedVos(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getAllowedVos.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post>(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/getAllowedVos`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Return all VO which can use a facility. (VO must have the resource which belongs to this facility.) - * @param facility name of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllowedVosByFacilityName(facility: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getAllowedVosByFacilityName(facility: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllowedVosByFacilityName(facility: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllowedVosByFacilityName(facility: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getAllowedVosByFacilityName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post>(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/getAllowedVos/f-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get facilities which are assigned to a Group (via resource). - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedFacilitiesByGroup(group: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAssignedFacilitiesByGroup(group: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAssignedFacilitiesByGroup(group: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAssignedFacilitiesByGroup(group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getAssignedFacilitiesByGroup.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAssignedFacilities/group`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get facilities which have the member access on. - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedFacilitiesByMember(member: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAssignedFacilitiesByMember(member: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAssignedFacilitiesByMember(member: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAssignedFacilitiesByMember(member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getAssignedFacilitiesByMember.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAssignedFacilities/member`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get facilities where the service is defined.. - * @param service id of Service - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedFacilitiesByService(service: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAssignedFacilitiesByService(service: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAssignedFacilitiesByService(service: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAssignedFacilitiesByService(service: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling getAssignedFacilitiesByService.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAssignedFacilities/service`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * et facilities which have the user access on. - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedFacilitiesByUser(user: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAssignedFacilitiesByUser(user: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAssignedFacilitiesByUser(user: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAssignedFacilitiesByUser(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getAssignedFacilitiesByUser.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAssignedFacilities/user`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns resources with specific service assigned to the facility. - * @param facility id of Facility - * @param service id of Service - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedResourcesByAssignedServiceForFacility(facility: number, service: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAssignedResourcesByAssignedServiceForFacility(facility: number, service: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAssignedResourcesByAssignedServiceForFacility(facility: number, service: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAssignedResourcesByAssignedServiceForFacility(facility: number, service: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getAssignedResourcesByAssignedServiceForFacility.'); - } - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling getAssignedResourcesByAssignedServiceForFacility.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAssignedResourcesByAssignedService`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns all resources assigned to a facility. - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedResourcesForFacility(facility: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAssignedResourcesForFacility(facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAssignedResourcesForFacility(facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAssignedResourcesForFacility(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getAssignedResourcesForFacility.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAssignedResources`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns all resources assigned to a facility. - * @param facility name of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedResourcesForFacilityByFacilityName(facility: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getAssignedResourcesForFacilityByFacilityName(facility: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAssignedResourcesForFacilityByFacilityName(facility: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAssignedResourcesForFacilityByFacilityName(facility: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getAssignedResourcesForFacilityByFacilityName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAssignedResources/f-name`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns all rich resources assigned to a facility with VO property filled. - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedRichResourcesForFacility(facility: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAssignedRichResourcesForFacility(facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAssignedRichResourcesForFacility(facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAssignedRichResourcesForFacility(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getAssignedRichResourcesForFacility.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAssignedRichResources`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns all rich resources assigned to a facility with VO property filled. - * @param facility name of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedRichResourcesForFacilityByFacilityName(facility: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getAssignedRichResourcesForFacilityByFacilityName(facility: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAssignedRichResourcesForFacilityByFacilityName(facility: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAssignedRichResourcesForFacilityByFacilityName(facility: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getAssignedRichResourcesForFacilityByFacilityName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAssignedRichResources/f-name`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Return assigned security teams for specific facility - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedSecurityTeams(facility: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAssignedSecurityTeams(facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAssignedSecurityTeams(facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAssignedSecurityTeams(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getAssignedSecurityTeams.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAssignedSecurityTeams`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Return assigned security teams for specific facility - * @param facility name of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedSecurityTeamsByFacilityName(facility: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getAssignedSecurityTeamsByFacilityName(facility: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAssignedSecurityTeamsByFacilityName(facility: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAssignedSecurityTeamsByFacilityName(facility: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getAssignedSecurityTeamsByFacilityName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAssignedSecurityTeams/f-name`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Lists all users assigned to facility containing resources where service is assigned. - * @param facility id of Facility - * @param service id of Service - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedUsers(facility: number, service?: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAssignedUsers(facility: number, service?: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAssignedUsers(facility: number, service?: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAssignedUsers(facility: number, service?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getAssignedUsers.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAssignedUsers`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Lists all users assigned to facility containing resources where service is assigned. - * @param facility name of Facility - * @param service id of Service - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedUsersByFacilityName(facility: string, service?: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAssignedUsersByFacilityName(facility: string, service?: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAssignedUsersByFacilityName(facility: string, service?: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAssignedUsersByFacilityName(facility: string, service?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getAssignedUsersByFacilityName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAssignedUsers/f-name`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all bans for user on the facility. - * @param facilityId id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getBansForFacility(facilityId: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getBansForFacility(facilityId: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getBansForFacility(facilityId: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getBansForFacility(facilityId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facilityId === null || facilityId === undefined) { - throw new Error('Required parameter facilityId was null or undefined when calling getBansForFacility.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facilityId !== undefined && facilityId !== null) { - queryParameters = queryParameters.set('facilityId', facilityId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getBansForFacility`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all bans for user on any facility. - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getBansForUser(user: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getBansForUser(user: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getBansForUser(user: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getBansForUser(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getBansForUser.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getBansForUser`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Gets all enriched facilities user has access rights to. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getEnrichedFacilities(observe?: 'body', reportProgress?: boolean): Observable>; - public getEnrichedFacilities(observe?: 'response', reportProgress?: boolean): Observable>>; - public getEnrichedFacilities(observe?: 'events', reportProgress?: boolean): Observable>>; - public getEnrichedFacilities(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getEnrichedFacilities`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Return all enriched hosts of given facility. That is host with all its attributes. - * @param facility id of Facility - * @param attrNames list of attribute names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getEnrichedHosts(facility: number, attrNames: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getEnrichedHosts(facility: number, attrNames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getEnrichedHosts(facility: number, attrNames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getEnrichedHosts(facility: number, attrNames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getEnrichedHosts.'); - } - if (attrNames === null || attrNames === undefined) { - throw new Error('Required parameter attrNames was null or undefined when calling getEnrichedHosts.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getEnrichedHosts`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns all facilities that have the attribute \'attributeName\' with the string value \'attributeValue\'. - * Searching only def and opt attributes. Large attributes are not supported. - * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) - * @param attributeValue string value of Attribute - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilitiesByAttribute(attributeName: string, attributeValue: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getFacilitiesByAttribute(attributeName: string, attributeValue: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getFacilitiesByAttribute(attributeName: string, attributeValue: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getFacilitiesByAttribute(attributeName: string, attributeValue: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (attributeName === null || attributeName === undefined) { - throw new Error('Required parameter attributeName was null or undefined when calling getFacilitiesByAttribute.'); - } - if (attributeValue === null || attributeValue === undefined) { - throw new Error('Required parameter attributeValue was null or undefined when calling getFacilitiesByAttribute.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (attributeName !== undefined && attributeName !== null) { - queryParameters = queryParameters.set('attributeName', attributeName); - } - if (attributeValue !== undefined && attributeValue !== null) { - queryParameters = queryParameters.set('attributeValue', attributeValue); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getFacilitiesByAttribute`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Searches for the Facilities by theirs destination. - * @param destination string name of destination - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilitiesByDestination(destination: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getFacilitiesByDestination(destination: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getFacilitiesByDestination(destination: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getFacilitiesByDestination(destination: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (destination === null || destination === undefined) { - throw new Error('Required parameter destination was null or undefined when calling getFacilitiesByDestination.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (destination !== undefined && destination !== null) { - queryParameters = queryParameters.set('destination', destination); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getFacilitiesByDestination`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Return all facilities where exists host with the specific hostname - * @param hostname specific hostname - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilitiesByHostName(hostname: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getFacilitiesByHostName(hostname: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getFacilitiesByHostName(hostname: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getFacilitiesByHostName(hostname: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (hostname === null || hostname === undefined) { - throw new Error('Required parameter hostname was null or undefined when calling getFacilitiesByHostName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (hostname !== undefined && hostname !== null) { - queryParameters = queryParameters.set('hostname', hostname); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getFacilitiesByHostName`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns list of Facilities by their ids. - * @param ids list of ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilitiesByIds(ids: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getFacilitiesByIds(ids: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getFacilitiesByIds(ids: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getFacilitiesByIds(ids: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (ids === null || ids === undefined) { - throw new Error('Required parameter ids was null or undefined when calling getFacilitiesByIds.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (ids) { - ids.forEach((element) => { - queryParameters = queryParameters.append('ids[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getFacilitiesByIds`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Gets count of all facilities. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilitiesCount(observe?: 'body', reportProgress?: boolean): Observable; - public getFacilitiesCount(observe?: 'response', reportProgress?: boolean): Observable>; - public getFacilitiesCount(observe?: 'events', reportProgress?: boolean): Observable>; - public getFacilitiesCount(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/facilitiesManager/getFacilitiesCount`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns list of Facilities, where the user is a direct Administrator or a VALID member of an administrator group. - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilitiesWhereUserIsAdmin(user: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getFacilitiesWhereUserIsAdmin(user: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getFacilitiesWhereUserIsAdmin(user: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getFacilitiesWhereUserIsAdmin(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getFacilitiesWhereUserIsAdmin.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getFacilitiesWhereUserIsAdmin`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all Facility group admins. - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityAdminGroups(facility: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getFacilityAdminGroups(facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getFacilityAdminGroups(facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getFacilityAdminGroups(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getFacilityAdminGroups.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAdminGroups`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get list of all facility administrators for supported role and given facility. If onlyDirectAdmins is true, return only direct admins of the group for supported role. Includes users who are VALID members of administrator groups. Supported roles: FacilityAdmin - * @param facility id of Facility - * @param onlyDirectAdmins if true, get only direct facility administrators (if false, get both direct and indirect) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityAdminUsers(facility: number, onlyDirectAdmins: boolean, observe?: 'body', reportProgress?: boolean): Observable>; - public getFacilityAdminUsers(facility: number, onlyDirectAdmins: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; - public getFacilityAdminUsers(facility: number, onlyDirectAdmins: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; - public getFacilityAdminUsers(facility: number, onlyDirectAdmins: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getFacilityAdminUsers.'); - } - if (onlyDirectAdmins === null || onlyDirectAdmins === undefined) { - throw new Error('Required parameter onlyDirectAdmins was null or undefined when calling getFacilityAdminUsers.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (onlyDirectAdmins !== undefined && onlyDirectAdmins !== null) { - queryParameters = queryParameters.set('onlyDirectAdmins', onlyDirectAdmins); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAdmins`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get list of all facility administrators for supported role and given facility. If onlyDirectAdmins is true, return only direct admins of the group for supported role. Includes users who are VALID members of administrator groups. Supported roles: FacilityAdmin - * @param facility name of Facility - * @param onlyDirectAdmins if true, get only direct facility administrators (if false, get both direct and indirect) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityAdminUsersByFacilityName(facility: string, onlyDirectAdmins: boolean, observe?: 'body', reportProgress?: boolean): Observable>; - public getFacilityAdminUsersByFacilityName(facility: string, onlyDirectAdmins: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; - public getFacilityAdminUsersByFacilityName(facility: string, onlyDirectAdmins: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; - public getFacilityAdminUsersByFacilityName(facility: string, onlyDirectAdmins: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getFacilityAdminUsersByFacilityName.'); - } - if (onlyDirectAdmins === null || onlyDirectAdmins === undefined) { - throw new Error('Required parameter onlyDirectAdmins was null or undefined when calling getFacilityAdminUsersByFacilityName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (onlyDirectAdmins !== undefined && onlyDirectAdmins !== null) { - queryParameters = queryParameters.set('onlyDirectAdmins', onlyDirectAdmins); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAdmins/f-name`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get ban by userId and facilityId. - * @param user id of User - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityBan(user: number, facility: number, observe?: 'body', reportProgress?: boolean): Observable; - public getFacilityBan(user: number, facility: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getFacilityBan(user: number, facility: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getFacilityBan(user: number, facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getFacilityBan.'); - } - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getFacilityBan.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/facilitiesManager/getBan`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get Ban for user on facility by it\'s id. - * @param banId BanOnFacility id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityBanById(banId: number, observe?: 'body', reportProgress?: boolean): Observable; - public getFacilityBanById(banId: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getFacilityBanById(banId: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getFacilityBanById(banId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (banId === null || banId === undefined) { - throw new Error('Required parameter banId was null or undefined when calling getFacilityBanById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (banId !== undefined && banId !== null) { - queryParameters = queryParameters.set('banId', banId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/facilitiesManager/getBanById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns Facility with specified id. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityById(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public getFacilityById(id: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getFacilityById(id: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getFacilityById(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getFacilityById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/facilitiesManager/getFacilityById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns Facility with specified name. - * @param name name of entity - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityByName(name: string, observe?: 'body', reportProgress?: boolean): Observable; - public getFacilityByName(name: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getFacilityByName(name: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getFacilityByName(name: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling getFacilityByName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (name !== undefined && name !== null) { - queryParameters = queryParameters.set('name', name); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/facilitiesManager/getFacilityByName`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Return facility which has the host. - * @param host id of Host - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityForHost(host: number, observe?: 'body', reportProgress?: boolean): Observable; - public getFacilityForHost(host: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getFacilityForHost(host: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getFacilityForHost(host: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (host === null || host === undefined) { - throw new Error('Required parameter host was null or undefined when calling getFacilityForHost.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (host !== undefined && host !== null) { - queryParameters = queryParameters.set('host', host); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/facilitiesManager/getFacilityForHost`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns owners of a facility. - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityOwners(facility: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getFacilityOwners(facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getFacilityOwners(facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getFacilityOwners(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getFacilityOwners.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getOwners`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns owners of a facility. - * @param facility name of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityOwnersByFacilityName(facility: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getFacilityOwnersByFacilityName(facility: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getFacilityOwnersByFacilityName(facility: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getFacilityOwnersByFacilityName(facility: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getFacilityOwnersByFacilityName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getOwners/f-name`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns a host by its id. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getHostById(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public getHostById(id: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getHostById(id: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getHostById(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getHostById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/facilitiesManager/getHostById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns Hosts of a Facility. - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getHosts(facility: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getHosts(facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getHosts(facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getHosts(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getHosts.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getHosts`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns Hosts of a Facility. - * @param facility name of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getHostsByFacilityName(facility: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getHostsByFacilityName(facility: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getHostsByFacilityName(facility: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getHostsByFacilityName(facility: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getHostsByFacilityName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getHosts/f-name`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns hosts by hostname. (from all facilities) - * @param hostname name of a host - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getHostsByHostname(hostname: string, observe?: 'body', reportProgress?: boolean): Observable; - public getHostsByHostname(hostname: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getHostsByHostname(hostname: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getHostsByHostname(hostname: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (hostname === null || hostname === undefined) { - throw new Error('Required parameter hostname was null or undefined when calling getHostsByHostname.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (hostname !== undefined && hostname !== null) { - queryParameters = queryParameters.set('hostname', hostname); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/facilitiesManager/getHostsByHostname`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Count hosts of Facility. - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getHostsCount(facility: number, observe?: 'body', reportProgress?: boolean): Observable; - public getHostsCount(facility: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getHostsCount(facility: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getHostsCount(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getHostsCount.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/facilitiesManager/getHostsCount`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Count hosts of Facility. - * @param facility name of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getHostsCountByFacilityName(facility: string, observe?: 'body', reportProgress?: boolean): Observable; - public getHostsCountByFacilityName(facility: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getHostsCountByFacilityName(facility: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getHostsCountByFacilityName(facility: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getHostsCountByFacilityName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/facilitiesManager/getHostsCount/f-name`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns list of all facilities owned by the owner. - * @param owner id of Owner - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getOwnerFacilities(owner: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getOwnerFacilities(owner: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getOwnerFacilities(owner: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getOwnerFacilities(owner: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (owner === null || owner === undefined) { - throw new Error('Required parameter owner was null or undefined when calling getOwnerFacilities.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (owner !== undefined && owner !== null) { - queryParameters = queryParameters.set('owner', owner); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getOwnerFacilities`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Gets all possible rich facilities with all their owners. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRichFacilities(observe?: 'body', reportProgress?: boolean): Observable>; - public getRichFacilities(observe?: 'response', reportProgress?: boolean): Observable>>; - public getRichFacilities(observe?: 'events', reportProgress?: boolean): Observable>>; - public getRichFacilities(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getRichFacilities`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove specific ban by userId and facilityId. - * @param user id of User - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeBanByUserIdFacilityId(user: number, facility: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeBanByUserIdFacilityId(user: number, facility: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeBanByUserIdFacilityId(user: number, facility: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeBanByUserIdFacilityId(user: number, facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling removeBanByUserIdFacilityId.'); - } - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling removeBanByUserIdFacilityId.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeBan/byUserIdFacilityId`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Removes a group as a Facility admin. - * @param facility id of Facility - * @param authorizedGroup Group id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeFacilityAdminGroup(facility: number, authorizedGroup: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeFacilityAdminGroup(facility: number, authorizedGroup: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeFacilityAdminGroup(facility: number, authorizedGroup: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeFacilityAdminGroup(facility: number, authorizedGroup: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling removeFacilityAdminGroup.'); - } - if (authorizedGroup === null || authorizedGroup === undefined) { - throw new Error('Required parameter authorizedGroup was null or undefined when calling removeFacilityAdminGroup.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (authorizedGroup !== undefined && authorizedGroup !== null) { - queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeAdmin/group`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Removes a group as a Facility admin. - * @param facility name of Facility - * @param authorizedGroup Group id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeFacilityAdminGroupByFacilityName(facility: string, authorizedGroup: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeFacilityAdminGroupByFacilityName(facility: string, authorizedGroup: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeFacilityAdminGroupByFacilityName(facility: string, authorizedGroup: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeFacilityAdminGroupByFacilityName(facility: string, authorizedGroup: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling removeFacilityAdminGroupByFacilityName.'); - } - if (authorizedGroup === null || authorizedGroup === undefined) { - throw new Error('Required parameter authorizedGroup was null or undefined when calling removeFacilityAdminGroupByFacilityName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (authorizedGroup !== undefined && authorizedGroup !== null) { - queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeAdmin/group/f-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Removes a user as a Facility admin. - * @param facility id of Facility - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeFacilityAdminUser(facility: number, user: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeFacilityAdminUser(facility: number, user: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeFacilityAdminUser(facility: number, user: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeFacilityAdminUser(facility: number, user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling removeFacilityAdminUser.'); - } - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling removeFacilityAdminUser.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeAdmin/user`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Removes a user as a Facility admin. - * @param facility name of Facility - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeFacilityAdminUserByFacilityName(facility: string, user: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeFacilityAdminUserByFacilityName(facility: string, user: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeFacilityAdminUserByFacilityName(facility: string, user: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeFacilityAdminUserByFacilityName(facility: string, user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling removeFacilityAdminUserByFacilityName.'); - } - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling removeFacilityAdminUserByFacilityName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeAdmin/user/f-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove specific ban by it\'s id. - * @param banId BanOnFacility id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeFacilityBanById(banId: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeFacilityBanById(banId: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeFacilityBanById(banId: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeFacilityBanById(banId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (banId === null || banId === undefined) { - throw new Error('Required parameter banId was null or undefined when calling removeFacilityBanById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (banId !== undefined && banId !== null) { - queryParameters = queryParameters.set('banId', banId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeBan/byId`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Removes owner from a facility. - * @param facility id of Facility - * @param owner id of Owner - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeFacilityOwner(facility: number, owner: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeFacilityOwner(facility: number, owner: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeFacilityOwner(facility: number, owner: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeFacilityOwner(facility: number, owner: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling removeFacilityOwner.'); - } - if (owner === null || owner === undefined) { - throw new Error('Required parameter owner was null or undefined when calling removeFacilityOwner.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (owner !== undefined && owner !== null) { - queryParameters = queryParameters.set('owner', owner); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeOwner`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Removes owner from a facility. - * @param facility name of Facility - * @param owner id of Owner - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeFacilityOwnerByFacilityName(facility: string, owner: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeFacilityOwnerByFacilityName(facility: string, owner: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeFacilityOwnerByFacilityName(facility: string, owner: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeFacilityOwnerByFacilityName(facility: string, owner: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling removeFacilityOwnerByFacilityName.'); - } - if (owner === null || owner === undefined) { - throw new Error('Required parameter owner was null or undefined when calling removeFacilityOwnerByFacilityName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (owner !== undefined && owner !== null) { - queryParameters = queryParameters.set('owner', owner); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeOwner/f-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Removes owner from a facility. - * @param facility name of Facility - * @param owner name of Owner - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeFacilityOwnerByFacilityNameOwnerName(facility: string, owner: string, observe?: 'body', reportProgress?: boolean): Observable; - public removeFacilityOwnerByFacilityNameOwnerName(facility: string, owner: string, observe?: 'response', reportProgress?: boolean): Observable>; - public removeFacilityOwnerByFacilityNameOwnerName(facility: string, owner: string, observe?: 'events', reportProgress?: boolean): Observable>; - public removeFacilityOwnerByFacilityNameOwnerName(facility: string, owner: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling removeFacilityOwnerByFacilityNameOwnerName.'); - } - if (owner === null || owner === undefined) { - throw new Error('Required parameter owner was null or undefined when calling removeFacilityOwnerByFacilityNameOwnerName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (owner !== undefined && owner !== null) { - queryParameters = queryParameters.set('owner', owner); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeOwner/f-o-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Removes owner from a facility. - * @param facility id of Facility - * @param owner name of Owner - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeFacilityOwnerByOwnerName(facility: number, owner: string, observe?: 'body', reportProgress?: boolean): Observable; - public removeFacilityOwnerByOwnerName(facility: number, owner: string, observe?: 'response', reportProgress?: boolean): Observable>; - public removeFacilityOwnerByOwnerName(facility: number, owner: string, observe?: 'events', reportProgress?: boolean): Observable>; - public removeFacilityOwnerByOwnerName(facility: number, owner: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling removeFacilityOwnerByOwnerName.'); - } - if (owner === null || owner === undefined) { - throw new Error('Required parameter owner was null or undefined when calling removeFacilityOwnerByOwnerName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (owner !== undefined && owner !== null) { - queryParameters = queryParameters.set('owner', owner); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeOwner/o-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Removes a host. - * @param host id of Host - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeHost(host: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeHost(host: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeHost(host: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeHost(host: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (host === null || host === undefined) { - throw new Error('Required parameter host was null or undefined when calling removeHost.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (host !== undefined && host !== null) { - queryParameters = queryParameters.set('host', host); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeHost`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove host from the Facility based on hostname. If there is ambiguity, method throws exception and no host is removed. - * @param hostname specific hostname - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeHostByHostname(hostname: string, observe?: 'body', reportProgress?: boolean): Observable; - public removeHostByHostname(hostname: string, observe?: 'response', reportProgress?: boolean): Observable>; - public removeHostByHostname(hostname: string, observe?: 'events', reportProgress?: boolean): Observable>; - public removeHostByHostname(hostname: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (hostname === null || hostname === undefined) { - throw new Error('Required parameter hostname was null or undefined when calling removeHostByHostname.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (hostname !== undefined && hostname !== null) { - queryParameters = queryParameters.set('hostname', hostname); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeHostByHostname`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove hosts from a Facility. - * @param facility id of Facility - * @param hosts list of host ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeHosts(facility: number, hosts: Array, observe?: 'body', reportProgress?: boolean): Observable; - public removeHosts(facility: number, hosts: Array, observe?: 'response', reportProgress?: boolean): Observable>; - public removeHosts(facility: number, hosts: Array, observe?: 'events', reportProgress?: boolean): Observable>; - public removeHosts(facility: number, hosts: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling removeHosts.'); - } - if (hosts === null || hosts === undefined) { - throw new Error('Required parameter hosts was null or undefined when calling removeHosts.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (hosts) { - hosts.forEach((element) => { - queryParameters = queryParameters.append('hosts[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeHosts`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove hosts from a Facility. - * @param facility name of Facility - * @param hosts list of host ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeHostsByFacilityName(facility: string, hosts: Array, observe?: 'body', reportProgress?: boolean): Observable; - public removeHostsByFacilityName(facility: string, hosts: Array, observe?: 'response', reportProgress?: boolean): Observable>; - public removeHostsByFacilityName(facility: string, hosts: Array, observe?: 'events', reportProgress?: boolean): Observable>; - public removeHostsByFacilityName(facility: string, hosts: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling removeHostsByFacilityName.'); - } - if (hosts === null || hosts === undefined) { - throw new Error('Required parameter hosts was null or undefined when calling removeHostsByFacilityName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (hosts) { - hosts.forEach((element) => { - queryParameters = queryParameters.append('hosts[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeHosts/f-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove (Unassign) given security team from given facility - * @param facility id of Facility - * @param securityTeam SecurityTeam id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeSecurityTeam(facility: number, securityTeam: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeSecurityTeam(facility: number, securityTeam: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeSecurityTeam(facility: number, securityTeam: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeSecurityTeam(facility: number, securityTeam: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling removeSecurityTeam.'); - } - if (securityTeam === null || securityTeam === undefined) { - throw new Error('Required parameter securityTeam was null or undefined when calling removeSecurityTeam.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (securityTeam !== undefined && securityTeam !== null) { - queryParameters = queryParameters.set('securityTeam', securityTeam); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeSecurityTeam`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove (Unassign) given security team from given facility - * @param facility name of Facility - * @param securityTeam SecurityTeam id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeSecurityTeamByFacilityName(facility: string, securityTeam: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeSecurityTeamByFacilityName(facility: string, securityTeam: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeSecurityTeamByFacilityName(facility: string, securityTeam: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeSecurityTeamByFacilityName(facility: string, securityTeam: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling removeSecurityTeamByFacilityName.'); - } - if (securityTeam === null || securityTeam === undefined) { - throw new Error('Required parameter securityTeam was null or undefined when calling removeSecurityTeamByFacilityName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (securityTeam !== undefined && securityTeam !== null) { - queryParameters = queryParameters.set('securityTeam', securityTeam); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/facilitiesManager/removeSecurityTeam/f-name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Set ban for user on facility. - * @param inputSetBanForUserOnFacility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setFacilityBan(inputSetBanForUserOnFacility: InputSetBanForUserOnFacility, observe?: 'body', reportProgress?: boolean): Observable; - public setFacilityBan(inputSetBanForUserOnFacility: InputSetBanForUserOnFacility, observe?: 'response', reportProgress?: boolean): Observable>; - public setFacilityBan(inputSetBanForUserOnFacility: InputSetBanForUserOnFacility, observe?: 'events', reportProgress?: boolean): Observable>; - public setFacilityBan(inputSetBanForUserOnFacility: InputSetBanForUserOnFacility, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetBanForUserOnFacility === null || inputSetBanForUserOnFacility === undefined) { - throw new Error('Required parameter inputSetBanForUserOnFacility was null or undefined when calling setFacilityBan.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/facilitiesManager/setBan`, - inputSetBanForUserOnFacility, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Updates a facility. - * @param inputUpdateFacility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateFacility(inputUpdateFacility: InputUpdateFacility, observe?: 'body', reportProgress?: boolean): Observable; - public updateFacility(inputUpdateFacility: InputUpdateFacility, observe?: 'response', reportProgress?: boolean): Observable>; - public updateFacility(inputUpdateFacility: InputUpdateFacility, observe?: 'events', reportProgress?: boolean): Observable>; - public updateFacility(inputUpdateFacility: InputUpdateFacility, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputUpdateFacility === null || inputUpdateFacility === undefined) { - throw new Error('Required parameter inputUpdateFacility was null or undefined when calling updateFacility.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/facilitiesManager/updateFacility`, - inputUpdateFacility, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Update existing ban (description, validation timestamp) - * @param inputUpdateBanForFacility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateFacilityBan(inputUpdateBanForFacility: InputUpdateBanForFacility, observe?: 'body', reportProgress?: boolean): Observable; - public updateFacilityBan(inputUpdateBanForFacility: InputUpdateBanForFacility, observe?: 'response', reportProgress?: boolean): Observable>; - public updateFacilityBan(inputUpdateBanForFacility: InputUpdateBanForFacility, observe?: 'events', reportProgress?: boolean): Observable>; - public updateFacilityBan(inputUpdateBanForFacility: InputUpdateBanForFacility, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputUpdateBanForFacility === null || inputUpdateBanForFacility === undefined) { - throw new Error('Required parameter inputUpdateBanForFacility was null or undefined when calling updateFacilityBan.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/facilitiesManager/updateBan`, - inputUpdateBanForFacility, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); } + return this.httpClient.post( + `${this.configuration.basePath}/json/facilitiesManager/updateBan`, + inputUpdateBanForFacility, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } } diff --git a/libs/perun/openapi/src/lib/api/facilitiesManagerByFacilityName.service.ts b/libs/perun/openapi/src/lib/api/facilitiesManagerByFacilityName.service.ts index 3987463e6..c72049f3b 100644 --- a/libs/perun/openapi/src/lib/api/facilitiesManagerByFacilityName.service.ts +++ b/libs/perun/openapi/src/lib/api/facilitiesManagerByFacilityName.service.ts @@ -11,101 +11,126 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { Group } from '../model/group'; import { PerunException } from '../model/perunException'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - - +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class FacilitiesManagerByFacilityNameService { - - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string, + @Optional() configuration: Configuration + ) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + /** + * Get all Facility group admins. + * @param facility name of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityAdminGroupsByFacilityName( + facility: string, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getFacilityAdminGroupsByFacilityName( + facility: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getFacilityAdminGroupsByFacilityName( + facility: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getFacilityAdminGroupsByFacilityName( + facility: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getFacilityAdminGroupsByFacilityName.' + ); } + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + let headers = this.defaultHeaders; - /** - * Get all Facility group admins. - * @param facility name of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityAdminGroupsByFacilityName(facility: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getFacilityAdminGroupsByFacilityName(facility: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getFacilityAdminGroupsByFacilityName(facility: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getFacilityAdminGroupsByFacilityName(facility: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getFacilityAdminGroupsByFacilityName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } - return this.httpClient.get>(`${this.configuration.basePath}/json/facilitiesManager/getAdminGroups/f-name`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); } + return this.httpClient.get>( + `${this.configuration.basePath}/json/facilitiesManager/getAdminGroups/f-name`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } } diff --git a/libs/perun/openapi/src/lib/api/groupsManager.service.ts b/libs/perun/openapi/src/lib/api/groupsManager.service.ts index ed0aca5ee..1458f4101 100644 --- a/libs/perun/openapi/src/lib/api/groupsManager.service.ts +++ b/libs/perun/openapi/src/lib/api/groupsManager.service.ts @@ -11,11 +11,17 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { Group } from '../model/group'; import { InputDeleteGroups } from '../model/inputDeleteGroups'; @@ -28,2636 +34,3606 @@ import { PerunException } from '../model/perunException'; import { RichGroup } from '../model/richGroup'; import { RichMember } from '../model/richMember'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - - +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class GroupsManagerService { + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string, + @Optional() configuration: Configuration + ) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + /** + * Add member to groups. If already a member of a group, the group will be skipped. + * @param groups list of Group ids List<Integer> + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addMember( + groups: Array, + member: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public addMember( + groups: Array, + member: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public addMember( + groups: Array, + member: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public addMember( + groups: Array, + member: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (groups === null || groups === undefined) { + throw new Error('Required parameter groups was null or undefined when calling addMember.'); + } + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling addMember.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (groups) { + groups.forEach((element) => { + queryParameters = queryParameters.append('groups[]', element); + }); + } + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/groupsManager/addMember`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Adds members to a group. If already a member of the group, the member will be skipped. Non-empty list of members expected, if empty, no member will be added. + * @param group id of Group + * @param members id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addMembers( + group: number, + members: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public addMembers( + group: number, + members: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public addMembers( + group: number, + members: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public addMembers( + group: number, + members: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling addMembers.'); + } + if (members === null || members === undefined) { + throw new Error('Required parameter members was null or undefined when calling addMembers.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (members) { + members.forEach((element) => { + queryParameters = queryParameters.append('members[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/groupsManager/addMembers`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns true if member in given group can extend membership or if no rules were set for the membershipExpiration, otherwise false. + * @param member id of Member + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public canExtendMembershipInGroup( + member: number, + group: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public canExtendMembershipInGroup( + member: number, + group: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public canExtendMembershipInGroup( + member: number, + group: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public canExtendMembershipInGroup( + member: number, + group: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling canExtendMembershipInGroup.' + ); + } + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling canExtendMembershipInGroup.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/groupsManager/canExtendMembershipInGroup`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Create union of two groups, where \"operandGroup\" is technically set as subgroup of \"resultGroup\". Members from \"operandGroup\" are added to \"resultGroup\" as INDIRECT members. Union is honored also in all group member changing operations. + * @param resultGroup id of Group to have removed \'operandGroup\' from subgroups + * @param operandGroup id of Group to have removed \'resultGroup\' from subgroups + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createGroupUnion( + resultGroup: number, + operandGroup: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public createGroupUnion( + resultGroup: number, + operandGroup: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public createGroupUnion( + resultGroup: number, + operandGroup: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public createGroupUnion( + resultGroup: number, + operandGroup: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resultGroup === null || resultGroup === undefined) { + throw new Error( + 'Required parameter resultGroup was null or undefined when calling createGroupUnion.' + ); + } + if (operandGroup === null || operandGroup === undefined) { + throw new Error( + 'Required parameter operandGroup was null or undefined when calling createGroupUnion.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resultGroup !== undefined && resultGroup !== null) { + queryParameters = queryParameters.set('resultGroup', resultGroup); + } + if (operandGroup !== undefined && operandGroup !== null) { + queryParameters = queryParameters.set('operandGroup', operandGroup); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/groupsManager/createGroupUnion`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Creates a subgroup of a group. + * @param parentGroup Parent Group id + * @param name name of Group + * @param description description of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createGroupWithParentGroupNameDescription( + parentGroup: number, + name: string, + description: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public createGroupWithParentGroupNameDescription( + parentGroup: number, + name: string, + description: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public createGroupWithParentGroupNameDescription( + parentGroup: number, + name: string, + description: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public createGroupWithParentGroupNameDescription( + parentGroup: number, + name: string, + description: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (parentGroup === null || parentGroup === undefined) { + throw new Error( + 'Required parameter parentGroup was null or undefined when calling createGroupWithParentGroupNameDescription.' + ); + } + if (name === null || name === undefined) { + throw new Error( + 'Required parameter name was null or undefined when calling createGroupWithParentGroupNameDescription.' + ); + } + if (description === null || description === undefined) { + throw new Error( + 'Required parameter description was null or undefined when calling createGroupWithParentGroupNameDescription.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (parentGroup !== undefined && parentGroup !== null) { + queryParameters = queryParameters.set('parentGroup', parentGroup); + } + if (name !== undefined && name !== null) { + queryParameters = queryParameters.set('name', name); + } + if (description !== undefined && description !== null) { + queryParameters = queryParameters.set('description', description); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/groupsManager/createGroup/pg-n-d`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Creates a new group in the specific VO. + * @param vo id of Vo + * @param name name of Group + * @param description description of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createGroupWithVoNameDescription( + vo: number, + name: string, + description: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public createGroupWithVoNameDescription( + vo: number, + name: string, + description: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public createGroupWithVoNameDescription( + vo: number, + name: string, + description: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public createGroupWithVoNameDescription( + vo: number, + name: string, + description: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling createGroupWithVoNameDescription.' + ); + } + if (name === null || name === undefined) { + throw new Error( + 'Required parameter name was null or undefined when calling createGroupWithVoNameDescription.' + ); + } + if (description === null || description === undefined) { + throw new Error( + 'Required parameter description was null or undefined when calling createGroupWithVoNameDescription.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (name !== undefined && name !== null) { + queryParameters = queryParameters.set('name', name); + } + if (description !== undefined && description !== null) { + queryParameters = queryParameters.set('description', description); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/groupsManager/createGroup/v-n-d`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Deletes group with given id if it contains no members and group is not assigned to any resources. If force param is true, removes group forcefully. + * @param group id of Group + * @param force If true, delete entity forcefully. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteGroup( + group: number, + force?: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public deleteGroup( + group: number, + force?: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public deleteGroup( + group: number, + force?: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public deleteGroup( + group: number, + force?: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling deleteGroup.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (force !== undefined && force !== null) { + queryParameters = queryParameters.set('force', force); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/groupsManager/deleteGroup`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Forcefully deletes a list of groups (remove all group members, remove group from resources). + * @param inputDeleteGroups + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteGroups( + inputDeleteGroups: InputDeleteGroups, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public deleteGroups( + inputDeleteGroups: InputDeleteGroups, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public deleteGroups( + inputDeleteGroups: InputDeleteGroups, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public deleteGroups( + inputDeleteGroups: InputDeleteGroups, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputDeleteGroups === null || inputDeleteGroups === undefined) { + throw new Error( + 'Required parameter inputDeleteGroups was null or undefined when calling deleteGroups.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/groupsManager/deleteGroups`, + inputDeleteGroups, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Extend member membership in given group using membershipExpirationRules attribute defined in Group. + * @param member id of Member + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public extendMembershipInGroup( + member: number, + group: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public extendMembershipInGroup( + member: number, + group: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public extendMembershipInGroup( + member: number, + group: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public extendMembershipInGroup( + member: number, + group: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling extendMembershipInGroup.' + ); + } + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling extendMembershipInGroup.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/groupsManager/extendMembershipInGroup`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Force synchronization for all subgroups (recursively - whole tree) of the group (useful for group structure). + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public forceAllSubGroupsSynchronization( + group: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public forceAllSubGroupsSynchronization( + group: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public forceAllSubGroupsSynchronization( + group: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public forceAllSubGroupsSynchronization( + group: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling forceAllSubGroupsSynchronization.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/groupsManager/forceAllSubGroupsSynchronization`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Forces group structure synchronization. + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public forceGroupStructureSynchronization( + group: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public forceGroupStructureSynchronization( + group: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public forceGroupStructureSynchronization( + group: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public forceGroupStructureSynchronization( + group: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling forceGroupStructureSynchronization.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/groupsManager/forceGroupStructureSynchronization`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Forces group synchronization. + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public forceGroupSynchronization( + group: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public forceGroupSynchronization( + group: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public forceGroupSynchronization( + group: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public forceGroupSynchronization( + group: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling forceGroupSynchronization.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/groupsManager/forceGroupSynchronization`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns all groups in a VO. + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllGroups( + vo: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAllGroups( + vo: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllGroups( + vo: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAllGroups( + vo: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getAllGroups.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/groupsManager/getAllGroups`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all groups from all vos. Returned groups are filtered based on the principal rights. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllGroupsFromAllVos( + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAllGroupsFromAllVos( + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllGroupsFromAllVos( + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAllGroupsFromAllVos( + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/groupsManager/getAllGroups/all`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns all groups for a member including group \'members\' + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllMemberGroups( + member: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAllMemberGroups( + member: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllMemberGroups( + member: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAllMemberGroups( + member: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getAllMemberGroups.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/groupsManager/getAllMemberGroups`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all groups with their specified attributes. If the attrNames are null or empty, all group attributes are returned. + * @param attrNames list of attribute names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllRichGroups( + attrNames: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAllRichGroups( + attrNames: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllRichGroups( + attrNames: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAllRichGroups( + attrNames: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (attrNames === null || attrNames === undefined) { + throw new Error( + 'Required parameter attrNames was null or undefined when calling getAllRichGroups.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/groupsManager/getAllRichGroups`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns full list of all RichGroups containing selected attributes. + * @param vo id of Vo + * @param attrNames list of attribute names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllRichGroupsWithAttributesByNames( + vo: number, + attrNames: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAllRichGroupsWithAttributesByNames( + vo: number, + attrNames: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllRichGroupsWithAttributesByNames( + vo: number, + attrNames: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAllRichGroupsWithAttributesByNames( + vo: number, + attrNames: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling getAllRichGroupsWithAttributesByNames.' + ); + } + if (attrNames === null || attrNames === undefined) { + throw new Error( + 'Required parameter attrNames was null or undefined when calling getAllRichGroupsWithAttributesByNames.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/groupsManager/getAllRichGroupsWithAttributesByNames`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns all AllRichSubGroups from parent group containing selected attributes (all level subgroups). + * @param group id of Group + * @param attrNames list of attribute names List<String> or null + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllRichSubGroupsWithGroupAttributesByNames( + group: number, + attrNames?: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAllRichSubGroupsWithGroupAttributesByNames( + group: number, + attrNames?: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllRichSubGroupsWithGroupAttributesByNames( + group: number, + attrNames?: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAllRichSubGroupsWithGroupAttributesByNames( + group: number, + attrNames?: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getAllRichSubGroupsWithGroupAttributesByNames.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/groupsManager/getAllRichSubGroupsWithAttributesByNames`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns a group by id. + * Throws GroupNotExistsException when the group doesn\'t exist. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupById(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public getGroupById( + id: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getGroupById( + id: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getGroupById( + id: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getGroupById.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/groupsManager/getGroupById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns a group by VO and Group name. IMPORTANT: need to use full name of group (ex. \'toplevel:a:b\', not the shortname which is in this example \'b\') Throws GroupNotExistsException when the group doesn\'t exist. + * @param vo id of Vo + * @param name name of entity + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupByName( + vo: number, + name: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getGroupByName( + vo: number, + name: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getGroupByName( + vo: number, + name: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getGroupByName( + vo: number, + name: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getGroupByName.'); + } + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling getGroupByName.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (name !== undefined && name !== null) { + queryParameters = queryParameters.set('name', name); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/groupsManager/getGroupByName`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get member in context of group. + * @param group id of Group + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupMemberById( + group: number, + member: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getGroupMemberById( + group: number, + member: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getGroupMemberById( + group: number, + member: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getGroupMemberById( + group: number, + member: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getGroupMemberById.' + ); + } + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getGroupMemberById.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/groupsManager/getGroupMemberById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns list of members of a group. + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupMembers( + group: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getGroupMembers( + group: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getGroupMembers( + group: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getGroupMembers( + group: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getGroupMembers.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/groupsManager/getGroupMembers`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns count of group members. + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupMembersCount( + group: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getGroupMembersCount( + group: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getGroupMembersCount( + group: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getGroupMembersCount( + group: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getGroupMembersCount.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/groupsManager/getGroupMembersCount`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns counts of group members by their group status. + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupMembersCountsByGroupStatus( + group: number, + observe?: 'body', + reportProgress?: boolean + ): Observable<{ [key: string]: number }>; + public getGroupMembersCountsByGroupStatus( + group: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getGroupMembersCountsByGroupStatus( + group: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getGroupMembersCountsByGroupStatus( + group: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getGroupMembersCountsByGroupStatus.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get<{ [key: string]: number }>( + `${this.configuration.basePath}/json/groupsManager/getGroupMembersCountsByGroupStatus`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns counts of group members by their status in VO. + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupMembersCountsByVoStatus( + group: number, + observe?: 'body', + reportProgress?: boolean + ): Observable<{ [key: string]: number }>; + public getGroupMembersCountsByVoStatus( + group: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getGroupMembersCountsByVoStatus( + group: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getGroupMembersCountsByVoStatus( + group: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getGroupMembersCountsByVoStatus.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get<{ [key: string]: number }>( + `${this.configuration.basePath}/json/groupsManager/getGroupMembersCountsByVoStatus`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns list of RichMembers with requested attributes by their member IDs from given group. Skips invalid member IDs (unknown or not members of group). Supports member, member-group (stored in memberAttributes) and user attributes (stored in userAttributes). + * @param group id of Group + * @param members id of Member + * @param attrNames list of attribute names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupRichMembersByIds( + group: number, + members: Array, + attrNames: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getGroupRichMembersByIds( + group: number, + members: Array, + attrNames: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getGroupRichMembersByIds( + group: number, + members: Array, + attrNames: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getGroupRichMembersByIds( + group: number, + members: Array, + attrNames: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getGroupRichMembersByIds.' + ); + } + if (members === null || members === undefined) { + throw new Error( + 'Required parameter members was null or undefined when calling getGroupRichMembersByIds.' + ); + } + if (attrNames === null || attrNames === undefined) { + throw new Error( + 'Required parameter attrNames was null or undefined when calling getGroupRichMembersByIds.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (members) { + members.forEach((element) => { + queryParameters = queryParameters.append('members[]', element); + }); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/groupsManager/getGroupRichMembersByIds`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Return all operand groups for specified result groups (all INCLUDED groups). If \"reverseDirection\" is TRUE than return all result groups for specified operand group (where group is INCLUDED). + * @param group id of Group + * @param reverseDirection FALSE (default) return INCLUDED groups / TRUE = return groups where INCLUDED + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupUnions( + group: number, + reverseDirection: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getGroupUnions( + group: number, + reverseDirection: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getGroupUnions( + group: number, + reverseDirection: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getGroupUnions( + group: number, + reverseDirection: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getGroupUnions.' + ); + } + if (reverseDirection === null || reverseDirection === undefined) { + throw new Error( + 'Required parameter reverseDirection was null or undefined when calling getGroupUnions.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (reverseDirection !== undefined && reverseDirection !== null) { + queryParameters = queryParameters.set('reverseDirection', reverseDirection); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/groupsManager/getGroupUnions`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns list of groups by their ids. + * @param ids list of ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupsByIds( + ids: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getGroupsByIds( + ids: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getGroupsByIds( + ids: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getGroupsByIds( + ids: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (ids === null || ids === undefined) { + throw new Error('Required parameter ids was null or undefined when calling getGroupsByIds.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (ids) { + ids.forEach((element) => { + queryParameters = queryParameters.append('ids[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/groupsManager/getGroupsByIds`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get page of groups from the given vo. + * @param inputGetPaginatedGroups + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupsPage( + inputGetPaginatedGroups: InputGetPaginatedGroups, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getGroupsPage( + inputGetPaginatedGroups: InputGetPaginatedGroups, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getGroupsPage( + inputGetPaginatedGroups: InputGetPaginatedGroups, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getGroupsPage( + inputGetPaginatedGroups: InputGetPaginatedGroups, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputGetPaginatedGroups === null || inputGetPaginatedGroups === undefined) { + throw new Error( + 'Required parameter inputGetPaginatedGroups was null or undefined when calling getGroupsPage.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/groupsManager/getGroupsPage`, + inputGetPaginatedGroups, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns unique paths of groups as list of lists of groups [CURRENT GROUP -> SUBGROUP -> ... -> MEMBER\'S SOURCE GROUP] via which member is indirectly included to the group. Cuts off after first included group. + * @param member id of Member + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getIndirectMembershipPaths( + member: number, + group: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>>; + public getIndirectMembershipPaths( + member: number, + group: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>>; + public getIndirectMembershipPaths( + member: number, + group: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>>; + public getIndirectMembershipPaths( + member: number, + group: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getIndirectMembershipPaths.' + ); + } + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getIndirectMembershipPaths.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>>( + `${this.configuration.basePath}/json/groupsManager/getIndirectMembershipPaths`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns groups for a member. + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberGroups( + member: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getMemberGroups( + member: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getMemberGroups( + member: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getMemberGroups( + member: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getMemberGroups.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/groupsManager/getMemberGroups`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns full list of member\'s RichGroups containing selected attributes. \'members\' group is not included! Supported are attributes from these namespaces: - group - member-group + * @param member id of Member + * @param attrNames list of attribute names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberRichGroupsWithAttributesByNames( + member: number, + attrNames: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getMemberRichGroupsWithAttributesByNames( + member: number, + attrNames: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getMemberRichGroupsWithAttributesByNames( + member: number, + attrNames: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getMemberRichGroupsWithAttributesByNames( + member: number, + attrNames: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getMemberRichGroupsWithAttributesByNames.' + ); + } + if (attrNames === null || attrNames === undefined) { + throw new Error( + 'Required parameter attrNames was null or undefined when calling getMemberRichGroupsWithAttributesByNames.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/groupsManager/getMemberRichGroupsWithAttributesByNames`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns RichGroup selected by id containing selected attributes + * Throws GroupNotExistsException when the group doesn\'t exist. + * @param groupId id of Group + * @param attrNames list of attribute names List<String> or null + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRichGroupByIdWithAttributesByNames( + groupId: number, + attrNames?: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getRichGroupByIdWithAttributesByNames( + groupId: number, + attrNames?: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getRichGroupByIdWithAttributesByNames( + groupId: number, + attrNames?: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getRichGroupByIdWithAttributesByNames( + groupId: number, + attrNames?: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (groupId === null || groupId === undefined) { + throw new Error( + 'Required parameter groupId was null or undefined when calling getRichGroupByIdWithAttributesByNames.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (groupId !== undefined && groupId !== null) { + queryParameters = queryParameters.set('groupId', groupId); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/groupsManager/getRichGroupByIdWithAttributesByNames`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get page of subgroups from the given parent group. + * @param inputGetPaginatedSubgroups + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getSubgroupsPage( + inputGetPaginatedSubgroups: InputGetPaginatedSubgroups, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getSubgroupsPage( + inputGetPaginatedSubgroups: InputGetPaginatedSubgroups, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getSubgroupsPage( + inputGetPaginatedSubgroups: InputGetPaginatedSubgroups, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getSubgroupsPage( + inputGetPaginatedSubgroups: InputGetPaginatedSubgroups, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputGetPaginatedSubgroups === null || inputGetPaginatedSubgroups === undefined) { + throw new Error( + 'Required parameter inputGetPaginatedSubgroups was null or undefined when calling getSubgroupsPage.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/groupsManager/getSubgroupsPage`, + inputGetPaginatedSubgroups, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Return true if Member is member of the Group. + * @param member id of Member + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public isGroupMember( + member: number, + group: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public isGroupMember( + member: number, + group: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public isGroupMember( + member: number, + group: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public isGroupMember( + member: number, + group: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling isGroupMember.' + ); + } + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling isGroupMember.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/groupsManager/isGroupMember`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Moves \"movingGroup\" (including subGroups) under \"destinationGroup\" as subGroup within same Vo. Indirect group members are also processed during move operation. + * @param movingGroup id of Group to be moved under \'destinationGroup\' + * @param destinationGroup id of Group to have \'movingGroup\' as subGroup + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public moveGroupWithDestinationGroupMovingGroup( + movingGroup: number, + destinationGroup?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public moveGroupWithDestinationGroupMovingGroup( + movingGroup: number, + destinationGroup?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public moveGroupWithDestinationGroupMovingGroup( + movingGroup: number, + destinationGroup?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public moveGroupWithDestinationGroupMovingGroup( + movingGroup: number, + destinationGroup?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (movingGroup === null || movingGroup === undefined) { + throw new Error( + 'Required parameter movingGroup was null or undefined when calling moveGroupWithDestinationGroupMovingGroup.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (destinationGroup !== undefined && destinationGroup !== null) { + queryParameters = queryParameters.set('destinationGroup', destinationGroup); + } + if (movingGroup !== undefined && movingGroup !== null) { + queryParameters = queryParameters.set('movingGroup', movingGroup); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/groupsManager/moveGroup/dg-mg`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Removes union of two groups, when \"operandGroup\" is technically removed from subgroups of \"resultGroup\". Members from \"operandGroup\" are removed from \"resultGroup\" if they were INDIRECT members sourcing from this group only. + * @param resultGroup id of Group to have removed \'operandGroup\' from subgroups + * @param operandGroup id of Group to have removed \'resultGroup\' from subgroups + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeGroupUnion( + resultGroup: number, + operandGroup: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeGroupUnion( + resultGroup: number, + operandGroup: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeGroupUnion( + resultGroup: number, + operandGroup: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeGroupUnion( + resultGroup: number, + operandGroup: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resultGroup === null || resultGroup === undefined) { + throw new Error( + 'Required parameter resultGroup was null or undefined when calling removeGroupUnion.' + ); + } + if (operandGroup === null || operandGroup === undefined) { + throw new Error( + 'Required parameter operandGroup was null or undefined when calling removeGroupUnion.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resultGroup !== undefined && resultGroup !== null) { + queryParameters = queryParameters.set('resultGroup', resultGroup); + } + if (operandGroup !== undefined && operandGroup !== null) { + queryParameters = queryParameters.set('operandGroup', operandGroup); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/groupsManager/removeGroupUnion`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Removes member from a groups. If a member is not in the group or is indirect, it is skipped without a warning, but the rest of groups are processed. + * @param groups list of Group ids List<Integer> + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeMember( + groups: Array, + member: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeMember( + groups: Array, + member: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeMember( + groups: Array, + member: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeMember( + groups: Array, + member: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (groups === null || groups === undefined) { + throw new Error('Required parameter groups was null or undefined when calling removeMember.'); + } + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling removeMember.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (groups) { + groups.forEach((element) => { + queryParameters = queryParameters.append('groups[]', element); + }); + } + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/groupsManager/removeMember`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Removes members from a group. Non-empty list of members expected. In case of empty list, no member is removed from the group. If member is not in the group or the membership is indirect, it is skipped without a warning but the rest of the members are processed. + * @param group id of Group + * @param members id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeMembers( + group: number, + members: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeMembers( + group: number, + members: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeMembers( + group: number, + members: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeMembers( + group: number, + members: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error('Required parameter group was null or undefined when calling removeMembers.'); + } + if (members === null || members === undefined) { + throw new Error( + 'Required parameter members was null or undefined when calling removeMembers.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (members) { + members.forEach((element) => { + queryParameters = queryParameters.append('members[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/groupsManager/removeMembers`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Set membership status of a member in a group. Please note, that resulting Status after change is calculated from all members sub-groups and groups in relation sourcing this member. If in any of them is VALID, resulting status is still VALID. + * @param member id of Member + * @param group id of Group + * @param status status (VALID | EXPIRED) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setGroupsMemberStatus( + member: number, + group: number, + status: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setGroupsMemberStatus( + member: number, + group: number, + status: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setGroupsMemberStatus( + member: number, + group: number, + status: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setGroupsMemberStatus( + member: number, + group: number, + status: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling setGroupsMemberStatus.' + ); + } + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling setGroupsMemberStatus.' + ); + } + if (status === null || status === undefined) { + throw new Error( + 'Required parameter status was null or undefined when calling setGroupsMemberStatus.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (status !== undefined && status !== null) { + queryParameters = queryParameters.set('status', status); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/groupsManager/setGroupsMemberStatus`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Updates a group. + * @param inputUpdateGroup + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateGroup( + inputUpdateGroup: InputUpdateGroup, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public updateGroup( + inputUpdateGroup: InputUpdateGroup, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public updateGroup( + inputUpdateGroup: InputUpdateGroup, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public updateGroup( + inputUpdateGroup: InputUpdateGroup, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputUpdateGroup === null || inputUpdateGroup === undefined) { + throw new Error( + 'Required parameter inputUpdateGroup was null or undefined when calling updateGroup.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - - - /** - * Add member to groups. If already a member of a group, the group will be skipped. - * @param groups list of Group ids List<Integer> - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addMember(groups: Array, member: number, observe?: 'body', reportProgress?: boolean): Observable; - public addMember(groups: Array, member: number, observe?: 'response', reportProgress?: boolean): Observable>; - public addMember(groups: Array, member: number, observe?: 'events', reportProgress?: boolean): Observable>; - public addMember(groups: Array, member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (groups === null || groups === undefined) { - throw new Error('Required parameter groups was null or undefined when calling addMember.'); - } - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling addMember.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (groups) { - groups.forEach((element) => { - queryParameters = queryParameters.append('groups[]', element); - }) - } - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/groupsManager/addMember`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Adds members to a group. If already a member of the group, the member will be skipped. Non-empty list of members expected, if empty, no member will be added. - * @param group id of Group - * @param members id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addMembers(group: number, members: Array, observe?: 'body', reportProgress?: boolean): Observable; - public addMembers(group: number, members: Array, observe?: 'response', reportProgress?: boolean): Observable>; - public addMembers(group: number, members: Array, observe?: 'events', reportProgress?: boolean): Observable>; - public addMembers(group: number, members: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling addMembers.'); - } - if (members === null || members === undefined) { - throw new Error('Required parameter members was null or undefined when calling addMembers.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (members) { - members.forEach((element) => { - queryParameters = queryParameters.append('members[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/groupsManager/addMembers`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns true if member in given group can extend membership or if no rules were set for the membershipExpiration, otherwise false. - * @param member id of Member - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public canExtendMembershipInGroup(member: number, group: number, observe?: 'body', reportProgress?: boolean): Observable; - public canExtendMembershipInGroup(member: number, group: number, observe?: 'response', reportProgress?: boolean): Observable>; - public canExtendMembershipInGroup(member: number, group: number, observe?: 'events', reportProgress?: boolean): Observable>; - public canExtendMembershipInGroup(member: number, group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling canExtendMembershipInGroup.'); - } - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling canExtendMembershipInGroup.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/groupsManager/canExtendMembershipInGroup`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Create union of two groups, where \"operandGroup\" is technically set as subgroup of \"resultGroup\". Members from \"operandGroup\" are added to \"resultGroup\" as INDIRECT members. Union is honored also in all group member changing operations. - * @param resultGroup id of Group to have removed \'operandGroup\' from subgroups - * @param operandGroup id of Group to have removed \'resultGroup\' from subgroups - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createGroupUnion(resultGroup: number, operandGroup: number, observe?: 'body', reportProgress?: boolean): Observable; - public createGroupUnion(resultGroup: number, operandGroup: number, observe?: 'response', reportProgress?: boolean): Observable>; - public createGroupUnion(resultGroup: number, operandGroup: number, observe?: 'events', reportProgress?: boolean): Observable>; - public createGroupUnion(resultGroup: number, operandGroup: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resultGroup === null || resultGroup === undefined) { - throw new Error('Required parameter resultGroup was null or undefined when calling createGroupUnion.'); - } - if (operandGroup === null || operandGroup === undefined) { - throw new Error('Required parameter operandGroup was null or undefined when calling createGroupUnion.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resultGroup !== undefined && resultGroup !== null) { - queryParameters = queryParameters.set('resultGroup', resultGroup); - } - if (operandGroup !== undefined && operandGroup !== null) { - queryParameters = queryParameters.set('operandGroup', operandGroup); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/groupsManager/createGroupUnion`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Creates a subgroup of a group. - * @param parentGroup Parent Group id - * @param name name of Group - * @param description description of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createGroupWithParentGroupNameDescription(parentGroup: number, name: string, description: string, observe?: 'body', reportProgress?: boolean): Observable; - public createGroupWithParentGroupNameDescription(parentGroup: number, name: string, description: string, observe?: 'response', reportProgress?: boolean): Observable>; - public createGroupWithParentGroupNameDescription(parentGroup: number, name: string, description: string, observe?: 'events', reportProgress?: boolean): Observable>; - public createGroupWithParentGroupNameDescription(parentGroup: number, name: string, description: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (parentGroup === null || parentGroup === undefined) { - throw new Error('Required parameter parentGroup was null or undefined when calling createGroupWithParentGroupNameDescription.'); - } - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling createGroupWithParentGroupNameDescription.'); - } - if (description === null || description === undefined) { - throw new Error('Required parameter description was null or undefined when calling createGroupWithParentGroupNameDescription.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (parentGroup !== undefined && parentGroup !== null) { - queryParameters = queryParameters.set('parentGroup', parentGroup); - } - if (name !== undefined && name !== null) { - queryParameters = queryParameters.set('name', name); - } - if (description !== undefined && description !== null) { - queryParameters = queryParameters.set('description', description); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/groupsManager/createGroup/pg-n-d`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Creates a new group in the specific VO. - * @param vo id of Vo - * @param name name of Group - * @param description description of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createGroupWithVoNameDescription(vo: number, name: string, description: string, observe?: 'body', reportProgress?: boolean): Observable; - public createGroupWithVoNameDescription(vo: number, name: string, description: string, observe?: 'response', reportProgress?: boolean): Observable>; - public createGroupWithVoNameDescription(vo: number, name: string, description: string, observe?: 'events', reportProgress?: boolean): Observable>; - public createGroupWithVoNameDescription(vo: number, name: string, description: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling createGroupWithVoNameDescription.'); - } - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling createGroupWithVoNameDescription.'); - } - if (description === null || description === undefined) { - throw new Error('Required parameter description was null or undefined when calling createGroupWithVoNameDescription.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (name !== undefined && name !== null) { - queryParameters = queryParameters.set('name', name); - } - if (description !== undefined && description !== null) { - queryParameters = queryParameters.set('description', description); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/groupsManager/createGroup/v-n-d`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Deletes group with given id if it contains no members and group is not assigned to any resources. If force param is true, removes group forcefully. - * @param group id of Group - * @param force If true, delete entity forcefully. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteGroup(group: number, force?: boolean, observe?: 'body', reportProgress?: boolean): Observable; - public deleteGroup(group: number, force?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteGroup(group: number, force?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteGroup(group: number, force?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling deleteGroup.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (force !== undefined && force !== null) { - queryParameters = queryParameters.set('force', force); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/groupsManager/deleteGroup`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Forcefully deletes a list of groups (remove all group members, remove group from resources). - * @param inputDeleteGroups - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteGroups(inputDeleteGroups: InputDeleteGroups, observe?: 'body', reportProgress?: boolean): Observable; - public deleteGroups(inputDeleteGroups: InputDeleteGroups, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteGroups(inputDeleteGroups: InputDeleteGroups, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteGroups(inputDeleteGroups: InputDeleteGroups, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputDeleteGroups === null || inputDeleteGroups === undefined) { - throw new Error('Required parameter inputDeleteGroups was null or undefined when calling deleteGroups.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/groupsManager/deleteGroups`, - inputDeleteGroups, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Extend member membership in given group using membershipExpirationRules attribute defined in Group. - * @param member id of Member - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public extendMembershipInGroup(member: number, group: number, observe?: 'body', reportProgress?: boolean): Observable; - public extendMembershipInGroup(member: number, group: number, observe?: 'response', reportProgress?: boolean): Observable>; - public extendMembershipInGroup(member: number, group: number, observe?: 'events', reportProgress?: boolean): Observable>; - public extendMembershipInGroup(member: number, group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling extendMembershipInGroup.'); - } - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling extendMembershipInGroup.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/groupsManager/extendMembershipInGroup`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Force synchronization for all subgroups (recursively - whole tree) of the group (useful for group structure). - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public forceAllSubGroupsSynchronization(group: number, observe?: 'body', reportProgress?: boolean): Observable; - public forceAllSubGroupsSynchronization(group: number, observe?: 'response', reportProgress?: boolean): Observable>; - public forceAllSubGroupsSynchronization(group: number, observe?: 'events', reportProgress?: boolean): Observable>; - public forceAllSubGroupsSynchronization(group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling forceAllSubGroupsSynchronization.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/groupsManager/forceAllSubGroupsSynchronization`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Forces group structure synchronization. - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public forceGroupStructureSynchronization(group: number, observe?: 'body', reportProgress?: boolean): Observable; - public forceGroupStructureSynchronization(group: number, observe?: 'response', reportProgress?: boolean): Observable>; - public forceGroupStructureSynchronization(group: number, observe?: 'events', reportProgress?: boolean): Observable>; - public forceGroupStructureSynchronization(group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling forceGroupStructureSynchronization.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/groupsManager/forceGroupStructureSynchronization`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Forces group synchronization. - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public forceGroupSynchronization(group: number, observe?: 'body', reportProgress?: boolean): Observable; - public forceGroupSynchronization(group: number, observe?: 'response', reportProgress?: boolean): Observable>; - public forceGroupSynchronization(group: number, observe?: 'events', reportProgress?: boolean): Observable>; - public forceGroupSynchronization(group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling forceGroupSynchronization.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/groupsManager/forceGroupSynchronization`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns all groups in a VO. - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllGroups(vo: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAllGroups(vo: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllGroups(vo: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllGroups(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getAllGroups.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/groupsManager/getAllGroups`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all groups from all vos. Returned groups are filtered based on the principal rights. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllGroupsFromAllVos(observe?: 'body', reportProgress?: boolean): Observable>; - public getAllGroupsFromAllVos(observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllGroupsFromAllVos(observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllGroupsFromAllVos(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/groupsManager/getAllGroups/all`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns all groups for a member including group \'members\' - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllMemberGroups(member: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAllMemberGroups(member: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllMemberGroups(member: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllMemberGroups(member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getAllMemberGroups.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/groupsManager/getAllMemberGroups`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all groups with their specified attributes. If the attrNames are null or empty, all group attributes are returned. - * @param attrNames list of attribute names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllRichGroups(attrNames: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getAllRichGroups(attrNames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllRichGroups(attrNames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllRichGroups(attrNames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (attrNames === null || attrNames === undefined) { - throw new Error('Required parameter attrNames was null or undefined when calling getAllRichGroups.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/groupsManager/getAllRichGroups`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns full list of all RichGroups containing selected attributes. - * @param vo id of Vo - * @param attrNames list of attribute names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllRichGroupsWithAttributesByNames(vo: number, attrNames: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getAllRichGroupsWithAttributesByNames(vo: number, attrNames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllRichGroupsWithAttributesByNames(vo: number, attrNames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllRichGroupsWithAttributesByNames(vo: number, attrNames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getAllRichGroupsWithAttributesByNames.'); - } - if (attrNames === null || attrNames === undefined) { - throw new Error('Required parameter attrNames was null or undefined when calling getAllRichGroupsWithAttributesByNames.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/groupsManager/getAllRichGroupsWithAttributesByNames`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns all AllRichSubGroups from parent group containing selected attributes (all level subgroups). - * @param group id of Group - * @param attrNames list of attribute names List<String> or null - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllRichSubGroupsWithGroupAttributesByNames(group: number, attrNames?: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getAllRichSubGroupsWithGroupAttributesByNames(group: number, attrNames?: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllRichSubGroupsWithGroupAttributesByNames(group: number, attrNames?: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllRichSubGroupsWithGroupAttributesByNames(group: number, attrNames?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getAllRichSubGroupsWithGroupAttributesByNames.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/groupsManager/getAllRichSubGroupsWithAttributesByNames`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns a group by id. - * Throws GroupNotExistsException when the group doesn\'t exist. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupById(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public getGroupById(id: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getGroupById(id: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getGroupById(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getGroupById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/groupsManager/getGroupById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns a group by VO and Group name. IMPORTANT: need to use full name of group (ex. \'toplevel:a:b\', not the shortname which is in this example \'b\') Throws GroupNotExistsException when the group doesn\'t exist. - * @param vo id of Vo - * @param name name of entity - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupByName(vo: number, name: string, observe?: 'body', reportProgress?: boolean): Observable; - public getGroupByName(vo: number, name: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getGroupByName(vo: number, name: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getGroupByName(vo: number, name: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getGroupByName.'); - } - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling getGroupByName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (name !== undefined && name !== null) { - queryParameters = queryParameters.set('name', name); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/groupsManager/getGroupByName`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get member in context of group. - * @param group id of Group - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupMemberById(group: number, member: number, observe?: 'body', reportProgress?: boolean): Observable; - public getGroupMemberById(group: number, member: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getGroupMemberById(group: number, member: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getGroupMemberById(group: number, member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getGroupMemberById.'); - } - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getGroupMemberById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/groupsManager/getGroupMemberById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns list of members of a group. - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupMembers(group: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getGroupMembers(group: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getGroupMembers(group: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getGroupMembers(group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getGroupMembers.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/groupsManager/getGroupMembers`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns count of group members. - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupMembersCount(group: number, observe?: 'body', reportProgress?: boolean): Observable; - public getGroupMembersCount(group: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getGroupMembersCount(group: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getGroupMembersCount(group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getGroupMembersCount.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/groupsManager/getGroupMembersCount`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns counts of group members by their group status. - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupMembersCountsByGroupStatus(group: number, observe?: 'body', reportProgress?: boolean): Observable<{ [key: string]: number; }>; - public getGroupMembersCountsByGroupStatus(group: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getGroupMembersCountsByGroupStatus(group: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getGroupMembersCountsByGroupStatus(group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getGroupMembersCountsByGroupStatus.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}/json/groupsManager/getGroupMembersCountsByGroupStatus`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns counts of group members by their status in VO. - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupMembersCountsByVoStatus(group: number, observe?: 'body', reportProgress?: boolean): Observable<{ [key: string]: number; }>; - public getGroupMembersCountsByVoStatus(group: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getGroupMembersCountsByVoStatus(group: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getGroupMembersCountsByVoStatus(group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getGroupMembersCountsByVoStatus.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}/json/groupsManager/getGroupMembersCountsByVoStatus`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns list of RichMembers with requested attributes by their member IDs from given group. Skips invalid member IDs (unknown or not members of group). Supports member, member-group (stored in memberAttributes) and user attributes (stored in userAttributes). - * @param group id of Group - * @param members id of Member - * @param attrNames list of attribute names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupRichMembersByIds(group: number, members: Array, attrNames: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getGroupRichMembersByIds(group: number, members: Array, attrNames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getGroupRichMembersByIds(group: number, members: Array, attrNames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getGroupRichMembersByIds(group: number, members: Array, attrNames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getGroupRichMembersByIds.'); - } - if (members === null || members === undefined) { - throw new Error('Required parameter members was null or undefined when calling getGroupRichMembersByIds.'); - } - if (attrNames === null || attrNames === undefined) { - throw new Error('Required parameter attrNames was null or undefined when calling getGroupRichMembersByIds.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (members) { - members.forEach((element) => { - queryParameters = queryParameters.append('members[]', element); - }) - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/groupsManager/getGroupRichMembersByIds`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Return all operand groups for specified result groups (all INCLUDED groups). If \"reverseDirection\" is TRUE than return all result groups for specified operand group (where group is INCLUDED). - * @param group id of Group - * @param reverseDirection FALSE (default) return INCLUDED groups / TRUE = return groups where INCLUDED - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupUnions(group: number, reverseDirection: boolean, observe?: 'body', reportProgress?: boolean): Observable>; - public getGroupUnions(group: number, reverseDirection: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; - public getGroupUnions(group: number, reverseDirection: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; - public getGroupUnions(group: number, reverseDirection: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getGroupUnions.'); - } - if (reverseDirection === null || reverseDirection === undefined) { - throw new Error('Required parameter reverseDirection was null or undefined when calling getGroupUnions.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (reverseDirection !== undefined && reverseDirection !== null) { - queryParameters = queryParameters.set('reverseDirection', reverseDirection); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/groupsManager/getGroupUnions`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns list of groups by their ids. - * @param ids list of ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupsByIds(ids: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getGroupsByIds(ids: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getGroupsByIds(ids: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getGroupsByIds(ids: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (ids === null || ids === undefined) { - throw new Error('Required parameter ids was null or undefined when calling getGroupsByIds.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (ids) { - ids.forEach((element) => { - queryParameters = queryParameters.append('ids[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/groupsManager/getGroupsByIds`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get page of groups from the given vo. - * @param inputGetPaginatedGroups - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupsPage(inputGetPaginatedGroups: InputGetPaginatedGroups, observe?: 'body', reportProgress?: boolean): Observable; - public getGroupsPage(inputGetPaginatedGroups: InputGetPaginatedGroups, observe?: 'response', reportProgress?: boolean): Observable>; - public getGroupsPage(inputGetPaginatedGroups: InputGetPaginatedGroups, observe?: 'events', reportProgress?: boolean): Observable>; - public getGroupsPage(inputGetPaginatedGroups: InputGetPaginatedGroups, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputGetPaginatedGroups === null || inputGetPaginatedGroups === undefined) { - throw new Error('Required parameter inputGetPaginatedGroups was null or undefined when calling getGroupsPage.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/groupsManager/getGroupsPage`, - inputGetPaginatedGroups, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns unique paths of groups as list of lists of groups [CURRENT GROUP -> SUBGROUP -> ... -> MEMBER\'S SOURCE GROUP] via which member is indirectly included to the group. Cuts off after first included group. - * @param member id of Member - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getIndirectMembershipPaths(member: number, group: number, observe?: 'body', reportProgress?: boolean): Observable>>; - public getIndirectMembershipPaths(member: number, group: number, observe?: 'response', reportProgress?: boolean): Observable>>>; - public getIndirectMembershipPaths(member: number, group: number, observe?: 'events', reportProgress?: boolean): Observable>>>; - public getIndirectMembershipPaths(member: number, group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getIndirectMembershipPaths.'); - } - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getIndirectMembershipPaths.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>>(`${this.configuration.basePath}/json/groupsManager/getIndirectMembershipPaths`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns groups for a member. - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberGroups(member: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getMemberGroups(member: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getMemberGroups(member: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getMemberGroups(member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getMemberGroups.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/groupsManager/getMemberGroups`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns full list of member\'s RichGroups containing selected attributes. \'members\' group is not included! Supported are attributes from these namespaces: - group - member-group - * @param member id of Member - * @param attrNames list of attribute names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberRichGroupsWithAttributesByNames(member: number, attrNames: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getMemberRichGroupsWithAttributesByNames(member: number, attrNames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getMemberRichGroupsWithAttributesByNames(member: number, attrNames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getMemberRichGroupsWithAttributesByNames(member: number, attrNames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getMemberRichGroupsWithAttributesByNames.'); - } - if (attrNames === null || attrNames === undefined) { - throw new Error('Required parameter attrNames was null or undefined when calling getMemberRichGroupsWithAttributesByNames.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/groupsManager/getMemberRichGroupsWithAttributesByNames`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns RichGroup selected by id containing selected attributes - * Throws GroupNotExistsException when the group doesn\'t exist. - * @param groupId id of Group - * @param attrNames list of attribute names List<String> or null - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRichGroupByIdWithAttributesByNames(groupId: number, attrNames?: Array, observe?: 'body', reportProgress?: boolean): Observable; - public getRichGroupByIdWithAttributesByNames(groupId: number, attrNames?: Array, observe?: 'response', reportProgress?: boolean): Observable>; - public getRichGroupByIdWithAttributesByNames(groupId: number, attrNames?: Array, observe?: 'events', reportProgress?: boolean): Observable>; - public getRichGroupByIdWithAttributesByNames(groupId: number, attrNames?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (groupId === null || groupId === undefined) { - throw new Error('Required parameter groupId was null or undefined when calling getRichGroupByIdWithAttributesByNames.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (groupId !== undefined && groupId !== null) { - queryParameters = queryParameters.set('groupId', groupId); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/groupsManager/getRichGroupByIdWithAttributesByNames`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get page of subgroups from the given parent group. - * @param inputGetPaginatedSubgroups - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getSubgroupsPage(inputGetPaginatedSubgroups: InputGetPaginatedSubgroups, observe?: 'body', reportProgress?: boolean): Observable; - public getSubgroupsPage(inputGetPaginatedSubgroups: InputGetPaginatedSubgroups, observe?: 'response', reportProgress?: boolean): Observable>; - public getSubgroupsPage(inputGetPaginatedSubgroups: InputGetPaginatedSubgroups, observe?: 'events', reportProgress?: boolean): Observable>; - public getSubgroupsPage(inputGetPaginatedSubgroups: InputGetPaginatedSubgroups, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputGetPaginatedSubgroups === null || inputGetPaginatedSubgroups === undefined) { - throw new Error('Required parameter inputGetPaginatedSubgroups was null or undefined when calling getSubgroupsPage.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/groupsManager/getSubgroupsPage`, - inputGetPaginatedSubgroups, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Return true if Member is member of the Group. - * @param member id of Member - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public isGroupMember(member: number, group: number, observe?: 'body', reportProgress?: boolean): Observable; - public isGroupMember(member: number, group: number, observe?: 'response', reportProgress?: boolean): Observable>; - public isGroupMember(member: number, group: number, observe?: 'events', reportProgress?: boolean): Observable>; - public isGroupMember(member: number, group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling isGroupMember.'); - } - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling isGroupMember.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/groupsManager/isGroupMember`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Moves \"movingGroup\" (including subGroups) under \"destinationGroup\" as subGroup within same Vo. Indirect group members are also processed during move operation. - * @param movingGroup id of Group to be moved under \'destinationGroup\' - * @param destinationGroup id of Group to have \'movingGroup\' as subGroup - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public moveGroupWithDestinationGroupMovingGroup(movingGroup: number, destinationGroup?: number, observe?: 'body', reportProgress?: boolean): Observable; - public moveGroupWithDestinationGroupMovingGroup(movingGroup: number, destinationGroup?: number, observe?: 'response', reportProgress?: boolean): Observable>; - public moveGroupWithDestinationGroupMovingGroup(movingGroup: number, destinationGroup?: number, observe?: 'events', reportProgress?: boolean): Observable>; - public moveGroupWithDestinationGroupMovingGroup(movingGroup: number, destinationGroup?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (movingGroup === null || movingGroup === undefined) { - throw new Error('Required parameter movingGroup was null or undefined when calling moveGroupWithDestinationGroupMovingGroup.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (destinationGroup !== undefined && destinationGroup !== null) { - queryParameters = queryParameters.set('destinationGroup', destinationGroup); - } - if (movingGroup !== undefined && movingGroup !== null) { - queryParameters = queryParameters.set('movingGroup', movingGroup); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/groupsManager/moveGroup/dg-mg`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Removes union of two groups, when \"operandGroup\" is technically removed from subgroups of \"resultGroup\". Members from \"operandGroup\" are removed from \"resultGroup\" if they were INDIRECT members sourcing from this group only. - * @param resultGroup id of Group to have removed \'operandGroup\' from subgroups - * @param operandGroup id of Group to have removed \'resultGroup\' from subgroups - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeGroupUnion(resultGroup: number, operandGroup: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeGroupUnion(resultGroup: number, operandGroup: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeGroupUnion(resultGroup: number, operandGroup: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeGroupUnion(resultGroup: number, operandGroup: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resultGroup === null || resultGroup === undefined) { - throw new Error('Required parameter resultGroup was null or undefined when calling removeGroupUnion.'); - } - if (operandGroup === null || operandGroup === undefined) { - throw new Error('Required parameter operandGroup was null or undefined when calling removeGroupUnion.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resultGroup !== undefined && resultGroup !== null) { - queryParameters = queryParameters.set('resultGroup', resultGroup); - } - if (operandGroup !== undefined && operandGroup !== null) { - queryParameters = queryParameters.set('operandGroup', operandGroup); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/groupsManager/removeGroupUnion`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Removes member from a groups. If a member is not in the group or is indirect, it is skipped without a warning, but the rest of groups are processed. - * @param groups list of Group ids List<Integer> - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeMember(groups: Array, member: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeMember(groups: Array, member: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeMember(groups: Array, member: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeMember(groups: Array, member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (groups === null || groups === undefined) { - throw new Error('Required parameter groups was null or undefined when calling removeMember.'); - } - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling removeMember.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (groups) { - groups.forEach((element) => { - queryParameters = queryParameters.append('groups[]', element); - }) - } - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/groupsManager/removeMember`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Removes members from a group. Non-empty list of members expected. In case of empty list, no member is removed from the group. If member is not in the group or the membership is indirect, it is skipped without a warning but the rest of the members are processed. - * @param group id of Group - * @param members id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeMembers(group: number, members: Array, observe?: 'body', reportProgress?: boolean): Observable; - public removeMembers(group: number, members: Array, observe?: 'response', reportProgress?: boolean): Observable>; - public removeMembers(group: number, members: Array, observe?: 'events', reportProgress?: boolean): Observable>; - public removeMembers(group: number, members: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling removeMembers.'); - } - if (members === null || members === undefined) { - throw new Error('Required parameter members was null or undefined when calling removeMembers.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (members) { - members.forEach((element) => { - queryParameters = queryParameters.append('members[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/groupsManager/removeMembers`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Set membership status of a member in a group. Please note, that resulting Status after change is calculated from all members sub-groups and groups in relation sourcing this member. If in any of them is VALID, resulting status is still VALID. - * @param member id of Member - * @param group id of Group - * @param status status (VALID | EXPIRED) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setGroupsMemberStatus(member: number, group: number, status: string, observe?: 'body', reportProgress?: boolean): Observable; - public setGroupsMemberStatus(member: number, group: number, status: string, observe?: 'response', reportProgress?: boolean): Observable>; - public setGroupsMemberStatus(member: number, group: number, status: string, observe?: 'events', reportProgress?: boolean): Observable>; - public setGroupsMemberStatus(member: number, group: number, status: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling setGroupsMemberStatus.'); - } - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling setGroupsMemberStatus.'); - } - if (status === null || status === undefined) { - throw new Error('Required parameter status was null or undefined when calling setGroupsMemberStatus.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (status !== undefined && status !== null) { - queryParameters = queryParameters.set('status', status); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/groupsManager/setGroupsMemberStatus`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Updates a group. - * @param inputUpdateGroup - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateGroup(inputUpdateGroup: InputUpdateGroup, observe?: 'body', reportProgress?: boolean): Observable; - public updateGroup(inputUpdateGroup: InputUpdateGroup, observe?: 'response', reportProgress?: boolean): Observable>; - public updateGroup(inputUpdateGroup: InputUpdateGroup, observe?: 'events', reportProgress?: boolean): Observable>; - public updateGroup(inputUpdateGroup: InputUpdateGroup, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputUpdateGroup === null || inputUpdateGroup === undefined) { - throw new Error('Required parameter inputUpdateGroup was null or undefined when calling updateGroup.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/groupsManager/updateGroup`, - inputUpdateGroup, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); } + return this.httpClient.post( + `${this.configuration.basePath}/json/groupsManager/updateGroup`, + inputUpdateGroup, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } } diff --git a/libs/perun/openapi/src/lib/api/integrationManager.service.ts b/libs/perun/openapi/src/lib/api/integrationManager.service.ts index b9d924a08..ab20eaca8 100644 --- a/libs/perun/openapi/src/lib/api/integrationManager.service.ts +++ b/libs/perun/openapi/src/lib/api/integrationManager.service.ts @@ -11,91 +11,109 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { GroupMemberData } from '../model/groupMemberData'; import { PerunException } from '../model/perunException'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - - +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class IntegrationManagerService { - - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string, + @Optional() configuration: Configuration + ) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + /** + * Get all member-group relations for all groups with all member-group attributes. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupMemberData( + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getGroupMemberData( + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getGroupMemberData( + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getGroupMemberData( + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); } - - - /** - * Get all member-group relations for all groups with all member-group attributes. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupMemberData(observe?: 'body', reportProgress?: boolean): Observable; - public getGroupMemberData(observe?: 'response', reportProgress?: boolean): Observable>; - public getGroupMemberData(observe?: 'events', reportProgress?: boolean): Observable>; - public getGroupMemberData(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/integrationManager/getGroupMemberData`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); } + return this.httpClient.get( + `${this.configuration.basePath}/json/integrationManager/getGroupMemberData`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } } diff --git a/libs/perun/openapi/src/lib/api/membersManager.service.ts b/libs/perun/openapi/src/lib/api/membersManager.service.ts index ae225ee50..f20ba5c37 100644 --- a/libs/perun/openapi/src/lib/api/membersManager.service.ts +++ b/libs/perun/openapi/src/lib/api/membersManager.service.ts @@ -11,11 +11,17 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { InputCreateMemberForCandidate } from '../model/inputCreateMemberForCandidate'; import { InputCreateMemberForUser } from '../model/inputCreateMemberForUser'; @@ -35,3266 +41,4513 @@ import { RichMember } from '../model/richMember'; import { RichUser } from '../model/richUser'; import { VoMemberStatuses } from '../model/voMemberStatuses'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - - +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class MembersManagerService { + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string, + @Optional() configuration: Configuration + ) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + /** + * Return true if the membership can be extended or if no rules were set for the membershipExpiration, otherwise false. + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public canExtendMembership( + member: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public canExtendMembership( + member: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public canExtendMembership( + member: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public canExtendMembership( + member: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling canExtendMembership.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/membersManager/canExtendMembership`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Creates a new member from candidate returned by the method VosManager.findCandidates which fills Candidate.userExtSource. This method also add user to all groups in list. Empty list of groups is ok, the behavior is then same like in the method without list of groups. This method runs asynchronously + * @param inputCreateMemberForCandidate + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createMemberForCandidate( + inputCreateMemberForCandidate: InputCreateMemberForCandidate, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public createMemberForCandidate( + inputCreateMemberForCandidate: InputCreateMemberForCandidate, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public createMemberForCandidate( + inputCreateMemberForCandidate: InputCreateMemberForCandidate, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public createMemberForCandidate( + inputCreateMemberForCandidate: InputCreateMemberForCandidate, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputCreateMemberForCandidate === null || inputCreateMemberForCandidate === undefined) { + throw new Error( + 'Required parameter inputCreateMemberForCandidate was null or undefined when calling createMemberForCandidate.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/membersManager/createMember/c`, + inputCreateMemberForCandidate, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Creates a new member from user. This method also add user to all groups in list. Empty list of groups is ok, the behavior is then same like in the method without list of groups. + * @param inputCreateMemberForUser + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createMemberForUser( + inputCreateMemberForUser: InputCreateMemberForUser, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public createMemberForUser( + inputCreateMemberForUser: InputCreateMemberForUser, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public createMemberForUser( + inputCreateMemberForUser: InputCreateMemberForUser, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public createMemberForUser( + inputCreateMemberForUser: InputCreateMemberForUser, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputCreateMemberForUser === null || inputCreateMemberForUser === undefined) { + throw new Error( + 'Required parameter inputCreateMemberForUser was null or undefined when calling createMemberForUser.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/membersManager/createMember/u`, + inputCreateMemberForUser, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Creates a new member and sets all member\'s attributes from the candidate. Also stores the associated user if doesn\'t exist. This method is used by the registrar. This method also add user to all groups in list. Empty list of groups is ok, the behavior is then same like in the method without list of groups. + * @param inputCreateMemberFromExtSource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createMemberFromExtSource( + inputCreateMemberFromExtSource: InputCreateMemberFromExtSource, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public createMemberFromExtSource( + inputCreateMemberFromExtSource: InputCreateMemberFromExtSource, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public createMemberFromExtSource( + inputCreateMemberFromExtSource: InputCreateMemberFromExtSource, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public createMemberFromExtSource( + inputCreateMemberFromExtSource: InputCreateMemberFromExtSource, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputCreateMemberFromExtSource === null || inputCreateMemberFromExtSource === undefined) { + throw new Error( + 'Required parameter inputCreateMemberFromExtSource was null or undefined when calling createMemberFromExtSource.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/membersManager/createMember/extSource`, + inputCreateMemberFromExtSource, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Creates a new member from candidate which is prepared for creating specificUser. + * @param inputSpecificMember + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createSpecificMember( + inputSpecificMember: InputSpecificMember, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public createSpecificMember( + inputSpecificMember: InputSpecificMember, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public createSpecificMember( + inputSpecificMember: InputSpecificMember, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public createSpecificMember( + inputSpecificMember: InputSpecificMember, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputSpecificMember === null || inputSpecificMember === undefined) { + throw new Error( + 'Required parameter inputSpecificMember was null or undefined when calling createSpecificMember.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/membersManager/createSpecificMember`, + inputSpecificMember, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Creates a new sponsored member in a given VO and namespace. + * @param inputCreateSponsoredMember + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createSponsoredMember( + inputCreateSponsoredMember: InputCreateSponsoredMember, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public createSponsoredMember( + inputCreateSponsoredMember: InputCreateSponsoredMember, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public createSponsoredMember( + inputCreateSponsoredMember: InputCreateSponsoredMember, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public createSponsoredMember( + inputCreateSponsoredMember: InputCreateSponsoredMember, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputCreateSponsoredMember === null || inputCreateSponsoredMember === undefined) { + throw new Error( + 'Required parameter inputCreateSponsoredMember was null or undefined when calling createSponsoredMember.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/membersManager/createSponsoredMember/withFullName`, + inputCreateSponsoredMember, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Creates new sponsored members in a given VO and namespace. + * @param inputCreateSponsoredMember1 + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createSponsoredMembers( + inputCreateSponsoredMember1: InputCreateSponsoredMember1, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public createSponsoredMembers( + inputCreateSponsoredMember1: InputCreateSponsoredMember1, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public createSponsoredMembers( + inputCreateSponsoredMember1: InputCreateSponsoredMember1, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public createSponsoredMembers( + inputCreateSponsoredMember1: InputCreateSponsoredMember1, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputCreateSponsoredMember1 === null || inputCreateSponsoredMember1 === undefined) { + throw new Error( + 'Required parameter inputCreateSponsoredMember1 was null or undefined when calling createSponsoredMembers.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post>( + `${this.configuration.basePath}/json/membersManager/createSponsoredMembers`, + inputCreateSponsoredMember1, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Creates new sponsored members in a given VO and namespace. + * @param inputCreateSponsoredMemberFromCSV + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createSponsoredMembersFromCSV( + inputCreateSponsoredMemberFromCSV: InputCreateSponsoredMemberFromCSV, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public createSponsoredMembersFromCSV( + inputCreateSponsoredMemberFromCSV: InputCreateSponsoredMemberFromCSV, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public createSponsoredMembersFromCSV( + inputCreateSponsoredMemberFromCSV: InputCreateSponsoredMemberFromCSV, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public createSponsoredMembersFromCSV( + inputCreateSponsoredMemberFromCSV: InputCreateSponsoredMemberFromCSV, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if ( + inputCreateSponsoredMemberFromCSV === null || + inputCreateSponsoredMemberFromCSV === undefined + ) { + throw new Error( + 'Required parameter inputCreateSponsoredMemberFromCSV was null or undefined when calling createSponsoredMembersFromCSV.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post>( + `${this.configuration.basePath}/json/membersManager/createSponsoredMembersFromCSV`, + inputCreateSponsoredMemberFromCSV, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Deletes only member data appropriated by member id. + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteMember(member: number, observe?: 'body', reportProgress?: boolean): Observable; + public deleteMember( + member: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public deleteMember( + member: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public deleteMember( + member: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling deleteMember.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/membersManager/deleteMember`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Delete members with given ids. It is possible to delete members from multiple vos. + * @param members id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteMembers( + members: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public deleteMembers( + members: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public deleteMembers( + members: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public deleteMembers( + members: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (members === null || members === undefined) { + throw new Error( + 'Required parameter members was null or undefined when calling deleteMembers.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (members) { + members.forEach((element) => { + queryParameters = queryParameters.append('members[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/membersManager/deleteMembers`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Extend member membership using membershipExpirationRules attribute defined at VO. + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public extendMembership( + member: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public extendMembership( + member: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public extendMembership( + member: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public extendMembership( + member: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling extendMembership.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/membersManager/extendMembership`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Return list of richMembers from perun by the searchString with attributes specific for list of attrsNames and who have only status which is contain in list of statuses. If attrsNames is empty or null return all attributes for specific richMembers. If listOfStatuses is empty or null, return all possible statuses. + * @param attrsNames list of attribute names List<String> + * @param searchString Text to search by + * @param allowedStatuses list of allowed statuses List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findCompleteRichMembersByAttributes( + attrsNames: Array, + searchString: string, + allowedStatuses?: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public findCompleteRichMembersByAttributes( + attrsNames: Array, + searchString: string, + allowedStatuses?: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public findCompleteRichMembersByAttributes( + attrsNames: Array, + searchString: string, + allowedStatuses?: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public findCompleteRichMembersByAttributes( + attrsNames: Array, + searchString: string, + allowedStatuses?: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (attrsNames === null || attrsNames === undefined) { + throw new Error( + 'Required parameter attrsNames was null or undefined when calling findCompleteRichMembersByAttributes.' + ); + } + if (searchString === null || searchString === undefined) { + throw new Error( + 'Required parameter searchString was null or undefined when calling findCompleteRichMembersByAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (attrsNames) { + attrsNames.forEach((element) => { + queryParameters = queryParameters.append('attrsNames[]', element); + }); + } + if (searchString !== undefined && searchString !== null) { + queryParameters = queryParameters.set('searchString', searchString); + } + if (allowedStatuses) { + allowedStatuses.forEach((element) => { + queryParameters = queryParameters.append('allowedStatuses[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/membersManager/findCompleteRichMembers/attrs`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Return list of richMembers for specific group by the searchString with attributes specific for list of attrsNames and who have only status which is contain in lists of statuses. If attrsNames is empty or null return all attributes for specific richMembers. If listOfStatuses or listOfGroupStatuses is empty or null, return all possible statuses. If lookingInParentGroup is true, find all these richMembers only for parentGroup of this group. If this group is top level group, so find richMembers from members group. + * @param group id of Group + * @param attrsNames list of attribute names List<String> + * @param searchString Text to search by + * @param lookingInParentGroup If true, look up in a parent group + * @param allowedStatuses list of allowed statuses List<String> + * @param allowedGroupStatuses list of allowed group statuses List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findCompleteRichMembersForGroup( + group: number, + attrsNames: Array, + searchString: string, + lookingInParentGroup: boolean, + allowedStatuses?: Array, + allowedGroupStatuses?: Array<'VALID' | 'EXPIRED'>, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public findCompleteRichMembersForGroup( + group: number, + attrsNames: Array, + searchString: string, + lookingInParentGroup: boolean, + allowedStatuses?: Array, + allowedGroupStatuses?: Array<'VALID' | 'EXPIRED'>, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public findCompleteRichMembersForGroup( + group: number, + attrsNames: Array, + searchString: string, + lookingInParentGroup: boolean, + allowedStatuses?: Array, + allowedGroupStatuses?: Array<'VALID' | 'EXPIRED'>, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public findCompleteRichMembersForGroup( + group: number, + attrsNames: Array, + searchString: string, + lookingInParentGroup: boolean, + allowedStatuses?: Array, + allowedGroupStatuses?: Array<'VALID' | 'EXPIRED'>, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling findCompleteRichMembersForGroup.' + ); + } + if (attrsNames === null || attrsNames === undefined) { + throw new Error( + 'Required parameter attrsNames was null or undefined when calling findCompleteRichMembersForGroup.' + ); + } + if (searchString === null || searchString === undefined) { + throw new Error( + 'Required parameter searchString was null or undefined when calling findCompleteRichMembersForGroup.' + ); + } + if (lookingInParentGroup === null || lookingInParentGroup === undefined) { + throw new Error( + 'Required parameter lookingInParentGroup was null or undefined when calling findCompleteRichMembersForGroup.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (attrsNames) { + attrsNames.forEach((element) => { + queryParameters = queryParameters.append('attrsNames[]', element); + }); + } + if (allowedStatuses) { + allowedStatuses.forEach((element) => { + queryParameters = queryParameters.append('allowedStatuses[]', element); + }); + } + if (allowedGroupStatuses) { + allowedGroupStatuses.forEach((element) => { + queryParameters = queryParameters.append('allowedGroupStatuses[]', element); + }); + } + if (searchString !== undefined && searchString !== null) { + queryParameters = queryParameters.set('searchString', searchString); + } + if (lookingInParentGroup !== undefined && lookingInParentGroup !== null) { + queryParameters = queryParameters.set('lookingInParentGroup', lookingInParentGroup); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/membersManager/findCompleteRichMembers/g`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Return list of richMembers for specific vo by the searchString with attributes specific for list of attrsNames and who have only status which is contain in list of statuses. If attrsNames is empty or null return all attributes for specific richMembers. If listOfStatuses is empty or null, return all possible statuses. + * @param vo id of Vo + * @param attrsNames list of attribute names List<String> + * @param searchString Text to search by + * @param allowedStatuses list of allowed statuses List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findCompleteRichMembersForVo( + vo: number, + attrsNames: Array, + searchString: string, + allowedStatuses?: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public findCompleteRichMembersForVo( + vo: number, + attrsNames: Array, + searchString: string, + allowedStatuses?: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public findCompleteRichMembersForVo( + vo: number, + attrsNames: Array, + searchString: string, + allowedStatuses?: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public findCompleteRichMembersForVo( + vo: number, + attrsNames: Array, + searchString: string, + allowedStatuses?: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling findCompleteRichMembersForVo.' + ); + } + if (attrsNames === null || attrsNames === undefined) { + throw new Error( + 'Required parameter attrsNames was null or undefined when calling findCompleteRichMembersForVo.' + ); + } + if (searchString === null || searchString === undefined) { + throw new Error( + 'Required parameter searchString was null or undefined when calling findCompleteRichMembersForVo.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (attrsNames) { + attrsNames.forEach((element) => { + queryParameters = queryParameters.append('attrsNames[]', element); + }); + } + if (allowedStatuses) { + allowedStatuses.forEach((element) => { + queryParameters = queryParameters.append('allowedStatuses[]', element); + }); + } + if (searchString !== undefined && searchString !== null) { + queryParameters = queryParameters.set('searchString', searchString); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/membersManager/findCompleteRichMembers/v`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Searches for members in a VO. + * @param vo id of Vo + * @param searchString Text to search by + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findMembersInVo( + vo: number, + searchString: string, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public findMembersInVo( + vo: number, + searchString: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public findMembersInVo( + vo: number, + searchString: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public findMembersInVo( + vo: number, + searchString: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling findMembersInVo.'); + } + if (searchString === null || searchString === undefined) { + throw new Error( + 'Required parameter searchString was null or undefined when calling findMembersInVo.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (searchString !== undefined && searchString !== null) { + queryParameters = queryParameters.set('searchString', searchString); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/membersManager/findMembersInVo`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns list of RichMembers for vo, with reqested attributes, filterd by search string and option to return only sponosred members. + * @param vo id of Vo + * @param attrsNames list of attribute names List<String> + * @param searchString Text to search by + * @param onlySponsored Boolean specifying if only sponsored members should be returned + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findSponsoredCompleteRichMembersForVo( + vo: number, + attrsNames: Array, + searchString: string, + onlySponsored: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public findSponsoredCompleteRichMembersForVo( + vo: number, + attrsNames: Array, + searchString: string, + onlySponsored: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public findSponsoredCompleteRichMembersForVo( + vo: number, + attrsNames: Array, + searchString: string, + onlySponsored: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public findSponsoredCompleteRichMembersForVo( + vo: number, + attrsNames: Array, + searchString: string, + onlySponsored: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling findSponsoredCompleteRichMembersForVo.' + ); + } + if (attrsNames === null || attrsNames === undefined) { + throw new Error( + 'Required parameter attrsNames was null or undefined when calling findSponsoredCompleteRichMembersForVo.' + ); + } + if (searchString === null || searchString === undefined) { + throw new Error( + 'Required parameter searchString was null or undefined when calling findSponsoredCompleteRichMembersForVo.' + ); + } + if (onlySponsored === null || onlySponsored === undefined) { + throw new Error( + 'Required parameter onlySponsored was null or undefined when calling findSponsoredCompleteRichMembersForVo.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (attrsNames) { + attrsNames.forEach((element) => { + queryParameters = queryParameters.append('attrsNames[]', element); + }); + } + if (searchString !== undefined && searchString !== null) { + queryParameters = queryParameters.set('searchString', searchString); + } + if (onlySponsored !== undefined && onlySponsored !== null) { + queryParameters = queryParameters.set('onlySponsored', onlySponsored); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/membersManager/findCompleteRichMembers/v-sponsored`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all members from all vos. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllMembers(observe?: 'body', reportProgress?: boolean): Observable>; + public getAllMembers( + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllMembers( + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAllMembers(observe: any = 'body', reportProgress: boolean = false): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/membersManager/getAllMembers`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Return all loaded namespaces rules. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllNamespacesRules( + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAllNamespacesRules( + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllNamespacesRules( + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAllNamespacesRules( + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/membersManager/getAllNamespacesRules`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets all sponsored members from VO. + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllSponsoredMembers( + vo: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAllSponsoredMembers( + vo: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllSponsoredMembers( + vo: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAllSponsoredMembers( + vo: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling getAllSponsoredMembers.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/membersManager/getAllSponsoredMembers`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets list of VO\'s all sponsored members with sponsors. + * @param vo id of Vo + * @param attrNames list of attribute names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllSponsoredMembersAndTheirSponsors( + vo: number, + attrNames: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAllSponsoredMembersAndTheirSponsors( + vo: number, + attrNames: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllSponsoredMembersAndTheirSponsors( + vo: number, + attrNames: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAllSponsoredMembersAndTheirSponsors( + vo: number, + attrNames: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling getAllSponsoredMembersAndTheirSponsors.' + ); + } + if (attrNames === null || attrNames === undefined) { + throw new Error( + 'Required parameter attrNames was null or undefined when calling getAllSponsoredMembersAndTheirSponsors.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/membersManager/getAllSponsoredMembersAndTheirSponsors`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all RichMembers with attributes specific for list of attrsNames from the group and have only status which is contain in lists of statuses. If attrsNames is empty or null return all attributes for specific richMembers. If listOfStatuses or listOfGroupStatuses is empty or null, return all possible statuses. If lookingInParentGroup is true, get all these richMembers only for parentGroup of this group. If this group is top level group, so get richMembers from members group. + * @param group id of Group + * @param lookingInParentGroup If true, look up in a parent group + * @param allowedStatuses list of allowed statuses List<String> + * @param allowedGroupStatuses list of allowed group statuses List<String> + * @param attrsNames list of attributes names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getCompleteRichMembersForGroup( + group: number, + lookingInParentGroup: boolean, + allowedStatuses?: Array, + allowedGroupStatuses?: Array<'VALID' | 'EXPIRED'>, + attrsNames?: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getCompleteRichMembersForGroup( + group: number, + lookingInParentGroup: boolean, + allowedStatuses?: Array, + allowedGroupStatuses?: Array<'VALID' | 'EXPIRED'>, + attrsNames?: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getCompleteRichMembersForGroup( + group: number, + lookingInParentGroup: boolean, + allowedStatuses?: Array, + allowedGroupStatuses?: Array<'VALID' | 'EXPIRED'>, + attrsNames?: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getCompleteRichMembersForGroup( + group: number, + lookingInParentGroup: boolean, + allowedStatuses?: Array, + allowedGroupStatuses?: Array<'VALID' | 'EXPIRED'>, + attrsNames?: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getCompleteRichMembersForGroup.' + ); + } + if (lookingInParentGroup === null || lookingInParentGroup === undefined) { + throw new Error( + 'Required parameter lookingInParentGroup was null or undefined when calling getCompleteRichMembersForGroup.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (allowedStatuses) { + allowedStatuses.forEach((element) => { + queryParameters = queryParameters.append('allowedStatuses[]', element); + }); + } + if (allowedGroupStatuses) { + allowedGroupStatuses.forEach((element) => { + queryParameters = queryParameters.append('allowedGroupStatuses[]', element); + }); + } + if (lookingInParentGroup !== undefined && lookingInParentGroup !== null) { + queryParameters = queryParameters.set('lookingInParentGroup', lookingInParentGroup); + } + if (attrsNames) { + attrsNames.forEach((element) => { + queryParameters = queryParameters.append('attrsNames[]', element); + }); + } - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - - - /** - * Return true if the membership can be extended or if no rules were set for the membershipExpiration, otherwise false. - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public canExtendMembership(member: number, observe?: 'body', reportProgress?: boolean): Observable; - public canExtendMembership(member: number, observe?: 'response', reportProgress?: boolean): Observable>; - public canExtendMembership(member: number, observe?: 'events', reportProgress?: boolean): Observable>; - public canExtendMembership(member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling canExtendMembership.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/membersManager/canExtendMembership`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Creates a new member from candidate returned by the method VosManager.findCandidates which fills Candidate.userExtSource. This method also add user to all groups in list. Empty list of groups is ok, the behavior is then same like in the method without list of groups. This method runs asynchronously - * @param inputCreateMemberForCandidate - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createMemberForCandidate(inputCreateMemberForCandidate: InputCreateMemberForCandidate, observe?: 'body', reportProgress?: boolean): Observable; - public createMemberForCandidate(inputCreateMemberForCandidate: InputCreateMemberForCandidate, observe?: 'response', reportProgress?: boolean): Observable>; - public createMemberForCandidate(inputCreateMemberForCandidate: InputCreateMemberForCandidate, observe?: 'events', reportProgress?: boolean): Observable>; - public createMemberForCandidate(inputCreateMemberForCandidate: InputCreateMemberForCandidate, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputCreateMemberForCandidate === null || inputCreateMemberForCandidate === undefined) { - throw new Error('Required parameter inputCreateMemberForCandidate was null or undefined when calling createMemberForCandidate.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/membersManager/createMember/c`, - inputCreateMemberForCandidate, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Creates a new member from user. This method also add user to all groups in list. Empty list of groups is ok, the behavior is then same like in the method without list of groups. - * @param inputCreateMemberForUser - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createMemberForUser(inputCreateMemberForUser: InputCreateMemberForUser, observe?: 'body', reportProgress?: boolean): Observable; - public createMemberForUser(inputCreateMemberForUser: InputCreateMemberForUser, observe?: 'response', reportProgress?: boolean): Observable>; - public createMemberForUser(inputCreateMemberForUser: InputCreateMemberForUser, observe?: 'events', reportProgress?: boolean): Observable>; - public createMemberForUser(inputCreateMemberForUser: InputCreateMemberForUser, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputCreateMemberForUser === null || inputCreateMemberForUser === undefined) { - throw new Error('Required parameter inputCreateMemberForUser was null or undefined when calling createMemberForUser.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/membersManager/createMember/u`, - inputCreateMemberForUser, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Creates a new member and sets all member\'s attributes from the candidate. Also stores the associated user if doesn\'t exist. This method is used by the registrar. This method also add user to all groups in list. Empty list of groups is ok, the behavior is then same like in the method without list of groups. - * @param inputCreateMemberFromExtSource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createMemberFromExtSource(inputCreateMemberFromExtSource: InputCreateMemberFromExtSource, observe?: 'body', reportProgress?: boolean): Observable; - public createMemberFromExtSource(inputCreateMemberFromExtSource: InputCreateMemberFromExtSource, observe?: 'response', reportProgress?: boolean): Observable>; - public createMemberFromExtSource(inputCreateMemberFromExtSource: InputCreateMemberFromExtSource, observe?: 'events', reportProgress?: boolean): Observable>; - public createMemberFromExtSource(inputCreateMemberFromExtSource: InputCreateMemberFromExtSource, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputCreateMemberFromExtSource === null || inputCreateMemberFromExtSource === undefined) { - throw new Error('Required parameter inputCreateMemberFromExtSource was null or undefined when calling createMemberFromExtSource.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/membersManager/createMember/extSource`, - inputCreateMemberFromExtSource, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Creates a new member from candidate which is prepared for creating specificUser. - * @param inputSpecificMember - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createSpecificMember(inputSpecificMember: InputSpecificMember, observe?: 'body', reportProgress?: boolean): Observable; - public createSpecificMember(inputSpecificMember: InputSpecificMember, observe?: 'response', reportProgress?: boolean): Observable>; - public createSpecificMember(inputSpecificMember: InputSpecificMember, observe?: 'events', reportProgress?: boolean): Observable>; - public createSpecificMember(inputSpecificMember: InputSpecificMember, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSpecificMember === null || inputSpecificMember === undefined) { - throw new Error('Required parameter inputSpecificMember was null or undefined when calling createSpecificMember.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/membersManager/createSpecificMember`, - inputSpecificMember, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Creates a new sponsored member in a given VO and namespace. - * @param inputCreateSponsoredMember - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createSponsoredMember(inputCreateSponsoredMember: InputCreateSponsoredMember, observe?: 'body', reportProgress?: boolean): Observable; - public createSponsoredMember(inputCreateSponsoredMember: InputCreateSponsoredMember, observe?: 'response', reportProgress?: boolean): Observable>; - public createSponsoredMember(inputCreateSponsoredMember: InputCreateSponsoredMember, observe?: 'events', reportProgress?: boolean): Observable>; - public createSponsoredMember(inputCreateSponsoredMember: InputCreateSponsoredMember, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputCreateSponsoredMember === null || inputCreateSponsoredMember === undefined) { - throw new Error('Required parameter inputCreateSponsoredMember was null or undefined when calling createSponsoredMember.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/membersManager/createSponsoredMember/withFullName`, - inputCreateSponsoredMember, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Creates new sponsored members in a given VO and namespace. - * @param inputCreateSponsoredMember1 - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createSponsoredMembers(inputCreateSponsoredMember1: InputCreateSponsoredMember1, observe?: 'body', reportProgress?: boolean): Observable>; - public createSponsoredMembers(inputCreateSponsoredMember1: InputCreateSponsoredMember1, observe?: 'response', reportProgress?: boolean): Observable>>; - public createSponsoredMembers(inputCreateSponsoredMember1: InputCreateSponsoredMember1, observe?: 'events', reportProgress?: boolean): Observable>>; - public createSponsoredMembers(inputCreateSponsoredMember1: InputCreateSponsoredMember1, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputCreateSponsoredMember1 === null || inputCreateSponsoredMember1 === undefined) { - throw new Error('Required parameter inputCreateSponsoredMember1 was null or undefined when calling createSponsoredMembers.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post>(`${this.configuration.basePath}/json/membersManager/createSponsoredMembers`, - inputCreateSponsoredMember1, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Creates new sponsored members in a given VO and namespace. - * @param inputCreateSponsoredMemberFromCSV - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createSponsoredMembersFromCSV(inputCreateSponsoredMemberFromCSV: InputCreateSponsoredMemberFromCSV, observe?: 'body', reportProgress?: boolean): Observable>; - public createSponsoredMembersFromCSV(inputCreateSponsoredMemberFromCSV: InputCreateSponsoredMemberFromCSV, observe?: 'response', reportProgress?: boolean): Observable>>; - public createSponsoredMembersFromCSV(inputCreateSponsoredMemberFromCSV: InputCreateSponsoredMemberFromCSV, observe?: 'events', reportProgress?: boolean): Observable>>; - public createSponsoredMembersFromCSV(inputCreateSponsoredMemberFromCSV: InputCreateSponsoredMemberFromCSV, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputCreateSponsoredMemberFromCSV === null || inputCreateSponsoredMemberFromCSV === undefined) { - throw new Error('Required parameter inputCreateSponsoredMemberFromCSV was null or undefined when calling createSponsoredMembersFromCSV.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post>(`${this.configuration.basePath}/json/membersManager/createSponsoredMembersFromCSV`, - inputCreateSponsoredMemberFromCSV, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Deletes only member data appropriated by member id. - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteMember(member: number, observe?: 'body', reportProgress?: boolean): Observable; - public deleteMember(member: number, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteMember(member: number, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteMember(member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling deleteMember.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/membersManager/deleteMember`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Delete members with given ids. It is possible to delete members from multiple vos. - * @param members id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteMembers(members: Array, observe?: 'body', reportProgress?: boolean): Observable; - public deleteMembers(members: Array, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteMembers(members: Array, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteMembers(members: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (members === null || members === undefined) { - throw new Error('Required parameter members was null or undefined when calling deleteMembers.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (members) { - members.forEach((element) => { - queryParameters = queryParameters.append('members[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/membersManager/deleteMembers`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Extend member membership using membershipExpirationRules attribute defined at VO. - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public extendMembership(member: number, observe?: 'body', reportProgress?: boolean): Observable; - public extendMembership(member: number, observe?: 'response', reportProgress?: boolean): Observable>; - public extendMembership(member: number, observe?: 'events', reportProgress?: boolean): Observable>; - public extendMembership(member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling extendMembership.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/membersManager/extendMembership`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Return list of richMembers from perun by the searchString with attributes specific for list of attrsNames and who have only status which is contain in list of statuses. If attrsNames is empty or null return all attributes for specific richMembers. If listOfStatuses is empty or null, return all possible statuses. - * @param attrsNames list of attribute names List<String> - * @param searchString Text to search by - * @param allowedStatuses list of allowed statuses List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findCompleteRichMembersByAttributes(attrsNames: Array, searchString: string, allowedStatuses?: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public findCompleteRichMembersByAttributes(attrsNames: Array, searchString: string, allowedStatuses?: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public findCompleteRichMembersByAttributes(attrsNames: Array, searchString: string, allowedStatuses?: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public findCompleteRichMembersByAttributes(attrsNames: Array, searchString: string, allowedStatuses?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (attrsNames === null || attrsNames === undefined) { - throw new Error('Required parameter attrsNames was null or undefined when calling findCompleteRichMembersByAttributes.'); - } - if (searchString === null || searchString === undefined) { - throw new Error('Required parameter searchString was null or undefined when calling findCompleteRichMembersByAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (attrsNames) { - attrsNames.forEach((element) => { - queryParameters = queryParameters.append('attrsNames[]', element); - }) - } - if (searchString !== undefined && searchString !== null) { - queryParameters = queryParameters.set('searchString', searchString); - } - if (allowedStatuses) { - allowedStatuses.forEach((element) => { - queryParameters = queryParameters.append('allowedStatuses[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/findCompleteRichMembers/attrs`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Return list of richMembers for specific group by the searchString with attributes specific for list of attrsNames and who have only status which is contain in lists of statuses. If attrsNames is empty or null return all attributes for specific richMembers. If listOfStatuses or listOfGroupStatuses is empty or null, return all possible statuses. If lookingInParentGroup is true, find all these richMembers only for parentGroup of this group. If this group is top level group, so find richMembers from members group. - * @param group id of Group - * @param attrsNames list of attribute names List<String> - * @param searchString Text to search by - * @param lookingInParentGroup If true, look up in a parent group - * @param allowedStatuses list of allowed statuses List<String> - * @param allowedGroupStatuses list of allowed group statuses List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findCompleteRichMembersForGroup(group: number, attrsNames: Array, searchString: string, lookingInParentGroup: boolean, allowedStatuses?: Array, allowedGroupStatuses?: Array<'VALID' | 'EXPIRED'>, observe?: 'body', reportProgress?: boolean): Observable>; - public findCompleteRichMembersForGroup(group: number, attrsNames: Array, searchString: string, lookingInParentGroup: boolean, allowedStatuses?: Array, allowedGroupStatuses?: Array<'VALID' | 'EXPIRED'>, observe?: 'response', reportProgress?: boolean): Observable>>; - public findCompleteRichMembersForGroup(group: number, attrsNames: Array, searchString: string, lookingInParentGroup: boolean, allowedStatuses?: Array, allowedGroupStatuses?: Array<'VALID' | 'EXPIRED'>, observe?: 'events', reportProgress?: boolean): Observable>>; - public findCompleteRichMembersForGroup(group: number, attrsNames: Array, searchString: string, lookingInParentGroup: boolean, allowedStatuses?: Array, allowedGroupStatuses?: Array<'VALID' | 'EXPIRED'>, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling findCompleteRichMembersForGroup.'); - } - if (attrsNames === null || attrsNames === undefined) { - throw new Error('Required parameter attrsNames was null or undefined when calling findCompleteRichMembersForGroup.'); - } - if (searchString === null || searchString === undefined) { - throw new Error('Required parameter searchString was null or undefined when calling findCompleteRichMembersForGroup.'); - } - if (lookingInParentGroup === null || lookingInParentGroup === undefined) { - throw new Error('Required parameter lookingInParentGroup was null or undefined when calling findCompleteRichMembersForGroup.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (attrsNames) { - attrsNames.forEach((element) => { - queryParameters = queryParameters.append('attrsNames[]', element); - }) - } - if (allowedStatuses) { - allowedStatuses.forEach((element) => { - queryParameters = queryParameters.append('allowedStatuses[]', element); - }) - } - if (allowedGroupStatuses) { - allowedGroupStatuses.forEach((element) => { - queryParameters = queryParameters.append('allowedGroupStatuses[]', element); - }) - } - if (searchString !== undefined && searchString !== null) { - queryParameters = queryParameters.set('searchString', searchString); - } - if (lookingInParentGroup !== undefined && lookingInParentGroup !== null) { - queryParameters = queryParameters.set('lookingInParentGroup', lookingInParentGroup); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/findCompleteRichMembers/g`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Return list of richMembers for specific vo by the searchString with attributes specific for list of attrsNames and who have only status which is contain in list of statuses. If attrsNames is empty or null return all attributes for specific richMembers. If listOfStatuses is empty or null, return all possible statuses. - * @param vo id of Vo - * @param attrsNames list of attribute names List<String> - * @param searchString Text to search by - * @param allowedStatuses list of allowed statuses List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findCompleteRichMembersForVo(vo: number, attrsNames: Array, searchString: string, allowedStatuses?: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public findCompleteRichMembersForVo(vo: number, attrsNames: Array, searchString: string, allowedStatuses?: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public findCompleteRichMembersForVo(vo: number, attrsNames: Array, searchString: string, allowedStatuses?: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public findCompleteRichMembersForVo(vo: number, attrsNames: Array, searchString: string, allowedStatuses?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling findCompleteRichMembersForVo.'); - } - if (attrsNames === null || attrsNames === undefined) { - throw new Error('Required parameter attrsNames was null or undefined when calling findCompleteRichMembersForVo.'); - } - if (searchString === null || searchString === undefined) { - throw new Error('Required parameter searchString was null or undefined when calling findCompleteRichMembersForVo.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (attrsNames) { - attrsNames.forEach((element) => { - queryParameters = queryParameters.append('attrsNames[]', element); - }) - } - if (allowedStatuses) { - allowedStatuses.forEach((element) => { - queryParameters = queryParameters.append('allowedStatuses[]', element); - }) - } - if (searchString !== undefined && searchString !== null) { - queryParameters = queryParameters.set('searchString', searchString); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/findCompleteRichMembers/v`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Searches for members in a VO. - * @param vo id of Vo - * @param searchString Text to search by - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findMembersInVo(vo: number, searchString: string, observe?: 'body', reportProgress?: boolean): Observable>; - public findMembersInVo(vo: number, searchString: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public findMembersInVo(vo: number, searchString: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public findMembersInVo(vo: number, searchString: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling findMembersInVo.'); - } - if (searchString === null || searchString === undefined) { - throw new Error('Required parameter searchString was null or undefined when calling findMembersInVo.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (searchString !== undefined && searchString !== null) { - queryParameters = queryParameters.set('searchString', searchString); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/findMembersInVo`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns list of RichMembers for vo, with reqested attributes, filterd by search string and option to return only sponosred members. - * @param vo id of Vo - * @param attrsNames list of attribute names List<String> - * @param searchString Text to search by - * @param onlySponsored Boolean specifying if only sponsored members should be returned - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findSponsoredCompleteRichMembersForVo(vo: number, attrsNames: Array, searchString: string, onlySponsored: boolean, observe?: 'body', reportProgress?: boolean): Observable>; - public findSponsoredCompleteRichMembersForVo(vo: number, attrsNames: Array, searchString: string, onlySponsored: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; - public findSponsoredCompleteRichMembersForVo(vo: number, attrsNames: Array, searchString: string, onlySponsored: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; - public findSponsoredCompleteRichMembersForVo(vo: number, attrsNames: Array, searchString: string, onlySponsored: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling findSponsoredCompleteRichMembersForVo.'); - } - if (attrsNames === null || attrsNames === undefined) { - throw new Error('Required parameter attrsNames was null or undefined when calling findSponsoredCompleteRichMembersForVo.'); - } - if (searchString === null || searchString === undefined) { - throw new Error('Required parameter searchString was null or undefined when calling findSponsoredCompleteRichMembersForVo.'); - } - if (onlySponsored === null || onlySponsored === undefined) { - throw new Error('Required parameter onlySponsored was null or undefined when calling findSponsoredCompleteRichMembersForVo.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (attrsNames) { - attrsNames.forEach((element) => { - queryParameters = queryParameters.append('attrsNames[]', element); - }) - } - if (searchString !== undefined && searchString !== null) { - queryParameters = queryParameters.set('searchString', searchString); - } - if (onlySponsored !== undefined && onlySponsored !== null) { - queryParameters = queryParameters.set('onlySponsored', onlySponsored); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/findCompleteRichMembers/v-sponsored`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all members from all vos. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllMembers(observe?: 'body', reportProgress?: boolean): Observable>; - public getAllMembers(observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllMembers(observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllMembers(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/getAllMembers`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Return all loaded namespaces rules. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllNamespacesRules(observe?: 'body', reportProgress?: boolean): Observable>; - public getAllNamespacesRules(observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllNamespacesRules(observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllNamespacesRules(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/getAllNamespacesRules`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Gets all sponsored members from VO. - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllSponsoredMembers(vo: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAllSponsoredMembers(vo: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllSponsoredMembers(vo: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllSponsoredMembers(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getAllSponsoredMembers.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/getAllSponsoredMembers`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Gets list of VO\'s all sponsored members with sponsors. - * @param vo id of Vo - * @param attrNames list of attribute names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllSponsoredMembersAndTheirSponsors(vo: number, attrNames: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getAllSponsoredMembersAndTheirSponsors(vo: number, attrNames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllSponsoredMembersAndTheirSponsors(vo: number, attrNames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllSponsoredMembersAndTheirSponsors(vo: number, attrNames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getAllSponsoredMembersAndTheirSponsors.'); - } - if (attrNames === null || attrNames === undefined) { - throw new Error('Required parameter attrNames was null or undefined when calling getAllSponsoredMembersAndTheirSponsors.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/getAllSponsoredMembersAndTheirSponsors`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all RichMembers with attributes specific for list of attrsNames from the group and have only status which is contain in lists of statuses. If attrsNames is empty or null return all attributes for specific richMembers. If listOfStatuses or listOfGroupStatuses is empty or null, return all possible statuses. If lookingInParentGroup is true, get all these richMembers only for parentGroup of this group. If this group is top level group, so get richMembers from members group. - * @param group id of Group - * @param lookingInParentGroup If true, look up in a parent group - * @param allowedStatuses list of allowed statuses List<String> - * @param allowedGroupStatuses list of allowed group statuses List<String> - * @param attrsNames list of attributes names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getCompleteRichMembersForGroup(group: number, lookingInParentGroup: boolean, allowedStatuses?: Array, allowedGroupStatuses?: Array<'VALID' | 'EXPIRED'>, attrsNames?: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getCompleteRichMembersForGroup(group: number, lookingInParentGroup: boolean, allowedStatuses?: Array, allowedGroupStatuses?: Array<'VALID' | 'EXPIRED'>, attrsNames?: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getCompleteRichMembersForGroup(group: number, lookingInParentGroup: boolean, allowedStatuses?: Array, allowedGroupStatuses?: Array<'VALID' | 'EXPIRED'>, attrsNames?: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getCompleteRichMembersForGroup(group: number, lookingInParentGroup: boolean, allowedStatuses?: Array, allowedGroupStatuses?: Array<'VALID' | 'EXPIRED'>, attrsNames?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getCompleteRichMembersForGroup.'); - } - if (lookingInParentGroup === null || lookingInParentGroup === undefined) { - throw new Error('Required parameter lookingInParentGroup was null or undefined when calling getCompleteRichMembersForGroup.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (allowedStatuses) { - allowedStatuses.forEach((element) => { - queryParameters = queryParameters.append('allowedStatuses[]', element); - }) - } - if (allowedGroupStatuses) { - allowedGroupStatuses.forEach((element) => { - queryParameters = queryParameters.append('allowedGroupStatuses[]', element); - }) - } - if (lookingInParentGroup !== undefined && lookingInParentGroup !== null) { - queryParameters = queryParameters.set('lookingInParentGroup', lookingInParentGroup); - } - if (attrsNames) { - attrsNames.forEach((element) => { - queryParameters = queryParameters.append('attrsNames[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/getCompleteRichMembers/g`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all RichMembers with attributes specific for list of attrsNames. Attributes are defined by member (user) and resource (facility) objects. It returns also user-facility (in userAttributes of RichMember) and member-resource (in memberAttributes of RichMember) attributes. Members are defined by group and are filtered by list of allowed statuses. - * @param group id of Group - * @param resource id of Resource - * @param attrsNames list of attribute names List<String> - * @param allowedStatuses list of allowed statuses List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getCompleteRichMembersForGroupResource(group: number, resource: number, attrsNames: Array, allowedStatuses: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getCompleteRichMembersForGroupResource(group: number, resource: number, attrsNames: Array, allowedStatuses: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getCompleteRichMembersForGroupResource(group: number, resource: number, attrsNames: Array, allowedStatuses: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getCompleteRichMembersForGroupResource(group: number, resource: number, attrsNames: Array, allowedStatuses: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getCompleteRichMembersForGroupResource.'); - } - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getCompleteRichMembersForGroupResource.'); - } - if (attrsNames === null || attrsNames === undefined) { - throw new Error('Required parameter attrsNames was null or undefined when calling getCompleteRichMembersForGroupResource.'); - } - if (allowedStatuses === null || allowedStatuses === undefined) { - throw new Error('Required parameter allowedStatuses was null or undefined when calling getCompleteRichMembersForGroupResource.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (attrsNames) { - attrsNames.forEach((element) => { - queryParameters = queryParameters.append('attrsNames[]', element); - }) - } - if (allowedStatuses) { - allowedStatuses.forEach((element) => { - queryParameters = queryParameters.append('allowedStatuses[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/getCompleteRichMembers/g-r`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all RichMembers with attributes specific for list of attrsNames from the vo and have only status which is contain in list of statuses. If attrsNames is empty or null return all attributes for specific richMembers. If listOfStatuses is empty or null, return all possible statuses. - * @param vo id of Vo - * @param allowedStatuses list of allowed statuses List<String> - * @param attrsNames list of attributes names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getCompleteRichMembersForVo(vo: number, allowedStatuses?: Array, attrsNames?: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getCompleteRichMembersForVo(vo: number, allowedStatuses?: Array, attrsNames?: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getCompleteRichMembersForVo(vo: number, allowedStatuses?: Array, attrsNames?: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getCompleteRichMembersForVo(vo: number, allowedStatuses?: Array, attrsNames?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getCompleteRichMembersForVo.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (allowedStatuses) { - allowedStatuses.forEach((element) => { - queryParameters = queryParameters.append('allowedStatuses[]', element); - }) - } - if (attrsNames) { - attrsNames.forEach((element) => { - queryParameters = queryParameters.append('attrsNames[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/getCompleteRichMembers/v`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Searches for members in a VO. - * @param vo id of Vo - * @param extLogin external login of user, e.g. john - * @param extSourceName external source name, e.g. IdP entityId - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberByExtSourceNameAndExtLogin(vo: number, extLogin: string, extSourceName: string, observe?: 'body', reportProgress?: boolean): Observable; - public getMemberByExtSourceNameAndExtLogin(vo: number, extLogin: string, extSourceName: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getMemberByExtSourceNameAndExtLogin(vo: number, extLogin: string, extSourceName: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getMemberByExtSourceNameAndExtLogin(vo: number, extLogin: string, extSourceName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getMemberByExtSourceNameAndExtLogin.'); - } - if (extLogin === null || extLogin === undefined) { - throw new Error('Required parameter extLogin was null or undefined when calling getMemberByExtSourceNameAndExtLogin.'); - } - if (extSourceName === null || extSourceName === undefined) { - throw new Error('Required parameter extSourceName was null or undefined when calling getMemberByExtSourceNameAndExtLogin.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (extLogin !== undefined && extLogin !== null) { - queryParameters = queryParameters.set('extLogin', extLogin); - } - if (extSourceName !== undefined && extSourceName !== null) { - queryParameters = queryParameters.set('extSourceName', extSourceName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/membersManager/getMemberByExtSourceNameAndExtLogin`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns Member by its id. - * Gets Member - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberById(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public getMemberById(id: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getMemberById(id: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getMemberById(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getMemberById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/membersManager/getMemberById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns a Member specified by VO id and User id. - * @param vo id of Vo - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMemberByUser(vo: number, user: number, observe?: 'body', reportProgress?: boolean): Observable; - public getMemberByUser(vo: number, user: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getMemberByUser(vo: number, user: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getMemberByUser(vo: number, user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getMemberByUser.'); - } - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getMemberByUser.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/membersManager/getMemberByUser`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns members of a VO. - * @param vo id of Vo - * @param status optional status - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMembers(vo: number, status?: VoMemberStatuses, observe?: 'body', reportProgress?: boolean): Observable>; - public getMembers(vo: number, status?: VoMemberStatuses, observe?: 'response', reportProgress?: boolean): Observable>>; - public getMembers(vo: number, status?: VoMemberStatuses, observe?: 'events', reportProgress?: boolean): Observable>>; - public getMembers(vo: number, status?: VoMemberStatuses, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getMembers.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (status !== undefined && status !== null) { - queryParameters = queryParameters.set('status', status); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/getMembers`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns list of Members by their ids. - * @param ids list of ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMembersByIds(ids: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getMembersByIds(ids: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getMembersByIds(ids: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getMembersByIds(ids: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (ids === null || ids === undefined) { - throw new Error('Required parameter ids was null or undefined when calling getMembersByIds.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (ids) { - ids.forEach((element) => { - queryParameters = queryParameters.append('ids[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/getMembersByIds`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns members for a user. - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMembersByUser(user: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getMembersByUser(user: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getMembersByUser(user: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getMembersByUser(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getMembersByUser.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/getMembersByUser`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns count of all VO members. - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMembersCount(vo: number, observe?: 'body', reportProgress?: boolean): Observable; - public getMembersCount(vo: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getMembersCount(vo: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getMembersCount(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getMembersCount.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/membersManager/getMembersCount`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get page of members from the given vo, with the given attributes. - * @param inputGetPaginatedMembers - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMembersPage(inputGetPaginatedMembers: InputGetPaginatedMembers, observe?: 'body', reportProgress?: boolean): Observable; - public getMembersPage(inputGetPaginatedMembers: InputGetPaginatedMembers, observe?: 'response', reportProgress?: boolean): Observable>; - public getMembersPage(inputGetPaginatedMembers: InputGetPaginatedMembers, observe?: 'events', reportProgress?: boolean): Observable>; - public getMembersPage(inputGetPaginatedMembers: InputGetPaginatedMembers, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputGetPaginatedMembers === null || inputGetPaginatedMembers === undefined) { - throw new Error('Required parameter inputGetPaginatedMembers was null or undefined when calling getMembersPage.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/membersManager/getMembersPage`, - inputGetPaginatedMembers, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns count of VO members with specified status. - * @param vo id of Vo - * @param status status (VALID | INVALID | EXPIRED | DISABLED) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMembersWithStatusCount(vo: number, status: string, observe?: 'body', reportProgress?: boolean): Observable; - public getMembersWithStatusCount(vo: number, status: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getMembersWithStatusCount(vo: number, status: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getMembersWithStatusCount(vo: number, status: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getMembersWithStatusCount.'); - } - if (status === null || status === undefined) { - throw new Error('Required parameter status was null or undefined when calling getMembersWithStatusCount.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (status !== undefined && status !== null) { - queryParameters = queryParameters.set('status', status); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/membersManager/getMembersCount/status`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns RichMember by member id. - * Get RichMember without attributes - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRichMember(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public getRichMember(id: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getRichMember(id: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getRichMember(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getRichMember.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/membersManager/getRichMember`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns Member by its id. - * Get richMember with member/user attributes - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRichMemberWithAttributes(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public getRichMemberWithAttributes(id: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getRichMemberWithAttributes(id: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getRichMemberWithAttributes(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getRichMemberWithAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/membersManager/getRichMemberWithAttributes`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns rich members by their IDs with specific attributes. When the list of attribute names is null or empty then rich members will be returned without attributes. - * @param ids list of ids List<Integer> - * @param attrNames list of attribute names List<String> or null - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRichMembersByIds(ids: Array, attrNames?: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getRichMembersByIds(ids: Array, attrNames?: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getRichMembersByIds(ids: Array, attrNames?: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getRichMembersByIds(ids: Array, attrNames?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (ids === null || ids === undefined) { - throw new Error('Required parameter ids was null or undefined when calling getRichMembersByIds.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (ids) { - ids.forEach((element) => { - queryParameters = queryParameters.append('ids[]', element); - }) - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/getRichMembersByIds`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Gets members from VO who are sponsored. - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getSponsoredMembers(vo: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getSponsoredMembers(vo: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getSponsoredMembers(vo: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getSponsoredMembers(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getSponsoredMembers.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/getSponsoredMembers/v`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Gets list of members with sponsors. - * @param vo id of Vo - * @param attrNames list of attribute names List<String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getSponsoredMembersAndTheirSponsors(vo: number, attrNames: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getSponsoredMembersAndTheirSponsors(vo: number, attrNames: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getSponsoredMembersAndTheirSponsors(vo: number, attrNames: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getSponsoredMembersAndTheirSponsors(vo: number, attrNames: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getSponsoredMembersAndTheirSponsors.'); - } - if (attrNames === null || attrNames === undefined) { - throw new Error('Required parameter attrNames was null or undefined when calling getSponsoredMembersAndTheirSponsors.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/getSponsoredMembersAndTheirSponsors`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Gets sponsors for given member with optional attribute names. - * @param member id of Member - * @param attrNames list of attribute names List<String> or null - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getSponsorsByMember(member: number, attrNames?: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getSponsorsByMember(member: number, attrNames?: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getSponsorsByMember(member: number, attrNames?: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getSponsorsByMember(member: number, attrNames?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getSponsorsByMember.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/getSponsors/member`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Gets sponsors for given VO, extSourceName and extLogin with optional attribute names. - * @param vo id of Vo - * @param extSourceName external source name, e.g. IdP entityId - * @param extLogin external login of user, e.g. john - * @param attrNames list of attribute names List<String> or null - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getSponsorsByVo(vo: number, extSourceName: string, extLogin: string, attrNames?: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getSponsorsByVo(vo: number, extSourceName: string, extLogin: string, attrNames?: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getSponsorsByVo(vo: number, extSourceName: string, extLogin: string, attrNames?: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getSponsorsByVo(vo: number, extSourceName: string, extLogin: string, attrNames?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getSponsorsByVo.'); - } - if (extSourceName === null || extSourceName === undefined) { - throw new Error('Required parameter extSourceName was null or undefined when calling getSponsorsByVo.'); - } - if (extLogin === null || extLogin === undefined) { - throw new Error('Required parameter extLogin was null or undefined when calling getSponsorsByVo.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (extSourceName !== undefined && extSourceName !== null) { - queryParameters = queryParameters.set('extSourceName', extSourceName); - } - if (extLogin !== undefined && extLogin !== null) { - queryParameters = queryParameters.set('extLogin', extLogin); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/membersManager/getSponsors/vo`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Moves membership in VO from source user to target user - moves the source user\'s memberships in non-synchronized groups, member related attributes, bans and sponsorships in the VO. Removes the source user\'s member object. - * @param vo id of Vo - * @param sourceUser id of source user - * @param targetUser id of target user - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public moveMembership(vo: number, sourceUser: number, targetUser: number, observe?: 'body', reportProgress?: boolean): Observable; - public moveMembership(vo: number, sourceUser: number, targetUser: number, observe?: 'response', reportProgress?: boolean): Observable>; - public moveMembership(vo: number, sourceUser: number, targetUser: number, observe?: 'events', reportProgress?: boolean): Observable>; - public moveMembership(vo: number, sourceUser: number, targetUser: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling moveMembership.'); - } - if (sourceUser === null || sourceUser === undefined) { - throw new Error('Required parameter sourceUser was null or undefined when calling moveMembership.'); - } - if (targetUser === null || targetUser === undefined) { - throw new Error('Required parameter targetUser was null or undefined when calling moveMembership.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (sourceUser !== undefined && sourceUser !== null) { - queryParameters = queryParameters.set('sourceUser', sourceUser); - } - if (targetUser !== undefined && targetUser !== null) { - queryParameters = queryParameters.set('targetUser', targetUser); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/membersManager/moveMembership`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Removes sponsor of existing member. - * @param member id of Member - * @param sponsor id of sponsor - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeSponsor(member: number, sponsor: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeSponsor(member: number, sponsor: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeSponsor(member: number, sponsor: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeSponsor(member: number, sponsor: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling removeSponsor.'); - } - if (sponsor === null || sponsor === undefined) { - throw new Error('Required parameter sponsor was null or undefined when calling removeSponsor.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (sponsor !== undefined && sponsor !== null) { - queryParameters = queryParameters.set('sponsor', sponsor); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/membersManager/removeSponsor`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Send mail to user\'s preferred email address with link for non-authz account activation. Correct authz information is stored in link\'s URL. - * @param member id of Member - * @param namespace namespace - * @param emailAttributeURN urn of the attribute with stored mail - * @param language language of the message - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public sendAccountActivationLinkEmail(member: number, namespace: string, emailAttributeURN: string, language: string, observe?: 'body', reportProgress?: boolean): Observable; - public sendAccountActivationLinkEmail(member: number, namespace: string, emailAttributeURN: string, language: string, observe?: 'response', reportProgress?: boolean): Observable>; - public sendAccountActivationLinkEmail(member: number, namespace: string, emailAttributeURN: string, language: string, observe?: 'events', reportProgress?: boolean): Observable>; - public sendAccountActivationLinkEmail(member: number, namespace: string, emailAttributeURN: string, language: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling sendAccountActivationLinkEmail.'); - } - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling sendAccountActivationLinkEmail.'); - } - if (emailAttributeURN === null || emailAttributeURN === undefined) { - throw new Error('Required parameter emailAttributeURN was null or undefined when calling sendAccountActivationLinkEmail.'); - } - if (language === null || language === undefined) { - throw new Error('Required parameter language was null or undefined when calling sendAccountActivationLinkEmail.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (namespace !== undefined && namespace !== null) { - queryParameters = queryParameters.set('namespace', namespace); - } - if (emailAttributeURN !== undefined && emailAttributeURN !== null) { - queryParameters = queryParameters.set('emailAttributeURN', emailAttributeURN); - } - if (language !== undefined && language !== null) { - queryParameters = queryParameters.set('language', language); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/membersManager/sendAccountActivationLinkEmail`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Send mail to user\'s preferred email address with link for non-authz password reset. Correct authz information is stored in link\'s URL. - * @param member id of Member - * @param namespace namespace - * @param emailAttributeURN urn of the attribute with stored mail - * @param language language of the message - * @param baseUrl base url of Perun instance (optional) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public sendPasswordResetLinkEmail(member: number, namespace: string, emailAttributeURN: string, language: string, baseUrl?: string, observe?: 'body', reportProgress?: boolean): Observable; - public sendPasswordResetLinkEmail(member: number, namespace: string, emailAttributeURN: string, language: string, baseUrl?: string, observe?: 'response', reportProgress?: boolean): Observable>; - public sendPasswordResetLinkEmail(member: number, namespace: string, emailAttributeURN: string, language: string, baseUrl?: string, observe?: 'events', reportProgress?: boolean): Observable>; - public sendPasswordResetLinkEmail(member: number, namespace: string, emailAttributeURN: string, language: string, baseUrl?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling sendPasswordResetLinkEmail.'); - } - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling sendPasswordResetLinkEmail.'); - } - if (emailAttributeURN === null || emailAttributeURN === undefined) { - throw new Error('Required parameter emailAttributeURN was null or undefined when calling sendPasswordResetLinkEmail.'); - } - if (language === null || language === undefined) { - throw new Error('Required parameter language was null or undefined when calling sendPasswordResetLinkEmail.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (namespace !== undefined && namespace !== null) { - queryParameters = queryParameters.set('namespace', namespace); - } - if (emailAttributeURN !== undefined && emailAttributeURN !== null) { - queryParameters = queryParameters.set('emailAttributeURN', emailAttributeURN); - } - if (language !== undefined && language !== null) { - queryParameters = queryParameters.set('language', language); - } - if (baseUrl !== undefined && baseUrl !== null) { - queryParameters = queryParameters.set('baseUrl', baseUrl); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/membersManager/sendPasswordResetLinkEmail`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Creates a sponsored membership for the given user. - * @param inputSetSponsoredMember - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setSponsoredMember(inputSetSponsoredMember: InputSetSponsoredMember, observe?: 'body', reportProgress?: boolean): Observable; - public setSponsoredMember(inputSetSponsoredMember: InputSetSponsoredMember, observe?: 'response', reportProgress?: boolean): Observable>; - public setSponsoredMember(inputSetSponsoredMember: InputSetSponsoredMember, observe?: 'events', reportProgress?: boolean): Observable>; - public setSponsoredMember(inputSetSponsoredMember: InputSetSponsoredMember, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetSponsoredMember === null || inputSetSponsoredMember === undefined) { - throw new Error('Required parameter inputSetSponsoredMember was null or undefined when calling setSponsoredMember.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/membersManager/setSponsoredMember`, - inputSetSponsoredMember, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Transform non-sponsored member to sponsored one, with defined sponsor and optional sponsorship validity expiration - * @param sponsoredMember id of member to be sponsored - * @param sponsor id of sponsor - * @param validityTo date in format yyyy-mm-dd - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setSponsorshipForMember(sponsoredMember: number, sponsor: number, validityTo?: string, observe?: 'body', reportProgress?: boolean): Observable; - public setSponsorshipForMember(sponsoredMember: number, sponsor: number, validityTo?: string, observe?: 'response', reportProgress?: boolean): Observable>; - public setSponsorshipForMember(sponsoredMember: number, sponsor: number, validityTo?: string, observe?: 'events', reportProgress?: boolean): Observable>; - public setSponsorshipForMember(sponsoredMember: number, sponsor: number, validityTo?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (sponsoredMember === null || sponsoredMember === undefined) { - throw new Error('Required parameter sponsoredMember was null or undefined when calling setSponsorshipForMember.'); - } - if (sponsor === null || sponsor === undefined) { - throw new Error('Required parameter sponsor was null or undefined when calling setSponsorshipForMember.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (sponsoredMember !== undefined && sponsoredMember !== null) { - queryParameters = queryParameters.set('sponsoredMember', sponsoredMember); - } - if (sponsor !== undefined && sponsor !== null) { - queryParameters = queryParameters.set('sponsor', sponsor); - } - if (validityTo !== undefined && validityTo !== null) { - queryParameters = queryParameters.set('validityTo', validityTo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/membersManager/setSponsorshipForMember`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Set membership status of a member. - * @param member id of Member - * @param status status (VALID | INVALID | EXPIRED | DISABLED) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setStatus(member: number, status: string, observe?: 'body', reportProgress?: boolean): Observable; - public setStatus(member: number, status: string, observe?: 'response', reportProgress?: boolean): Observable>; - public setStatus(member: number, status: string, observe?: 'events', reportProgress?: boolean): Observable>; - public setStatus(member: number, status: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling setStatus.'); - } - if (status === null || status === undefined) { - throw new Error('Required parameter status was null or undefined when calling setStatus.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (status !== undefined && status !== null) { - queryParameters = queryParameters.set('status', status); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/membersManager/setStatus`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * For an existing member, assigns a new sponsor - * @param member id of Member - * @param sponsor id of sponsor - * @param validityTo date in format yyyy-mm-dd - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public sponsorMember(member: number, sponsor: number, validityTo?: string, observe?: 'body', reportProgress?: boolean): Observable; - public sponsorMember(member: number, sponsor: number, validityTo?: string, observe?: 'response', reportProgress?: boolean): Observable>; - public sponsorMember(member: number, sponsor: number, validityTo?: string, observe?: 'events', reportProgress?: boolean): Observable>; - public sponsorMember(member: number, sponsor: number, validityTo?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling sponsorMember.'); - } - if (sponsor === null || sponsor === undefined) { - throw new Error('Required parameter sponsor was null or undefined when calling sponsorMember.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (sponsor !== undefined && sponsor !== null) { - queryParameters = queryParameters.set('sponsor', sponsor); - } - if (validityTo !== undefined && validityTo !== null) { - queryParameters = queryParameters.set('validityTo', validityTo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/membersManager/sponsorMember`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Updates sponsorship validity. To change it to FOREVER, don\'t pass the validityTo param, or pass it as null. - * @param member id of Member - * @param sponsor id of sponsor - * @param validityTo date in format yyyy-mm-dd - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateSponsorshipValidity(member: number, sponsor: number, validityTo?: string, observe?: 'body', reportProgress?: boolean): Observable; - public updateSponsorshipValidity(member: number, sponsor: number, validityTo?: string, observe?: 'response', reportProgress?: boolean): Observable>; - public updateSponsorshipValidity(member: number, sponsor: number, validityTo?: string, observe?: 'events', reportProgress?: boolean): Observable>; - public updateSponsorshipValidity(member: number, sponsor: number, validityTo?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling updateSponsorshipValidity.'); - } - if (sponsor === null || sponsor === undefined) { - throw new Error('Required parameter sponsor was null or undefined when calling updateSponsorshipValidity.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (sponsor !== undefined && sponsor !== null) { - queryParameters = queryParameters.set('sponsor', sponsor); - } - if (validityTo !== undefined && validityTo !== null) { - queryParameters = queryParameters.set('validityTo', validityTo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/membersManager/updateSponsorshipValidity`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Validate all attributes for member and set member\'s status to VALID. This method runs asynchronously. It immediately return member with original status and after asynchronous validation successfully finishes it switch member\'s status to VALID. If validation ends with error, member keeps his status. - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public validateMemberAsync(member: number, observe?: 'body', reportProgress?: boolean): Observable; - public validateMemberAsync(member: number, observe?: 'response', reportProgress?: boolean): Observable>; - public validateMemberAsync(member: number, observe?: 'events', reportProgress?: boolean): Observable>; - public validateMemberAsync(member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling validateMemberAsync.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/membersManager/validateMemberAsync`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/membersManager/getCompleteRichMembers/g`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all RichMembers with attributes specific for list of attrsNames. Attributes are defined by member (user) and resource (facility) objects. It returns also user-facility (in userAttributes of RichMember) and member-resource (in memberAttributes of RichMember) attributes. Members are defined by group and are filtered by list of allowed statuses. + * @param group id of Group + * @param resource id of Resource + * @param attrsNames list of attribute names List<String> + * @param allowedStatuses list of allowed statuses List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getCompleteRichMembersForGroupResource( + group: number, + resource: number, + attrsNames: Array, + allowedStatuses: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getCompleteRichMembersForGroupResource( + group: number, + resource: number, + attrsNames: Array, + allowedStatuses: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getCompleteRichMembersForGroupResource( + group: number, + resource: number, + attrsNames: Array, + allowedStatuses: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getCompleteRichMembersForGroupResource( + group: number, + resource: number, + attrsNames: Array, + allowedStatuses: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getCompleteRichMembersForGroupResource.' + ); + } + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getCompleteRichMembersForGroupResource.' + ); + } + if (attrsNames === null || attrsNames === undefined) { + throw new Error( + 'Required parameter attrsNames was null or undefined when calling getCompleteRichMembersForGroupResource.' + ); + } + if (allowedStatuses === null || allowedStatuses === undefined) { + throw new Error( + 'Required parameter allowedStatuses was null or undefined when calling getCompleteRichMembersForGroupResource.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (attrsNames) { + attrsNames.forEach((element) => { + queryParameters = queryParameters.append('attrsNames[]', element); + }); + } + if (allowedStatuses) { + allowedStatuses.forEach((element) => { + queryParameters = queryParameters.append('allowedStatuses[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/membersManager/getCompleteRichMembers/g-r`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all RichMembers with attributes specific for list of attrsNames from the vo and have only status which is contain in list of statuses. If attrsNames is empty or null return all attributes for specific richMembers. If listOfStatuses is empty or null, return all possible statuses. + * @param vo id of Vo + * @param allowedStatuses list of allowed statuses List<String> + * @param attrsNames list of attributes names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getCompleteRichMembersForVo( + vo: number, + allowedStatuses?: Array, + attrsNames?: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getCompleteRichMembersForVo( + vo: number, + allowedStatuses?: Array, + attrsNames?: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getCompleteRichMembersForVo( + vo: number, + allowedStatuses?: Array, + attrsNames?: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getCompleteRichMembersForVo( + vo: number, + allowedStatuses?: Array, + attrsNames?: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling getCompleteRichMembersForVo.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (allowedStatuses) { + allowedStatuses.forEach((element) => { + queryParameters = queryParameters.append('allowedStatuses[]', element); + }); + } + if (attrsNames) { + attrsNames.forEach((element) => { + queryParameters = queryParameters.append('attrsNames[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/membersManager/getCompleteRichMembers/v`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Searches for members in a VO. + * @param vo id of Vo + * @param extLogin external login of user, e.g. john + * @param extSourceName external source name, e.g. IdP entityId + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberByExtSourceNameAndExtLogin( + vo: number, + extLogin: string, + extSourceName: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getMemberByExtSourceNameAndExtLogin( + vo: number, + extLogin: string, + extSourceName: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getMemberByExtSourceNameAndExtLogin( + vo: number, + extLogin: string, + extSourceName: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getMemberByExtSourceNameAndExtLogin( + vo: number, + extLogin: string, + extSourceName: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling getMemberByExtSourceNameAndExtLogin.' + ); + } + if (extLogin === null || extLogin === undefined) { + throw new Error( + 'Required parameter extLogin was null or undefined when calling getMemberByExtSourceNameAndExtLogin.' + ); + } + if (extSourceName === null || extSourceName === undefined) { + throw new Error( + 'Required parameter extSourceName was null or undefined when calling getMemberByExtSourceNameAndExtLogin.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (extLogin !== undefined && extLogin !== null) { + queryParameters = queryParameters.set('extLogin', extLogin); + } + if (extSourceName !== undefined && extSourceName !== null) { + queryParameters = queryParameters.set('extSourceName', extSourceName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/membersManager/getMemberByExtSourceNameAndExtLogin`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns Member by its id. + * Gets Member + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberById(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public getMemberById( + id: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getMemberById( + id: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getMemberById( + id: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getMemberById.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/membersManager/getMemberById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns a Member specified by VO id and User id. + * @param vo id of Vo + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMemberByUser( + vo: number, + user: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getMemberByUser( + vo: number, + user: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getMemberByUser( + vo: number, + user: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getMemberByUser( + vo: number, + user: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getMemberByUser.'); + } + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling getMemberByUser.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/membersManager/getMemberByUser`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns members of a VO. + * @param vo id of Vo + * @param status optional status + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMembers( + vo: number, + status?: VoMemberStatuses, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getMembers( + vo: number, + status?: VoMemberStatuses, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getMembers( + vo: number, + status?: VoMemberStatuses, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getMembers( + vo: number, + status?: VoMemberStatuses, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getMembers.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (status !== undefined && status !== null) { + queryParameters = queryParameters.set('status', status); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/membersManager/getMembers`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns list of Members by their ids. + * @param ids list of ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMembersByIds( + ids: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getMembersByIds( + ids: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getMembersByIds( + ids: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getMembersByIds( + ids: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (ids === null || ids === undefined) { + throw new Error('Required parameter ids was null or undefined when calling getMembersByIds.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (ids) { + ids.forEach((element) => { + queryParameters = queryParameters.append('ids[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/membersManager/getMembersByIds`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns members for a user. + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMembersByUser( + user: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getMembersByUser( + user: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getMembersByUser( + user: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getMembersByUser( + user: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling getMembersByUser.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/membersManager/getMembersByUser`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns count of all VO members. + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMembersCount( + vo: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getMembersCount( + vo: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getMembersCount( + vo: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getMembersCount( + vo: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getMembersCount.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/membersManager/getMembersCount`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get page of members from the given vo, with the given attributes. + * @param inputGetPaginatedMembers + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMembersPage( + inputGetPaginatedMembers: InputGetPaginatedMembers, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getMembersPage( + inputGetPaginatedMembers: InputGetPaginatedMembers, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getMembersPage( + inputGetPaginatedMembers: InputGetPaginatedMembers, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getMembersPage( + inputGetPaginatedMembers: InputGetPaginatedMembers, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputGetPaginatedMembers === null || inputGetPaginatedMembers === undefined) { + throw new Error( + 'Required parameter inputGetPaginatedMembers was null or undefined when calling getMembersPage.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/membersManager/getMembersPage`, + inputGetPaginatedMembers, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns count of VO members with specified status. + * @param vo id of Vo + * @param status status (VALID | INVALID | EXPIRED | DISABLED) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMembersWithStatusCount( + vo: number, + status: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getMembersWithStatusCount( + vo: number, + status: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getMembersWithStatusCount( + vo: number, + status: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getMembersWithStatusCount( + vo: number, + status: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling getMembersWithStatusCount.' + ); + } + if (status === null || status === undefined) { + throw new Error( + 'Required parameter status was null or undefined when calling getMembersWithStatusCount.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (status !== undefined && status !== null) { + queryParameters = queryParameters.set('status', status); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/membersManager/getMembersCount/status`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns RichMember by member id. + * Get RichMember without attributes + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRichMember( + id: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getRichMember( + id: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getRichMember( + id: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getRichMember( + id: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getRichMember.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/membersManager/getRichMember`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns Member by its id. + * Get richMember with member/user attributes + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRichMemberWithAttributes( + id: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getRichMemberWithAttributes( + id: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getRichMemberWithAttributes( + id: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getRichMemberWithAttributes( + id: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (id === null || id === undefined) { + throw new Error( + 'Required parameter id was null or undefined when calling getRichMemberWithAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/membersManager/getRichMemberWithAttributes`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns rich members by their IDs with specific attributes. When the list of attribute names is null or empty then rich members will be returned without attributes. + * @param ids list of ids List<Integer> + * @param attrNames list of attribute names List<String> or null + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRichMembersByIds( + ids: Array, + attrNames?: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getRichMembersByIds( + ids: Array, + attrNames?: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getRichMembersByIds( + ids: Array, + attrNames?: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getRichMembersByIds( + ids: Array, + attrNames?: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (ids === null || ids === undefined) { + throw new Error( + 'Required parameter ids was null or undefined when calling getRichMembersByIds.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (ids) { + ids.forEach((element) => { + queryParameters = queryParameters.append('ids[]', element); + }); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/membersManager/getRichMembersByIds`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets members from VO who are sponsored. + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getSponsoredMembers( + vo: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getSponsoredMembers( + vo: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getSponsoredMembers( + vo: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getSponsoredMembers( + vo: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling getSponsoredMembers.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/membersManager/getSponsoredMembers/v`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets list of members with sponsors. + * @param vo id of Vo + * @param attrNames list of attribute names List<String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getSponsoredMembersAndTheirSponsors( + vo: number, + attrNames: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getSponsoredMembersAndTheirSponsors( + vo: number, + attrNames: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getSponsoredMembersAndTheirSponsors( + vo: number, + attrNames: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getSponsoredMembersAndTheirSponsors( + vo: number, + attrNames: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling getSponsoredMembersAndTheirSponsors.' + ); + } + if (attrNames === null || attrNames === undefined) { + throw new Error( + 'Required parameter attrNames was null or undefined when calling getSponsoredMembersAndTheirSponsors.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/membersManager/getSponsoredMembersAndTheirSponsors`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets sponsors for given member with optional attribute names. + * @param member id of Member + * @param attrNames list of attribute names List<String> or null + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getSponsorsByMember( + member: number, + attrNames?: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getSponsorsByMember( + member: number, + attrNames?: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getSponsorsByMember( + member: number, + attrNames?: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getSponsorsByMember( + member: number, + attrNames?: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getSponsorsByMember.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/membersManager/getSponsors/member`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets sponsors for given VO, extSourceName and extLogin with optional attribute names. + * @param vo id of Vo + * @param extSourceName external source name, e.g. IdP entityId + * @param extLogin external login of user, e.g. john + * @param attrNames list of attribute names List<String> or null + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getSponsorsByVo( + vo: number, + extSourceName: string, + extLogin: string, + attrNames?: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getSponsorsByVo( + vo: number, + extSourceName: string, + extLogin: string, + attrNames?: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getSponsorsByVo( + vo: number, + extSourceName: string, + extLogin: string, + attrNames?: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getSponsorsByVo( + vo: number, + extSourceName: string, + extLogin: string, + attrNames?: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getSponsorsByVo.'); + } + if (extSourceName === null || extSourceName === undefined) { + throw new Error( + 'Required parameter extSourceName was null or undefined when calling getSponsorsByVo.' + ); + } + if (extLogin === null || extLogin === undefined) { + throw new Error( + 'Required parameter extLogin was null or undefined when calling getSponsorsByVo.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (extSourceName !== undefined && extSourceName !== null) { + queryParameters = queryParameters.set('extSourceName', extSourceName); + } + if (extLogin !== undefined && extLogin !== null) { + queryParameters = queryParameters.set('extLogin', extLogin); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/membersManager/getSponsors/vo`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Moves membership in VO from source user to target user - moves the source user\'s memberships in non-synchronized groups, member related attributes, bans and sponsorships in the VO. Removes the source user\'s member object. + * @param vo id of Vo + * @param sourceUser id of source user + * @param targetUser id of target user + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public moveMembership( + vo: number, + sourceUser: number, + targetUser: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public moveMembership( + vo: number, + sourceUser: number, + targetUser: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public moveMembership( + vo: number, + sourceUser: number, + targetUser: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public moveMembership( + vo: number, + sourceUser: number, + targetUser: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling moveMembership.'); + } + if (sourceUser === null || sourceUser === undefined) { + throw new Error( + 'Required parameter sourceUser was null or undefined when calling moveMembership.' + ); + } + if (targetUser === null || targetUser === undefined) { + throw new Error( + 'Required parameter targetUser was null or undefined when calling moveMembership.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (sourceUser !== undefined && sourceUser !== null) { + queryParameters = queryParameters.set('sourceUser', sourceUser); + } + if (targetUser !== undefined && targetUser !== null) { + queryParameters = queryParameters.set('targetUser', targetUser); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/membersManager/moveMembership`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Removes sponsor of existing member. + * @param member id of Member + * @param sponsor id of sponsor + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeSponsor( + member: number, + sponsor: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeSponsor( + member: number, + sponsor: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeSponsor( + member: number, + sponsor: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeSponsor( + member: number, + sponsor: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling removeSponsor.' + ); + } + if (sponsor === null || sponsor === undefined) { + throw new Error( + 'Required parameter sponsor was null or undefined when calling removeSponsor.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (sponsor !== undefined && sponsor !== null) { + queryParameters = queryParameters.set('sponsor', sponsor); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/membersManager/removeSponsor`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Send mail to user\'s preferred email address with link for non-authz account activation. Correct authz information is stored in link\'s URL. + * @param member id of Member + * @param namespace namespace + * @param emailAttributeURN urn of the attribute with stored mail + * @param language language of the message + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public sendAccountActivationLinkEmail( + member: number, + namespace: string, + emailAttributeURN: string, + language: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public sendAccountActivationLinkEmail( + member: number, + namespace: string, + emailAttributeURN: string, + language: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public sendAccountActivationLinkEmail( + member: number, + namespace: string, + emailAttributeURN: string, + language: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public sendAccountActivationLinkEmail( + member: number, + namespace: string, + emailAttributeURN: string, + language: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling sendAccountActivationLinkEmail.' + ); + } + if (namespace === null || namespace === undefined) { + throw new Error( + 'Required parameter namespace was null or undefined when calling sendAccountActivationLinkEmail.' + ); + } + if (emailAttributeURN === null || emailAttributeURN === undefined) { + throw new Error( + 'Required parameter emailAttributeURN was null or undefined when calling sendAccountActivationLinkEmail.' + ); + } + if (language === null || language === undefined) { + throw new Error( + 'Required parameter language was null or undefined when calling sendAccountActivationLinkEmail.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (namespace !== undefined && namespace !== null) { + queryParameters = queryParameters.set('namespace', namespace); + } + if (emailAttributeURN !== undefined && emailAttributeURN !== null) { + queryParameters = queryParameters.set('emailAttributeURN', emailAttributeURN); + } + if (language !== undefined && language !== null) { + queryParameters = queryParameters.set('language', language); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/membersManager/sendAccountActivationLinkEmail`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Send mail to user\'s preferred email address with link for non-authz password reset. Correct authz information is stored in link\'s URL. + * @param member id of Member + * @param namespace namespace + * @param emailAttributeURN urn of the attribute with stored mail + * @param language language of the message + * @param baseUrl base url of Perun instance (optional) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public sendPasswordResetLinkEmail( + member: number, + namespace: string, + emailAttributeURN: string, + language: string, + baseUrl?: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public sendPasswordResetLinkEmail( + member: number, + namespace: string, + emailAttributeURN: string, + language: string, + baseUrl?: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public sendPasswordResetLinkEmail( + member: number, + namespace: string, + emailAttributeURN: string, + language: string, + baseUrl?: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public sendPasswordResetLinkEmail( + member: number, + namespace: string, + emailAttributeURN: string, + language: string, + baseUrl?: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling sendPasswordResetLinkEmail.' + ); + } + if (namespace === null || namespace === undefined) { + throw new Error( + 'Required parameter namespace was null or undefined when calling sendPasswordResetLinkEmail.' + ); + } + if (emailAttributeURN === null || emailAttributeURN === undefined) { + throw new Error( + 'Required parameter emailAttributeURN was null or undefined when calling sendPasswordResetLinkEmail.' + ); + } + if (language === null || language === undefined) { + throw new Error( + 'Required parameter language was null or undefined when calling sendPasswordResetLinkEmail.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (namespace !== undefined && namespace !== null) { + queryParameters = queryParameters.set('namespace', namespace); + } + if (emailAttributeURN !== undefined && emailAttributeURN !== null) { + queryParameters = queryParameters.set('emailAttributeURN', emailAttributeURN); + } + if (language !== undefined && language !== null) { + queryParameters = queryParameters.set('language', language); + } + if (baseUrl !== undefined && baseUrl !== null) { + queryParameters = queryParameters.set('baseUrl', baseUrl); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/membersManager/sendPasswordResetLinkEmail`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Creates a sponsored membership for the given user. + * @param inputSetSponsoredMember + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setSponsoredMember( + inputSetSponsoredMember: InputSetSponsoredMember, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setSponsoredMember( + inputSetSponsoredMember: InputSetSponsoredMember, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setSponsoredMember( + inputSetSponsoredMember: InputSetSponsoredMember, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setSponsoredMember( + inputSetSponsoredMember: InputSetSponsoredMember, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputSetSponsoredMember === null || inputSetSponsoredMember === undefined) { + throw new Error( + 'Required parameter inputSetSponsoredMember was null or undefined when calling setSponsoredMember.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/membersManager/setSponsoredMember`, + inputSetSponsoredMember, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Transform non-sponsored member to sponsored one, with defined sponsor and optional sponsorship validity expiration + * @param sponsoredMember id of member to be sponsored + * @param sponsor id of sponsor + * @param validityTo date in format yyyy-mm-dd + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setSponsorshipForMember( + sponsoredMember: number, + sponsor: number, + validityTo?: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setSponsorshipForMember( + sponsoredMember: number, + sponsor: number, + validityTo?: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setSponsorshipForMember( + sponsoredMember: number, + sponsor: number, + validityTo?: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setSponsorshipForMember( + sponsoredMember: number, + sponsor: number, + validityTo?: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (sponsoredMember === null || sponsoredMember === undefined) { + throw new Error( + 'Required parameter sponsoredMember was null or undefined when calling setSponsorshipForMember.' + ); + } + if (sponsor === null || sponsor === undefined) { + throw new Error( + 'Required parameter sponsor was null or undefined when calling setSponsorshipForMember.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (sponsoredMember !== undefined && sponsoredMember !== null) { + queryParameters = queryParameters.set('sponsoredMember', sponsoredMember); + } + if (sponsor !== undefined && sponsor !== null) { + queryParameters = queryParameters.set('sponsor', sponsor); + } + if (validityTo !== undefined && validityTo !== null) { + queryParameters = queryParameters.set('validityTo', validityTo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/membersManager/setSponsorshipForMember`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Set membership status of a member. + * @param member id of Member + * @param status status (VALID | INVALID | EXPIRED | DISABLED) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setStatus( + member: number, + status: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setStatus( + member: number, + status: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setStatus( + member: number, + status: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setStatus( + member: number, + status: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error('Required parameter member was null or undefined when calling setStatus.'); + } + if (status === null || status === undefined) { + throw new Error('Required parameter status was null or undefined when calling setStatus.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (status !== undefined && status !== null) { + queryParameters = queryParameters.set('status', status); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/membersManager/setStatus`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * For an existing member, assigns a new sponsor + * @param member id of Member + * @param sponsor id of sponsor + * @param validityTo date in format yyyy-mm-dd + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public sponsorMember( + member: number, + sponsor: number, + validityTo?: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public sponsorMember( + member: number, + sponsor: number, + validityTo?: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public sponsorMember( + member: number, + sponsor: number, + validityTo?: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public sponsorMember( + member: number, + sponsor: number, + validityTo?: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling sponsorMember.' + ); + } + if (sponsor === null || sponsor === undefined) { + throw new Error( + 'Required parameter sponsor was null or undefined when calling sponsorMember.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (sponsor !== undefined && sponsor !== null) { + queryParameters = queryParameters.set('sponsor', sponsor); + } + if (validityTo !== undefined && validityTo !== null) { + queryParameters = queryParameters.set('validityTo', validityTo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/membersManager/sponsorMember`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Updates sponsorship validity. To change it to FOREVER, don\'t pass the validityTo param, or pass it as null. + * @param member id of Member + * @param sponsor id of sponsor + * @param validityTo date in format yyyy-mm-dd + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateSponsorshipValidity( + member: number, + sponsor: number, + validityTo?: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public updateSponsorshipValidity( + member: number, + sponsor: number, + validityTo?: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public updateSponsorshipValidity( + member: number, + sponsor: number, + validityTo?: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public updateSponsorshipValidity( + member: number, + sponsor: number, + validityTo?: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling updateSponsorshipValidity.' + ); + } + if (sponsor === null || sponsor === undefined) { + throw new Error( + 'Required parameter sponsor was null or undefined when calling updateSponsorshipValidity.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (sponsor !== undefined && sponsor !== null) { + queryParameters = queryParameters.set('sponsor', sponsor); + } + if (validityTo !== undefined && validityTo !== null) { + queryParameters = queryParameters.set('validityTo', validityTo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/membersManager/updateSponsorshipValidity`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Validate all attributes for member and set member\'s status to VALID. This method runs asynchronously. It immediately return member with original status and after asynchronous validation successfully finishes it switch member\'s status to VALID. If validation ends with error, member keeps his status. + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public validateMemberAsync( + member: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public validateMemberAsync( + member: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public validateMemberAsync( + member: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public validateMemberAsync( + member: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling validateMemberAsync.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); } + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/membersManager/validateMemberAsync`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } } diff --git a/libs/perun/openapi/src/lib/api/ownersManager.service.ts b/libs/perun/openapi/src/lib/api/ownersManager.service.ts index 0fdfdf138..192d5f16f 100644 --- a/libs/perun/openapi/src/lib/api/ownersManager.service.ts +++ b/libs/perun/openapi/src/lib/api/ownersManager.service.ts @@ -11,333 +11,424 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { InputCreateOwner } from '../model/inputCreateOwner'; import { Owner } from '../model/owner'; import { PerunException } from '../model/perunException'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - - +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class OwnersManagerService { + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string, + @Optional() configuration: Configuration + ) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + /** + * Creates a new owner. + * @param inputCreateOwner + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createOwner( + inputCreateOwner: InputCreateOwner, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public createOwner( + inputCreateOwner: InputCreateOwner, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public createOwner( + inputCreateOwner: InputCreateOwner, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public createOwner( + inputCreateOwner: InputCreateOwner, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputCreateOwner === null || inputCreateOwner === undefined) { + throw new Error( + 'Required parameter inputCreateOwner was null or undefined when calling createOwner.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/ownersManager/createOwner`, + inputCreateOwner, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Deletes Owner specified by id. Returns null. + * @param owner id of Owner + * @param force If true, delete entity forcefully. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteOwner( + owner: number, + force?: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public deleteOwner( + owner: number, + force?: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public deleteOwner( + owner: number, + force?: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public deleteOwner( + owner: number, + force?: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (owner === null || owner === undefined) { + throw new Error('Required parameter owner was null or undefined when calling deleteOwner.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (owner !== undefined && owner !== null) { + queryParameters = queryParameters.set('owner', owner); + } + if (force !== undefined && force !== null) { + queryParameters = queryParameters.set('force', force); + } + + let headers = this.defaultHeaders; - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); } + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/ownersManager/deleteOwner`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns all owners. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllOwners(observe?: 'body', reportProgress?: boolean): Observable>; + public getAllOwners( + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllOwners( + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAllOwners(observe: any = 'body', reportProgress: boolean = false): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/ownersManager/getOwners`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns Owner by its id. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getOwnerById(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public getOwnerById( + id: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getOwnerById( + id: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getOwnerById( + id: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getOwnerById.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } - /** - * Creates a new owner. - * @param inputCreateOwner - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createOwner(inputCreateOwner: InputCreateOwner, observe?: 'body', reportProgress?: boolean): Observable; - public createOwner(inputCreateOwner: InputCreateOwner, observe?: 'response', reportProgress?: boolean): Observable>; - public createOwner(inputCreateOwner: InputCreateOwner, observe?: 'events', reportProgress?: boolean): Observable>; - public createOwner(inputCreateOwner: InputCreateOwner, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputCreateOwner === null || inputCreateOwner === undefined) { - throw new Error('Required parameter inputCreateOwner was null or undefined when calling createOwner.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/ownersManager/createOwner`, - inputCreateOwner, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); } - /** - * Deletes Owner specified by id. Returns null. - * @param owner id of Owner - * @param force If true, delete entity forcefully. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteOwner(owner: number, force?: boolean, observe?: 'body', reportProgress?: boolean): Observable; - public deleteOwner(owner: number, force?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteOwner(owner: number, force?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteOwner(owner: number, force?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (owner === null || owner === undefined) { - throw new Error('Required parameter owner was null or undefined when calling deleteOwner.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (owner !== undefined && owner !== null) { - queryParameters = queryParameters.set('owner', owner); - } - if (force !== undefined && force !== null) { - queryParameters = queryParameters.set('force', force); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/ownersManager/deleteOwner`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.get( + `${this.configuration.basePath}/json/ownersManager/getOwnerById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns Owner by its name. + * @param owner name of Owner + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getOwnerByName( + owner: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getOwnerByName( + owner: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getOwnerByName( + owner: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getOwnerByName( + owner: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (owner === null || owner === undefined) { + throw new Error( + 'Required parameter owner was null or undefined when calling getOwnerByName.' + ); } - /** - * Returns all owners. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllOwners(observe?: 'body', reportProgress?: boolean): Observable>; - public getAllOwners(observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllOwners(observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllOwners(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/ownersManager/getOwners`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (owner !== undefined && owner !== null) { + queryParameters = queryParameters.set('owner', owner); } - /** - * Returns Owner by its id. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getOwnerById(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public getOwnerById(id: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getOwnerById(id: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getOwnerById(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getOwnerById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/ownersManager/getOwnerById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); } - /** - * Returns Owner by its name. - * @param owner name of Owner - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getOwnerByName(owner: string, observe?: 'body', reportProgress?: boolean): Observable; - public getOwnerByName(owner: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getOwnerByName(owner: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getOwnerByName(owner: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (owner === null || owner === undefined) { - throw new Error('Required parameter owner was null or undefined when calling getOwnerByName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (owner !== undefined && owner !== null) { - queryParameters = queryParameters.set('owner', owner); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/ownersManager/getOwnerByName`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); } + return this.httpClient.get( + `${this.configuration.basePath}/json/ownersManager/getOwnerByName`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } } diff --git a/libs/perun/openapi/src/lib/api/rTMessagesManager.service.ts b/libs/perun/openapi/src/lib/api/rTMessagesManager.service.ts index 251774a51..404c66904 100644 --- a/libs/perun/openapi/src/lib/api/rTMessagesManager.service.ts +++ b/libs/perun/openapi/src/lib/api/rTMessagesManager.service.ts @@ -11,349 +11,497 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { PerunException } from '../model/perunException'; import { RTMessage } from '../model/rTMessage'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - - +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class RTMessagesManagerService { - - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string, + @Optional() configuration: Configuration + ) { + if (configuration) { + this.configuration = configuration; } - - - - /** - * Sends a message to RT. Member id is sent. - * @param memberId Member whose e-mail address will be user - * @param queue RT queue - * @param subject Message subject - * @param text Message text - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public sentMessageToRTWithMemberQueue(memberId: number, queue: string, subject: string, text: string, observe?: 'body', reportProgress?: boolean): Observable; - public sentMessageToRTWithMemberQueue(memberId: number, queue: string, subject: string, text: string, observe?: 'response', reportProgress?: boolean): Observable>; - public sentMessageToRTWithMemberQueue(memberId: number, queue: string, subject: string, text: string, observe?: 'events', reportProgress?: boolean): Observable>; - public sentMessageToRTWithMemberQueue(memberId: number, queue: string, subject: string, text: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (memberId === null || memberId === undefined) { - throw new Error('Required parameter memberId was null or undefined when calling sentMessageToRTWithMemberQueue.'); - } - if (queue === null || queue === undefined) { - throw new Error('Required parameter queue was null or undefined when calling sentMessageToRTWithMemberQueue.'); - } - if (subject === null || subject === undefined) { - throw new Error('Required parameter subject was null or undefined when calling sentMessageToRTWithMemberQueue.'); - } - if (text === null || text === undefined) { - throw new Error('Required parameter text was null or undefined when calling sentMessageToRTWithMemberQueue.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (memberId !== undefined && memberId !== null) { - queryParameters = queryParameters.set('memberId', memberId); - } - if (queue !== undefined && queue !== null) { - queryParameters = queryParameters.set('queue', queue); - } - if (subject !== undefined && subject !== null) { - queryParameters = queryParameters.set('subject', subject); - } - if (text !== undefined && text !== null) { - queryParameters = queryParameters.set('text', text); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/rtMessagesManager/sentMessageToRT/m-q`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + /** + * Sends a message to RT. Member id is sent. + * @param memberId Member whose e-mail address will be user + * @param queue RT queue + * @param subject Message subject + * @param text Message text + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public sentMessageToRTWithMemberQueue( + memberId: number, + queue: string, + subject: string, + text: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public sentMessageToRTWithMemberQueue( + memberId: number, + queue: string, + subject: string, + text: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public sentMessageToRTWithMemberQueue( + memberId: number, + queue: string, + subject: string, + text: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public sentMessageToRTWithMemberQueue( + memberId: number, + queue: string, + subject: string, + text: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (memberId === null || memberId === undefined) { + throw new Error( + 'Required parameter memberId was null or undefined when calling sentMessageToRTWithMemberQueue.' + ); + } + if (queue === null || queue === undefined) { + throw new Error( + 'Required parameter queue was null or undefined when calling sentMessageToRTWithMemberQueue.' + ); + } + if (subject === null || subject === undefined) { + throw new Error( + 'Required parameter subject was null or undefined when calling sentMessageToRTWithMemberQueue.' + ); + } + if (text === null || text === undefined) { + throw new Error( + 'Required parameter text was null or undefined when calling sentMessageToRTWithMemberQueue.' + ); } - /** - * Sends a message to RT. Only text information is sent. - * @param queue RT queue - * @param subject Message subject - * @param text Message text - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public sentMessageToRTWithQueue(queue: string, subject: string, text: string, observe?: 'body', reportProgress?: boolean): Observable; - public sentMessageToRTWithQueue(queue: string, subject: string, text: string, observe?: 'response', reportProgress?: boolean): Observable>; - public sentMessageToRTWithQueue(queue: string, subject: string, text: string, observe?: 'events', reportProgress?: boolean): Observable>; - public sentMessageToRTWithQueue(queue: string, subject: string, text: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (queue === null || queue === undefined) { - throw new Error('Required parameter queue was null or undefined when calling sentMessageToRTWithQueue.'); - } - if (subject === null || subject === undefined) { - throw new Error('Required parameter subject was null or undefined when calling sentMessageToRTWithQueue.'); - } - if (text === null || text === undefined) { - throw new Error('Required parameter text was null or undefined when calling sentMessageToRTWithQueue.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (queue !== undefined && queue !== null) { - queryParameters = queryParameters.set('queue', queue); - } - if (subject !== undefined && subject !== null) { - queryParameters = queryParameters.set('subject', subject); - } - if (text !== undefined && text !== null) { - queryParameters = queryParameters.set('text', text); - } + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (memberId !== undefined && memberId !== null) { + queryParameters = queryParameters.set('memberId', memberId); + } + if (queue !== undefined && queue !== null) { + queryParameters = queryParameters.set('queue', queue); + } + if (subject !== undefined && subject !== null) { + queryParameters = queryParameters.set('subject', subject); + } + if (text !== undefined && text !== null) { + queryParameters = queryParameters.set('text', text); + } - let headers = this.defaultHeaders; + let headers = this.defaultHeaders; - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/rtMessagesManager/sentMessageToRT/m-q`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Sends a message to RT. Only text information is sent. + * @param queue RT queue + * @param subject Message subject + * @param text Message text + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public sentMessageToRTWithQueue( + queue: string, + subject: string, + text: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public sentMessageToRTWithQueue( + queue: string, + subject: string, + text: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public sentMessageToRTWithQueue( + queue: string, + subject: string, + text: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public sentMessageToRTWithQueue( + queue: string, + subject: string, + text: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (queue === null || queue === undefined) { + throw new Error( + 'Required parameter queue was null or undefined when calling sentMessageToRTWithQueue.' + ); + } + if (subject === null || subject === undefined) { + throw new Error( + 'Required parameter subject was null or undefined when calling sentMessageToRTWithQueue.' + ); + } + if (text === null || text === undefined) { + throw new Error( + 'Required parameter text was null or undefined when calling sentMessageToRTWithQueue.' + ); + } - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/rtMessagesManager/sentMessageToRT/q`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (queue !== undefined && queue !== null) { + queryParameters = queryParameters.set('queue', queue); + } + if (subject !== undefined && subject !== null) { + queryParameters = queryParameters.set('subject', subject); + } + if (text !== undefined && text !== null) { + queryParameters = queryParameters.set('text', text); } - /** - * Sends a message to RT. VO id is sent. Queue is not sent. - * @param voId VO id - * @param subject Message subject - * @param text Message text - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public sentMessageToRTWithVo(voId: number, subject: string, text: string, observe?: 'body', reportProgress?: boolean): Observable; - public sentMessageToRTWithVo(voId: number, subject: string, text: string, observe?: 'response', reportProgress?: boolean): Observable>; - public sentMessageToRTWithVo(voId: number, subject: string, text: string, observe?: 'events', reportProgress?: boolean): Observable>; - public sentMessageToRTWithVo(voId: number, subject: string, text: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (voId === null || voId === undefined) { - throw new Error('Required parameter voId was null or undefined when calling sentMessageToRTWithVo.'); - } - if (subject === null || subject === undefined) { - throw new Error('Required parameter subject was null or undefined when calling sentMessageToRTWithVo.'); - } - if (text === null || text === undefined) { - throw new Error('Required parameter text was null or undefined when calling sentMessageToRTWithVo.'); - } + let headers = this.defaultHeaders; - let queryParameters = new HttpParams({encoder: this.encoder}); - if (voId !== undefined && voId !== null) { - queryParameters = queryParameters.set('voId', voId); - } - if (subject !== undefined && subject !== null) { - queryParameters = queryParameters.set('subject', subject); - } - if (text !== undefined && text !== null) { - queryParameters = queryParameters.set('text', text); - } + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } - let headers = this.defaultHeaders; + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/rtMessagesManager/sentMessageToRT/q`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Sends a message to RT. VO id is sent. Queue is not sent. + * @param voId VO id + * @param subject Message subject + * @param text Message text + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public sentMessageToRTWithVo( + voId: number, + subject: string, + text: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public sentMessageToRTWithVo( + voId: number, + subject: string, + text: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public sentMessageToRTWithVo( + voId: number, + subject: string, + text: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public sentMessageToRTWithVo( + voId: number, + subject: string, + text: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (voId === null || voId === undefined) { + throw new Error( + 'Required parameter voId was null or undefined when calling sentMessageToRTWithVo.' + ); + } + if (subject === null || subject === undefined) { + throw new Error( + 'Required parameter subject was null or undefined when calling sentMessageToRTWithVo.' + ); + } + if (text === null || text === undefined) { + throw new Error( + 'Required parameter text was null or undefined when calling sentMessageToRTWithVo.' + ); + } - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (voId !== undefined && voId !== null) { + queryParameters = queryParameters.set('voId', voId); + } + if (subject !== undefined && subject !== null) { + queryParameters = queryParameters.set('subject', subject); + } + if (text !== undefined && text !== null) { + queryParameters = queryParameters.set('text', text); + } + let headers = this.defaultHeaders; - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/rtMessagesManager/sentMessageToRT/v`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); } - /** - * Sends a message to RT. VO id is sent. - * @param voId VO id - * @param queue RT queue - * @param subject Message subject - * @param text Message text - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public sentMessageToRTWithVoQueue(voId: number, queue: string, subject: string, text: string, observe?: 'body', reportProgress?: boolean): Observable; - public sentMessageToRTWithVoQueue(voId: number, queue: string, subject: string, text: string, observe?: 'response', reportProgress?: boolean): Observable>; - public sentMessageToRTWithVoQueue(voId: number, queue: string, subject: string, text: string, observe?: 'events', reportProgress?: boolean): Observable>; - public sentMessageToRTWithVoQueue(voId: number, queue: string, subject: string, text: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (voId === null || voId === undefined) { - throw new Error('Required parameter voId was null or undefined when calling sentMessageToRTWithVoQueue.'); - } - if (queue === null || queue === undefined) { - throw new Error('Required parameter queue was null or undefined when calling sentMessageToRTWithVoQueue.'); - } - if (subject === null || subject === undefined) { - throw new Error('Required parameter subject was null or undefined when calling sentMessageToRTWithVoQueue.'); - } - if (text === null || text === undefined) { - throw new Error('Required parameter text was null or undefined when calling sentMessageToRTWithVoQueue.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (voId !== undefined && voId !== null) { - queryParameters = queryParameters.set('voId', voId); - } - if (queue !== undefined && queue !== null) { - queryParameters = queryParameters.set('queue', queue); - } - if (subject !== undefined && subject !== null) { - queryParameters = queryParameters.set('subject', subject); - } - if (text !== undefined && text !== null) { - queryParameters = queryParameters.set('text', text); - } + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } - let headers = this.defaultHeaders; + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/rtMessagesManager/sentMessageToRT/v`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Sends a message to RT. VO id is sent. + * @param voId VO id + * @param queue RT queue + * @param subject Message subject + * @param text Message text + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public sentMessageToRTWithVoQueue( + voId: number, + queue: string, + subject: string, + text: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public sentMessageToRTWithVoQueue( + voId: number, + queue: string, + subject: string, + text: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public sentMessageToRTWithVoQueue( + voId: number, + queue: string, + subject: string, + text: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public sentMessageToRTWithVoQueue( + voId: number, + queue: string, + subject: string, + text: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (voId === null || voId === undefined) { + throw new Error( + 'Required parameter voId was null or undefined when calling sentMessageToRTWithVoQueue.' + ); + } + if (queue === null || queue === undefined) { + throw new Error( + 'Required parameter queue was null or undefined when calling sentMessageToRTWithVoQueue.' + ); + } + if (subject === null || subject === undefined) { + throw new Error( + 'Required parameter subject was null or undefined when calling sentMessageToRTWithVoQueue.' + ); + } + if (text === null || text === undefined) { + throw new Error( + 'Required parameter text was null or undefined when calling sentMessageToRTWithVoQueue.' + ); + } - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (voId !== undefined && voId !== null) { + queryParameters = queryParameters.set('voId', voId); + } + if (queue !== undefined && queue !== null) { + queryParameters = queryParameters.set('queue', queue); + } + if (subject !== undefined && subject !== null) { + queryParameters = queryParameters.set('subject', subject); + } + if (text !== undefined && text !== null) { + queryParameters = queryParameters.set('text', text); + } - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } + let headers = this.defaultHeaders; + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/rtMessagesManager/sentMessageToRT/v-q`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); } + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/rtMessagesManager/sentMessageToRT/v-q`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } } diff --git a/libs/perun/openapi/src/lib/api/registrarManager.service.ts b/libs/perun/openapi/src/lib/api/registrarManager.service.ts index fc9e780b0..856a60756 100644 --- a/libs/perun/openapi/src/lib/api/registrarManager.service.ts +++ b/libs/perun/openapi/src/lib/api/registrarManager.service.ts @@ -11,11 +11,17 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { Application } from '../model/application'; import { ApplicationForm } from '../model/applicationForm'; @@ -40,3160 +46,4294 @@ import { PaginatedRichApplications } from '../model/paginatedRichApplications'; import { PerunException } from '../model/perunException'; import { UserExtSource } from '../model/userExtSource'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - - +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class RegistrarManagerService { + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string, + @Optional() configuration: Configuration + ) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + /** + * Add new mail notification. + * @param inputAddApplicationMailForGroup + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addApplicationMailForGroup( + inputAddApplicationMailForGroup: InputAddApplicationMailForGroup, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public addApplicationMailForGroup( + inputAddApplicationMailForGroup: InputAddApplicationMailForGroup, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public addApplicationMailForGroup( + inputAddApplicationMailForGroup: InputAddApplicationMailForGroup, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public addApplicationMailForGroup( + inputAddApplicationMailForGroup: InputAddApplicationMailForGroup, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputAddApplicationMailForGroup === null || inputAddApplicationMailForGroup === undefined) { + throw new Error( + 'Required parameter inputAddApplicationMailForGroup was null or undefined when calling addApplicationMailForGroup.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/registrarManager/addApplicationMail/g`, + inputAddApplicationMailForGroup, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Add new mail notification. + * @param inputAddApplicationMailForVo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addApplicationMailForVo( + inputAddApplicationMailForVo: InputAddApplicationMailForVo, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public addApplicationMailForVo( + inputAddApplicationMailForVo: InputAddApplicationMailForVo, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public addApplicationMailForVo( + inputAddApplicationMailForVo: InputAddApplicationMailForVo, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public addApplicationMailForVo( + inputAddApplicationMailForVo: InputAddApplicationMailForVo, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputAddApplicationMailForVo === null || inputAddApplicationMailForVo === undefined) { + throw new Error( + 'Required parameter inputAddApplicationMailForVo was null or undefined when calling addApplicationMailForVo.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/registrarManager/addApplicationMail/v`, + inputAddApplicationMailForVo, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Adds groups to a list of groups which can be registered into during vo registration. + * @param groups list of Group ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addGroupsToAutoRegistration( + groups: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public addGroupsToAutoRegistration( + groups: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public addGroupsToAutoRegistration( + groups: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public addGroupsToAutoRegistration( + groups: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (groups === null || groups === undefined) { + throw new Error( + 'Required parameter groups was null or undefined when calling addGroupsToAutoRegistration.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (groups) { + groups.forEach((element) => { + queryParameters = queryParameters.append('groups[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/registrarManager/addGroupsToAutoRegistration`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Manually approves an application. + * Expected to be called as a result of direct VO administrator action in the web UI. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public approveApplication( + id: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public approveApplication( + id: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public approveApplication( + id: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public approveApplication( + id: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (id === null || id === undefined) { + throw new Error( + 'Required parameter id was null or undefined when calling approveApplication.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/registrarManager/approveApplication`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Check for similar users by name and email in session (authz) information + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public checkForSimilarUsersWithAuthInfo( + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public checkForSimilarUsersWithAuthInfo( + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public checkForSimilarUsersWithAuthInfo( + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public checkForSimilarUsersWithAuthInfo( + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post>( + `${this.configuration.basePath}/urlinjsonout/registrarManager/checkForSimilarUsers/authInfo`, + null, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Joins current user identity with the one previously provided and referenced by the token. + * @param token token to be used for joining identities + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public consolidateIdentityUsingToken( + token: string, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public consolidateIdentityUsingToken( + token: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public consolidateIdentityUsingToken( + token: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public consolidateIdentityUsingToken( + token: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (token === null || token === undefined) { + throw new Error( + 'Required parameter token was null or undefined when calling consolidateIdentityUsingToken.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (token !== undefined && token !== null) { + queryParameters = queryParameters.set('token', token); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/registrarManager/consolidateIdentityUsingToken`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Copy all form items from selected Group into another. + * @param fromGroup source group + * @param toGroup destination group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyFormFromGroupToGroup( + fromGroup?: number, + toGroup?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public copyFormFromGroupToGroup( + fromGroup?: number, + toGroup?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public copyFormFromGroupToGroup( + fromGroup?: number, + toGroup?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public copyFormFromGroupToGroup( + fromGroup?: number, + toGroup?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (fromGroup !== undefined && fromGroup !== null) { + queryParameters = queryParameters.set('fromGroup', fromGroup); + } + if (toGroup !== undefined && toGroup !== null) { + queryParameters = queryParameters.set('toGroup', toGroup); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/registrarManager/copyForm/groupToGroup`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Copy all form items from selected Group into VO. + * @param fromGroup source group + * @param toVo destination VO + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyFormFromGroupToVo( + fromGroup?: number, + toVo?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public copyFormFromGroupToVo( + fromGroup?: number, + toVo?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public copyFormFromGroupToVo( + fromGroup?: number, + toVo?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public copyFormFromGroupToVo( + fromGroup?: number, + toVo?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (fromGroup !== undefined && fromGroup !== null) { + queryParameters = queryParameters.set('fromGroup', fromGroup); + } + if (toVo !== undefined && toVo !== null) { + queryParameters = queryParameters.set('toVo', toVo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/registrarManager/copyForm/groupToVo`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Copy all form items from selected VO into Group. + * @param fromVo source VO + * @param toGroup destination group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyFormFromVoToGroup( + fromVo?: number, + toGroup?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public copyFormFromVoToGroup( + fromVo?: number, + toGroup?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public copyFormFromVoToGroup( + fromVo?: number, + toGroup?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public copyFormFromVoToGroup( + fromVo?: number, + toGroup?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (fromVo !== undefined && fromVo !== null) { + queryParameters = queryParameters.set('fromVo', fromVo); + } + if (toGroup !== undefined && toGroup !== null) { + queryParameters = queryParameters.set('toGroup', toGroup); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/registrarManager/copyForm/voToGroup`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Copy all form items from selected VO into another. + * @param fromVo source VO + * @param toVo destination VO + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyFormFromVoToVo( + fromVo?: number, + toVo?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public copyFormFromVoToVo( + fromVo?: number, + toVo?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public copyFormFromVoToVo( + fromVo?: number, + toVo?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public copyFormFromVoToVo( + fromVo?: number, + toVo?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (fromVo !== undefined && fromVo !== null) { + queryParameters = queryParameters.set('fromVo', fromVo); + } + if (toVo !== undefined && toVo !== null) { + queryParameters = queryParameters.set('toVo', toVo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/registrarManager/copyForm/voToVo`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Copy all e-mail notifications from selected Group into another. + * @param fromGroup source group + * @param toGroup destination group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyMailsFromGroupToGroup( + fromGroup?: number, + toGroup?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public copyMailsFromGroupToGroup( + fromGroup?: number, + toGroup?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public copyMailsFromGroupToGroup( + fromGroup?: number, + toGroup?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public copyMailsFromGroupToGroup( + fromGroup?: number, + toGroup?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (fromGroup !== undefined && fromGroup !== null) { + queryParameters = queryParameters.set('fromGroup', fromGroup); + } + if (toGroup !== undefined && toGroup !== null) { + queryParameters = queryParameters.set('toGroup', toGroup); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/registrarManager/copyMails/groupToGroup`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Copy all e-mail notifications from selected Group into VO. + * @param fromGroup source group + * @param toVo destination VO + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyMailsFromGroupToVo( + fromGroup?: number, + toVo?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public copyMailsFromGroupToVo( + fromGroup?: number, + toVo?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public copyMailsFromGroupToVo( + fromGroup?: number, + toVo?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public copyMailsFromGroupToVo( + fromGroup?: number, + toVo?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (fromGroup !== undefined && fromGroup !== null) { + queryParameters = queryParameters.set('fromGroup', fromGroup); + } + if (toVo !== undefined && toVo !== null) { + queryParameters = queryParameters.set('toVo', toVo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/registrarManager/copyMails/groupToVo`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Copy all e-mail notifications from selected VO into Group. + * @param fromVo source VO + * @param toGroup destination group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyMailsFromVoToGroup( + fromVo?: number, + toGroup?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public copyMailsFromVoToGroup( + fromVo?: number, + toGroup?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public copyMailsFromVoToGroup( + fromVo?: number, + toGroup?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public copyMailsFromVoToGroup( + fromVo?: number, + toGroup?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (fromVo !== undefined && fromVo !== null) { + queryParameters = queryParameters.set('fromVo', fromVo); + } + if (toGroup !== undefined && toGroup !== null) { + queryParameters = queryParameters.set('toGroup', toGroup); + } + + let headers = this.defaultHeaders; - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - - - /** - * Add new mail notification. - * @param inputAddApplicationMailForGroup - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addApplicationMailForGroup(inputAddApplicationMailForGroup: InputAddApplicationMailForGroup, observe?: 'body', reportProgress?: boolean): Observable; - public addApplicationMailForGroup(inputAddApplicationMailForGroup: InputAddApplicationMailForGroup, observe?: 'response', reportProgress?: boolean): Observable>; - public addApplicationMailForGroup(inputAddApplicationMailForGroup: InputAddApplicationMailForGroup, observe?: 'events', reportProgress?: boolean): Observable>; - public addApplicationMailForGroup(inputAddApplicationMailForGroup: InputAddApplicationMailForGroup, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputAddApplicationMailForGroup === null || inputAddApplicationMailForGroup === undefined) { - throw new Error('Required parameter inputAddApplicationMailForGroup was null or undefined when calling addApplicationMailForGroup.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/registrarManager/addApplicationMail/g`, - inputAddApplicationMailForGroup, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Add new mail notification. - * @param inputAddApplicationMailForVo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addApplicationMailForVo(inputAddApplicationMailForVo: InputAddApplicationMailForVo, observe?: 'body', reportProgress?: boolean): Observable; - public addApplicationMailForVo(inputAddApplicationMailForVo: InputAddApplicationMailForVo, observe?: 'response', reportProgress?: boolean): Observable>; - public addApplicationMailForVo(inputAddApplicationMailForVo: InputAddApplicationMailForVo, observe?: 'events', reportProgress?: boolean): Observable>; - public addApplicationMailForVo(inputAddApplicationMailForVo: InputAddApplicationMailForVo, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputAddApplicationMailForVo === null || inputAddApplicationMailForVo === undefined) { - throw new Error('Required parameter inputAddApplicationMailForVo was null or undefined when calling addApplicationMailForVo.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/registrarManager/addApplicationMail/v`, - inputAddApplicationMailForVo, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Adds groups to a list of groups which can be registered into during vo registration. - * @param groups list of Group ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addGroupsToAutoRegistration(groups: Array, observe?: 'body', reportProgress?: boolean): Observable; - public addGroupsToAutoRegistration(groups: Array, observe?: 'response', reportProgress?: boolean): Observable>; - public addGroupsToAutoRegistration(groups: Array, observe?: 'events', reportProgress?: boolean): Observable>; - public addGroupsToAutoRegistration(groups: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (groups === null || groups === undefined) { - throw new Error('Required parameter groups was null or undefined when calling addGroupsToAutoRegistration.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (groups) { - groups.forEach((element) => { - queryParameters = queryParameters.append('groups[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/addGroupsToAutoRegistration`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Manually approves an application. - * Expected to be called as a result of direct VO administrator action in the web UI. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public approveApplication(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public approveApplication(id: number, observe?: 'response', reportProgress?: boolean): Observable>; - public approveApplication(id: number, observe?: 'events', reportProgress?: boolean): Observable>; - public approveApplication(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling approveApplication.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/approveApplication`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Check for similar users by name and email in session (authz) information - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public checkForSimilarUsersWithAuthInfo(observe?: 'body', reportProgress?: boolean): Observable>; - public checkForSimilarUsersWithAuthInfo(observe?: 'response', reportProgress?: boolean): Observable>>; - public checkForSimilarUsersWithAuthInfo(observe?: 'events', reportProgress?: boolean): Observable>>; - public checkForSimilarUsersWithAuthInfo(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post>(`${this.configuration.basePath}/urlinjsonout/registrarManager/checkForSimilarUsers/authInfo`, - null, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Joins current user identity with the one previously provided and referenced by the token. - * @param token token to be used for joining identities - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public consolidateIdentityUsingToken(token: string, observe?: 'body', reportProgress?: boolean): Observable>; - public consolidateIdentityUsingToken(token: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public consolidateIdentityUsingToken(token: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public consolidateIdentityUsingToken(token: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (token === null || token === undefined) { - throw new Error('Required parameter token was null or undefined when calling consolidateIdentityUsingToken.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (token !== undefined && token !== null) { - queryParameters = queryParameters.set('token', token); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/registrarManager/consolidateIdentityUsingToken`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Copy all form items from selected Group into another. - * @param fromGroup source group - * @param toGroup destination group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyFormFromGroupToGroup(fromGroup?: number, toGroup?: number, observe?: 'body', reportProgress?: boolean): Observable; - public copyFormFromGroupToGroup(fromGroup?: number, toGroup?: number, observe?: 'response', reportProgress?: boolean): Observable>; - public copyFormFromGroupToGroup(fromGroup?: number, toGroup?: number, observe?: 'events', reportProgress?: boolean): Observable>; - public copyFormFromGroupToGroup(fromGroup?: number, toGroup?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (fromGroup !== undefined && fromGroup !== null) { - queryParameters = queryParameters.set('fromGroup', fromGroup); - } - if (toGroup !== undefined && toGroup !== null) { - queryParameters = queryParameters.set('toGroup', toGroup); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/copyForm/groupToGroup`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Copy all form items from selected Group into VO. - * @param fromGroup source group - * @param toVo destination VO - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyFormFromGroupToVo(fromGroup?: number, toVo?: number, observe?: 'body', reportProgress?: boolean): Observable; - public copyFormFromGroupToVo(fromGroup?: number, toVo?: number, observe?: 'response', reportProgress?: boolean): Observable>; - public copyFormFromGroupToVo(fromGroup?: number, toVo?: number, observe?: 'events', reportProgress?: boolean): Observable>; - public copyFormFromGroupToVo(fromGroup?: number, toVo?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (fromGroup !== undefined && fromGroup !== null) { - queryParameters = queryParameters.set('fromGroup', fromGroup); - } - if (toVo !== undefined && toVo !== null) { - queryParameters = queryParameters.set('toVo', toVo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/copyForm/groupToVo`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Copy all form items from selected VO into Group. - * @param fromVo source VO - * @param toGroup destination group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyFormFromVoToGroup(fromVo?: number, toGroup?: number, observe?: 'body', reportProgress?: boolean): Observable; - public copyFormFromVoToGroup(fromVo?: number, toGroup?: number, observe?: 'response', reportProgress?: boolean): Observable>; - public copyFormFromVoToGroup(fromVo?: number, toGroup?: number, observe?: 'events', reportProgress?: boolean): Observable>; - public copyFormFromVoToGroup(fromVo?: number, toGroup?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (fromVo !== undefined && fromVo !== null) { - queryParameters = queryParameters.set('fromVo', fromVo); - } - if (toGroup !== undefined && toGroup !== null) { - queryParameters = queryParameters.set('toGroup', toGroup); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/copyForm/voToGroup`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Copy all form items from selected VO into another. - * @param fromVo source VO - * @param toVo destination VO - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyFormFromVoToVo(fromVo?: number, toVo?: number, observe?: 'body', reportProgress?: boolean): Observable; - public copyFormFromVoToVo(fromVo?: number, toVo?: number, observe?: 'response', reportProgress?: boolean): Observable>; - public copyFormFromVoToVo(fromVo?: number, toVo?: number, observe?: 'events', reportProgress?: boolean): Observable>; - public copyFormFromVoToVo(fromVo?: number, toVo?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (fromVo !== undefined && fromVo !== null) { - queryParameters = queryParameters.set('fromVo', fromVo); - } - if (toVo !== undefined && toVo !== null) { - queryParameters = queryParameters.set('toVo', toVo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/copyForm/voToVo`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Copy all e-mail notifications from selected Group into another. - * @param fromGroup source group - * @param toGroup destination group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyMailsFromGroupToGroup(fromGroup?: number, toGroup?: number, observe?: 'body', reportProgress?: boolean): Observable; - public copyMailsFromGroupToGroup(fromGroup?: number, toGroup?: number, observe?: 'response', reportProgress?: boolean): Observable>; - public copyMailsFromGroupToGroup(fromGroup?: number, toGroup?: number, observe?: 'events', reportProgress?: boolean): Observable>; - public copyMailsFromGroupToGroup(fromGroup?: number, toGroup?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (fromGroup !== undefined && fromGroup !== null) { - queryParameters = queryParameters.set('fromGroup', fromGroup); - } - if (toGroup !== undefined && toGroup !== null) { - queryParameters = queryParameters.set('toGroup', toGroup); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/copyMails/groupToGroup`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Copy all e-mail notifications from selected Group into VO. - * @param fromGroup source group - * @param toVo destination VO - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyMailsFromGroupToVo(fromGroup?: number, toVo?: number, observe?: 'body', reportProgress?: boolean): Observable; - public copyMailsFromGroupToVo(fromGroup?: number, toVo?: number, observe?: 'response', reportProgress?: boolean): Observable>; - public copyMailsFromGroupToVo(fromGroup?: number, toVo?: number, observe?: 'events', reportProgress?: boolean): Observable>; - public copyMailsFromGroupToVo(fromGroup?: number, toVo?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (fromGroup !== undefined && fromGroup !== null) { - queryParameters = queryParameters.set('fromGroup', fromGroup); - } - if (toVo !== undefined && toVo !== null) { - queryParameters = queryParameters.set('toVo', toVo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/copyMails/groupToVo`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Copy all e-mail notifications from selected VO into Group. - * @param fromVo source VO - * @param toGroup destination group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyMailsFromVoToGroup(fromVo?: number, toGroup?: number, observe?: 'body', reportProgress?: boolean): Observable; - public copyMailsFromVoToGroup(fromVo?: number, toGroup?: number, observe?: 'response', reportProgress?: boolean): Observable>; - public copyMailsFromVoToGroup(fromVo?: number, toGroup?: number, observe?: 'events', reportProgress?: boolean): Observable>; - public copyMailsFromVoToGroup(fromVo?: number, toGroup?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (fromVo !== undefined && fromVo !== null) { - queryParameters = queryParameters.set('fromVo', fromVo); - } - if (toGroup !== undefined && toGroup !== null) { - queryParameters = queryParameters.set('toGroup', toGroup); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/copyMails/voToGroup`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Copy all e-mail notifications from selected VO into another. - * @param fromVo source VO - * @param toVo destination VO - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyMailsFromVoToVo(fromVo?: number, toVo?: number, observe?: 'body', reportProgress?: boolean): Observable; - public copyMailsFromVoToVo(fromVo?: number, toVo?: number, observe?: 'response', reportProgress?: boolean): Observable>; - public copyMailsFromVoToVo(fromVo?: number, toVo?: number, observe?: 'events', reportProgress?: boolean): Observable>; - public copyMailsFromVoToVo(fromVo?: number, toVo?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (fromVo !== undefined && fromVo !== null) { - queryParameters = queryParameters.set('fromVo', fromVo); - } - if (toVo !== undefined && toVo !== null) { - queryParameters = queryParameters.set('toVo', toVo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/copyMails/voToVo`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Create application form for a group. - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createApplicationFormInGroup(group: number, observe?: 'body', reportProgress?: boolean): Observable; - public createApplicationFormInGroup(group: number, observe?: 'response', reportProgress?: boolean): Observable>; - public createApplicationFormInGroup(group: number, observe?: 'events', reportProgress?: boolean): Observable>; - public createApplicationFormInGroup(group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling createApplicationFormInGroup.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/createApplicationForm/group`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Create application form for a VO. - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createApplicationFormInVo(vo: number, observe?: 'body', reportProgress?: boolean): Observable; - public createApplicationFormInVo(vo: number, observe?: 'response', reportProgress?: boolean): Observable>; - public createApplicationFormInVo(vo: number, observe?: 'events', reportProgress?: boolean): Observable>; - public createApplicationFormInVo(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling createApplicationFormInVo.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/createApplicationForm/vo`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Deletes an application. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteApplication(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public deleteApplication(id: number, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteApplication(id: number, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteApplication(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling deleteApplication.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/deleteApplication`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Deletes an e-mail notification from DB based on id property. - * @param group id of Group - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteApplicationMailForGroup(group: number, id: number, observe?: 'body', reportProgress?: boolean): Observable; - public deleteApplicationMailForGroup(group: number, id: number, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteApplicationMailForGroup(group: number, id: number, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteApplicationMailForGroup(group: number, id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling deleteApplicationMailForGroup.'); - } - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling deleteApplicationMailForGroup.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/deleteApplicationMail/g`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Deletes an e-mail notification from DB based on id property. - * @param vo id of Vo - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteApplicationMailForVo(vo: number, id: number, observe?: 'body', reportProgress?: boolean): Observable; - public deleteApplicationMailForVo(vo: number, id: number, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteApplicationMailForVo(vo: number, id: number, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteApplicationMailForVo(vo: number, id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling deleteApplicationMailForVo.'); - } - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling deleteApplicationMailForVo.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/deleteApplicationMail/v`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Deletes groups from a list of groups which can be registered into during vo registration. - * @param groups list of Group ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteGroupsFromAutoRegistration(groups: Array, observe?: 'body', reportProgress?: boolean): Observable; - public deleteGroupsFromAutoRegistration(groups: Array, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteGroupsFromAutoRegistration(groups: Array, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteGroupsFromAutoRegistration(groups: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (groups === null || groups === undefined) { - throw new Error('Required parameter groups was null or undefined when calling deleteGroupsFromAutoRegistration.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (groups) { - groups.forEach((element) => { - queryParameters = queryParameters.append('groups[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/deleteGroupsFromAutoRegistration`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns application object by its id. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getApplicationById(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public getApplicationById(id: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getApplicationById(id: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getApplicationById(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getApplicationById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/registrarManager/getApplicationById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns data submitted by user in given application (by id). - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getApplicationDataById(id: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getApplicationDataById(id: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getApplicationDataById(id: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getApplicationDataById(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getApplicationDataById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/registrarManager/getApplicationDataById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns all mail notifications related to specific app form. - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getApplicationMailsForGroup(group: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getApplicationMailsForGroup(group: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getApplicationMailsForGroup(group: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getApplicationMailsForGroup(group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getApplicationMailsForGroup.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/registrarManager/getApplicationMails/g`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns all mail notifications related to specific app form. - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getApplicationMailsForVo(vo: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getApplicationMailsForVo(vo: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getApplicationMailsForVo(vo: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getApplicationMailsForVo(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getApplicationMailsForVo.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/registrarManager/getApplicationMails/v`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Gets all applications for a given Group. - * @param group id of Group - * @param state list of states: NEW, VERIFIED, APPROVED, REJECTED - * @param dateFrom return with the same date or applications newer than this date - * @param dateTo return applications with the same date or older than this date - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getApplicationsForGroup(group: number, state?: Array, dateFrom?: string, dateTo?: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getApplicationsForGroup(group: number, state?: Array, dateFrom?: string, dateTo?: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getApplicationsForGroup(group: number, state?: Array, dateFrom?: string, dateTo?: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getApplicationsForGroup(group: number, state?: Array, dateFrom?: string, dateTo?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getApplicationsForGroup.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (state) { - state.forEach((element) => { - queryParameters = queryParameters.append('state[]', element); - }) - } - if (dateFrom !== undefined && dateFrom !== null) { - queryParameters = queryParameters.set('dateFrom', dateFrom); - } - if (dateTo !== undefined && dateTo !== null) { - queryParameters = queryParameters.set('dateTo', dateTo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/registrarManager/getApplicationsForGroup`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Gets all aplications for a given Member. - * @param member id of Member - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getApplicationsForMember(member: number, group?: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getApplicationsForMember(member: number, group?: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getApplicationsForMember(member: number, group?: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getApplicationsForMember(member: number, group?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getApplicationsForMember.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/registrarManager/getApplicationsForMember`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Gets all applications for a given VO. - * @param vo id of Vo - * @param state list of states: NEW, VERIFIED, APPROVED, REJECTED - * @param dateFrom return applications with the same date or newer than this date - * @param dateTo return applications with the same date or older than this date - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getApplicationsForVo(vo: number, state?: Array, dateFrom?: string, dateTo?: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getApplicationsForVo(vo: number, state?: Array, dateFrom?: string, dateTo?: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getApplicationsForVo(vo: number, state?: Array, dateFrom?: string, dateTo?: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getApplicationsForVo(vo: number, state?: Array, dateFrom?: string, dateTo?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getApplicationsForVo.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (state) { - state.forEach((element) => { - queryParameters = queryParameters.append('state[]', element); - }) - } - if (dateFrom !== undefined && dateFrom !== null) { - queryParameters = queryParameters.set('dateFrom', dateFrom); - } - if (dateTo !== undefined && dateTo !== null) { - queryParameters = queryParameters.set('dateTo', dateTo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/registrarManager/getApplicationsForVo`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get page of applications from the given vo, based on the query attributes. - * @param inputGetPaginatedApplications - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getApplicationsPage(inputGetPaginatedApplications: InputGetPaginatedApplications, observe?: 'body', reportProgress?: boolean): Observable; - public getApplicationsPage(inputGetPaginatedApplications: InputGetPaginatedApplications, observe?: 'response', reportProgress?: boolean): Observable>; - public getApplicationsPage(inputGetPaginatedApplications: InputGetPaginatedApplications, observe?: 'events', reportProgress?: boolean): Observable>; - public getApplicationsPage(inputGetPaginatedApplications: InputGetPaginatedApplications, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputGetPaginatedApplications === null || inputGetPaginatedApplications === undefined) { - throw new Error('Required parameter inputGetPaginatedApplications was null or undefined when calling getApplicationsPage.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/registrarManager/getApplicationsPage`, - inputGetPaginatedApplications, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get time-limited token proving user identity in external source (for now 3 minutes). - * It can be used to join user identity with another by calling consolidateIdentityUsingToken() method and passing the token. Please note, that different authz (identity) must be used to perform both calls. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getConsolidatorToken(observe?: 'body', reportProgress?: boolean): Observable; - public getConsolidatorToken(observe?: 'response', reportProgress?: boolean): Observable>; - public getConsolidatorToken(observe?: 'events', reportProgress?: boolean): Observable>; - public getConsolidatorToken(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/registrarManager/getConsolidatorToken`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Gets all items in Group application form. - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFormItemsForGroup(group: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getFormItemsForGroup(group: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getFormItemsForGroup(group: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getFormItemsForGroup(group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getFormItemsForGroup.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/registrarManager/getFormItems/group`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Gets items of specified type in Group application form, for initital registration or extension of account. - * @param group id of Group - * @param type application type: INITIAL, EXTENSION or EMBEDDED - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFormItemsForGroupWithType(group: number, type?: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getFormItemsForGroupWithType(group: number, type?: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getFormItemsForGroupWithType(group: number, type?: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getFormItemsForGroupWithType(group: number, type?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getFormItemsForGroupWithType.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (type !== undefined && type !== null) { - queryParameters = queryParameters.set('type', type); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/registrarManager/getFormItems/group-type`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Gets all items in VO application form. - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFormItemsForVo(vo: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getFormItemsForVo(vo: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getFormItemsForVo(vo: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getFormItemsForVo(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getFormItemsForVo.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/registrarManager/getFormItems/vo`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Gets items of specified type in VO application form, for initital registration or extension of account. - * @param vo id of Vo - * @param type application type: INITIAL or EXTENSION - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFormItemsForVoWithType(vo: number, type?: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getFormItemsForVoWithType(vo: number, type?: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getFormItemsForVoWithType(vo: number, type?: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getFormItemsForVoWithType(vo: number, type?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getFormItemsForVoWithType.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (type !== undefined && type !== null) { - queryParameters = queryParameters.set('type', type); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/registrarManager/getFormItems/vo-type`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Gets an application form for a given Group. - * There is exactly one form for membership per Group, one form is used for both initial registration and annual account expansion, just the form items are marked whether the should be present in one, the other, or both types of application. - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupApplicationForm(group: number, observe?: 'body', reportProgress?: boolean): Observable; - public getGroupApplicationForm(group: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getGroupApplicationForm(group: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getGroupApplicationForm(group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getGroupApplicationForm.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/registrarManager/getApplicationForm/group`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns all groups which can be registered into during vo registration. - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupsToAutoRegistration(vo: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getGroupsToAutoRegistration(vo: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getGroupsToAutoRegistration(vo: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getGroupsToAutoRegistration(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getGroupsToAutoRegistration.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/registrarManager/getGroupsToAutoRegistration`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Gets an application form for a given VO. - * There is exactly one form for membership per VO, one form is used for both initial registration and annual account expansion, just the form items are marked whether the should be present in one, the other, or both types of application. - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVoApplicationForm(vo: number, observe?: 'body', reportProgress?: boolean): Observable; - public getVoApplicationForm(vo: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getVoApplicationForm(vo: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getVoApplicationForm(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getVoApplicationForm.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/registrarManager/getApplicationForm/vo`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Manually rejects an application. - * Expected to be called as a result of direct VO administrator action in the web UI. - * @param id numeric id - * @param reason description of reason - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public rejectApplication(id: number, reason?: string, observe?: 'body', reportProgress?: boolean): Observable; - public rejectApplication(id: number, reason?: string, observe?: 'response', reportProgress?: boolean): Observable>; - public rejectApplication(id: number, reason?: string, observe?: 'events', reportProgress?: boolean): Observable>; - public rejectApplication(id: number, reason?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling rejectApplication.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - if (reason !== undefined && reason !== null) { - queryParameters = queryParameters.set('reason', reason); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/rejectApplication`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Sends invitation email to user which is not member of VO - * @param email email address to send invitation to - * @param language preferred language to use - * @param voId id of VO to send invitation into - * @param name name of person used in invitation email (optional) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public sendInvitation(email: string, language: string, voId?: number, name?: string, observe?: 'body', reportProgress?: boolean): Observable; - public sendInvitation(email: string, language: string, voId?: number, name?: string, observe?: 'response', reportProgress?: boolean): Observable>; - public sendInvitation(email: string, language: string, voId?: number, name?: string, observe?: 'events', reportProgress?: boolean): Observable>; - public sendInvitation(email: string, language: string, voId?: number, name?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (email === null || email === undefined) { - throw new Error('Required parameter email was null or undefined when calling sendInvitation.'); - } - if (language === null || language === undefined) { - throw new Error('Required parameter language was null or undefined when calling sendInvitation.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (voId !== undefined && voId !== null) { - queryParameters = queryParameters.set('voId', voId); - } - if (name !== undefined && name !== null) { - queryParameters = queryParameters.set('name', name); - } - if (email !== undefined && email !== null) { - queryParameters = queryParameters.set('email', email); - } - if (language !== undefined && language !== null) { - queryParameters = queryParameters.set('language', language); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/sendInvitation`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Sends invitation email to user which is not member of VO and Group - * Invitation link targets VO application form fist, after submission, Group application form is displayed. - * @param email email address to send invitation to - * @param language preferred language to use - * @param voId id of VO to send invitation into - * @param groupId id of Group to send invitation into - * @param name name of person used in invitation email (optional) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public sendInvitationForGroup(email: string, language: string, voId?: number, groupId?: number, name?: string, observe?: 'body', reportProgress?: boolean): Observable; - public sendInvitationForGroup(email: string, language: string, voId?: number, groupId?: number, name?: string, observe?: 'response', reportProgress?: boolean): Observable>; - public sendInvitationForGroup(email: string, language: string, voId?: number, groupId?: number, name?: string, observe?: 'events', reportProgress?: boolean): Observable>; - public sendInvitationForGroup(email: string, language: string, voId?: number, groupId?: number, name?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (email === null || email === undefined) { - throw new Error('Required parameter email was null or undefined when calling sendInvitationForGroup.'); - } - if (language === null || language === undefined) { - throw new Error('Required parameter language was null or undefined when calling sendInvitationForGroup.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (voId !== undefined && voId !== null) { - queryParameters = queryParameters.set('voId', voId); - } - if (groupId !== undefined && groupId !== null) { - queryParameters = queryParameters.set('groupId', groupId); - } - if (name !== undefined && name !== null) { - queryParameters = queryParameters.set('name', name); - } - if (email !== undefined && email !== null) { - queryParameters = queryParameters.set('email', email); - } - if (language !== undefined && language !== null) { - queryParameters = queryParameters.set('language', language); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/sendInvitation/g`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Sends invitation email to user which is not member of Group - * @param userId id of user to send invitation to - * @param voId id of VO to send invitation into - * @param groupId id of Group to send invitation into - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public sendInvitationGroupToExistingUser(userId?: number, voId?: number, groupId?: number, observe?: 'body', reportProgress?: boolean): Observable; - public sendInvitationGroupToExistingUser(userId?: number, voId?: number, groupId?: number, observe?: 'response', reportProgress?: boolean): Observable>; - public sendInvitationGroupToExistingUser(userId?: number, voId?: number, groupId?: number, observe?: 'events', reportProgress?: boolean): Observable>; - public sendInvitationGroupToExistingUser(userId?: number, voId?: number, groupId?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (userId !== undefined && userId !== null) { - queryParameters = queryParameters.set('userId', userId); - } - if (voId !== undefined && voId !== null) { - queryParameters = queryParameters.set('voId', voId); - } - if (groupId !== undefined && groupId !== null) { - queryParameters = queryParameters.set('groupId', groupId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/sendInvitation/u-g`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Sends invitation email to user which is not member of VO - * @param userId id of user to send invitation to - * @param voId id of VO to send invitation into - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public sendInvitationToExistingUser(userId?: number, voId?: number, observe?: 'body', reportProgress?: boolean): Observable; - public sendInvitationToExistingUser(userId?: number, voId?: number, observe?: 'response', reportProgress?: boolean): Observable>; - public sendInvitationToExistingUser(userId?: number, voId?: number, observe?: 'events', reportProgress?: boolean): Observable>; - public sendInvitationToExistingUser(userId?: number, voId?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (userId !== undefined && userId !== null) { - queryParameters = queryParameters.set('userId', userId); - } - if (voId !== undefined && voId !== null) { - queryParameters = queryParameters.set('voId', voId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/sendInvitation/u`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Re-send mail notification for existing application. - * Message of specified type is sent only, when application is in expected state related to the notification. Note, that some data related to processing application are not available (e.g. list of exceptions during approval), since this method doesn\'t perform any action with Application itself. Perun admin can send any notification except USER_INVITE type, see #sendInvitation() for this. - * @param inputSendMessage - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public sendMessage(inputSendMessage: InputSendMessage, observe?: 'body', reportProgress?: boolean): Observable; - public sendMessage(inputSendMessage: InputSendMessage, observe?: 'response', reportProgress?: boolean): Observable>; - public sendMessage(inputSendMessage: InputSendMessage, observe?: 'events', reportProgress?: boolean): Observable>; - public sendMessage(inputSendMessage: InputSendMessage, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSendMessage === null || inputSendMessage === undefined) { - throw new Error('Required parameter inputSendMessage was null or undefined when calling sendMessage.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/registrarManager/sendMessage`, - inputSendMessage, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Enable or disable sending for list of mail definitions. - * @param inputSetSendingEnabled - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setSendingEnabled(inputSetSendingEnabled: InputSetSendingEnabled, observe?: 'body', reportProgress?: boolean): Observable; - public setSendingEnabled(inputSetSendingEnabled: InputSetSendingEnabled, observe?: 'response', reportProgress?: boolean): Observable>; - public setSendingEnabled(inputSetSendingEnabled: InputSetSendingEnabled, observe?: 'events', reportProgress?: boolean): Observable>; - public setSendingEnabled(inputSetSendingEnabled: InputSetSendingEnabled, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetSendingEnabled === null || inputSetSendingEnabled === undefined) { - throw new Error('Required parameter inputSetSendingEnabled was null or undefined when calling setSendingEnabled.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/registrarManager/setSendingEnabled`, - inputSetSendingEnabled, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Creates a new application and if succeeds, trigger validation and approval. The method triggers approval for VOs with auto-approved applications. - * @param inputSubmitApplication - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public submitApplication(inputSubmitApplication: InputSubmitApplication, observe?: 'body', reportProgress?: boolean): Observable; - public submitApplication(inputSubmitApplication: InputSubmitApplication, observe?: 'response', reportProgress?: boolean): Observable>; - public submitApplication(inputSubmitApplication: InputSubmitApplication, observe?: 'events', reportProgress?: boolean): Observable>; - public submitApplication(inputSubmitApplication: InputSubmitApplication, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSubmitApplication === null || inputSubmitApplication === undefined) { - throw new Error('Required parameter inputSubmitApplication was null or undefined when calling submitApplication.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/registrarManager/submitApplication`, - inputSubmitApplication, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Updates an e-mail notification. - * @param inputUpdateApplicationMail - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateApplicationMail(inputUpdateApplicationMail: InputUpdateApplicationMail, observe?: 'body', reportProgress?: boolean): Observable; - public updateApplicationMail(inputUpdateApplicationMail: InputUpdateApplicationMail, observe?: 'response', reportProgress?: boolean): Observable>; - public updateApplicationMail(inputUpdateApplicationMail: InputUpdateApplicationMail, observe?: 'events', reportProgress?: boolean): Observable>; - public updateApplicationMail(inputUpdateApplicationMail: InputUpdateApplicationMail, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputUpdateApplicationMail === null || inputUpdateApplicationMail === undefined) { - throw new Error('Required parameter inputUpdateApplicationMail was null or undefined when calling updateApplicationMail.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/registrarManager/updateApplicationMail`, - inputUpdateApplicationMail, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Updates the form attributes, not the form items. - * @param inputUpdateForm - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateForm(inputUpdateForm: InputUpdateForm, observe?: 'body', reportProgress?: boolean): Observable; - public updateForm(inputUpdateForm: InputUpdateForm, observe?: 'response', reportProgress?: boolean): Observable>; - public updateForm(inputUpdateForm: InputUpdateForm, observe?: 'events', reportProgress?: boolean): Observable>; - public updateForm(inputUpdateForm: InputUpdateForm, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputUpdateForm === null || inputUpdateForm === undefined) { - throw new Error('Required parameter inputUpdateForm was null or undefined when calling updateForm.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/registrarManager/updateForm`, - inputUpdateForm, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Update application form item data value, which was originally submitted by the User. - * @param inputFormItemData - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateFormItemData(inputFormItemData: InputFormItemData, observe?: 'body', reportProgress?: boolean): Observable; - public updateFormItemData(inputFormItemData: InputFormItemData, observe?: 'response', reportProgress?: boolean): Observable>; - public updateFormItemData(inputFormItemData: InputFormItemData, observe?: 'events', reportProgress?: boolean): Observable>; - public updateFormItemData(inputFormItemData: InputFormItemData, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputFormItemData === null || inputFormItemData === undefined) { - throw new Error('Required parameter inputFormItemData was null or undefined when calling updateFormItemData.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/registrarManager/updateFormItemData`, - inputFormItemData, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Update application form items data, which was originally submitted by the User. - * @param inputFormItemData1 - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateFormItemsData(inputFormItemData1: InputFormItemData1, observe?: 'body', reportProgress?: boolean): Observable; - public updateFormItemsData(inputFormItemData1: InputFormItemData1, observe?: 'response', reportProgress?: boolean): Observable>; - public updateFormItemsData(inputFormItemData1: InputFormItemData1, observe?: 'events', reportProgress?: boolean): Observable>; - public updateFormItemsData(inputFormItemData1: InputFormItemData1, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputFormItemData1 === null || inputFormItemData1 === undefined) { - throw new Error('Required parameter inputFormItemData1 was null or undefined when calling updateFormItemsData.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/registrarManager/updateFormItemsData`, - inputFormItemData1, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Updates form items sent in list. - * @param inputUpdateFormItemsForGroup - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateFormItemsForGroup(inputUpdateFormItemsForGroup: InputUpdateFormItemsForGroup, observe?: 'body', reportProgress?: boolean): Observable; - public updateFormItemsForGroup(inputUpdateFormItemsForGroup: InputUpdateFormItemsForGroup, observe?: 'response', reportProgress?: boolean): Observable>; - public updateFormItemsForGroup(inputUpdateFormItemsForGroup: InputUpdateFormItemsForGroup, observe?: 'events', reportProgress?: boolean): Observable>; - public updateFormItemsForGroup(inputUpdateFormItemsForGroup: InputUpdateFormItemsForGroup, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputUpdateFormItemsForGroup === null || inputUpdateFormItemsForGroup === undefined) { - throw new Error('Required parameter inputUpdateFormItemsForGroup was null or undefined when calling updateFormItemsForGroup.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/registrarManager/updateFormItems/group`, - inputUpdateFormItemsForGroup, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Updates form items sent in list. - * @param inputUpdateFormItemsForVo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateFormItemsForVo(inputUpdateFormItemsForVo: InputUpdateFormItemsForVo, observe?: 'body', reportProgress?: boolean): Observable; - public updateFormItemsForVo(inputUpdateFormItemsForVo: InputUpdateFormItemsForVo, observe?: 'response', reportProgress?: boolean): Observable>; - public updateFormItemsForVo(inputUpdateFormItemsForVo: InputUpdateFormItemsForVo, observe?: 'events', reportProgress?: boolean): Observable>; - public updateFormItemsForVo(inputUpdateFormItemsForVo: InputUpdateFormItemsForVo, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputUpdateFormItemsForVo === null || inputUpdateFormItemsForVo === undefined) { - throw new Error('Required parameter inputUpdateFormItemsForVo was null or undefined when calling updateFormItemsForVo.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/registrarManager/updateFormItems/vo`, - inputUpdateFormItemsForVo, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Forcefully marks application as verified (only when application was in NEW state). - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public verifyApplication(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public verifyApplication(id: number, observe?: 'response', reportProgress?: boolean): Observable>; - public verifyApplication(id: number, observe?: 'events', reportProgress?: boolean): Observable>; - public verifyApplication(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling verifyApplication.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/registrarManager/verifyApplication`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/registrarManager/copyMails/voToGroup`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Copy all e-mail notifications from selected VO into another. + * @param fromVo source VO + * @param toVo destination VO + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyMailsFromVoToVo( + fromVo?: number, + toVo?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public copyMailsFromVoToVo( + fromVo?: number, + toVo?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public copyMailsFromVoToVo( + fromVo?: number, + toVo?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public copyMailsFromVoToVo( + fromVo?: number, + toVo?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (fromVo !== undefined && fromVo !== null) { + queryParameters = queryParameters.set('fromVo', fromVo); + } + if (toVo !== undefined && toVo !== null) { + queryParameters = queryParameters.set('toVo', toVo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/registrarManager/copyMails/voToVo`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Create application form for a group. + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createApplicationFormInGroup( + group: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public createApplicationFormInGroup( + group: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public createApplicationFormInGroup( + group: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public createApplicationFormInGroup( + group: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling createApplicationFormInGroup.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/registrarManager/createApplicationForm/group`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Create application form for a VO. + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createApplicationFormInVo( + vo: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public createApplicationFormInVo( + vo: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public createApplicationFormInVo( + vo: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public createApplicationFormInVo( + vo: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling createApplicationFormInVo.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/registrarManager/createApplicationForm/vo`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Deletes an application. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteApplication(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public deleteApplication( + id: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public deleteApplication( + id: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public deleteApplication( + id: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (id === null || id === undefined) { + throw new Error( + 'Required parameter id was null or undefined when calling deleteApplication.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/registrarManager/deleteApplication`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Deletes an e-mail notification from DB based on id property. + * @param group id of Group + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteApplicationMailForGroup( + group: number, + id: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public deleteApplicationMailForGroup( + group: number, + id: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public deleteApplicationMailForGroup( + group: number, + id: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public deleteApplicationMailForGroup( + group: number, + id: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling deleteApplicationMailForGroup.' + ); + } + if (id === null || id === undefined) { + throw new Error( + 'Required parameter id was null or undefined when calling deleteApplicationMailForGroup.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/registrarManager/deleteApplicationMail/g`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Deletes an e-mail notification from DB based on id property. + * @param vo id of Vo + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteApplicationMailForVo( + vo: number, + id: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public deleteApplicationMailForVo( + vo: number, + id: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public deleteApplicationMailForVo( + vo: number, + id: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public deleteApplicationMailForVo( + vo: number, + id: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling deleteApplicationMailForVo.' + ); + } + if (id === null || id === undefined) { + throw new Error( + 'Required parameter id was null or undefined when calling deleteApplicationMailForVo.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/registrarManager/deleteApplicationMail/v`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Deletes groups from a list of groups which can be registered into during vo registration. + * @param groups list of Group ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteGroupsFromAutoRegistration( + groups: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public deleteGroupsFromAutoRegistration( + groups: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public deleteGroupsFromAutoRegistration( + groups: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public deleteGroupsFromAutoRegistration( + groups: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (groups === null || groups === undefined) { + throw new Error( + 'Required parameter groups was null or undefined when calling deleteGroupsFromAutoRegistration.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (groups) { + groups.forEach((element) => { + queryParameters = queryParameters.append('groups[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/registrarManager/deleteGroupsFromAutoRegistration`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns application object by its id. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getApplicationById( + id: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getApplicationById( + id: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getApplicationById( + id: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getApplicationById( + id: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (id === null || id === undefined) { + throw new Error( + 'Required parameter id was null or undefined when calling getApplicationById.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/registrarManager/getApplicationById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns data submitted by user in given application (by id). + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getApplicationDataById( + id: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getApplicationDataById( + id: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getApplicationDataById( + id: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getApplicationDataById( + id: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (id === null || id === undefined) { + throw new Error( + 'Required parameter id was null or undefined when calling getApplicationDataById.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/registrarManager/getApplicationDataById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns all mail notifications related to specific app form. + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getApplicationMailsForGroup( + group: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getApplicationMailsForGroup( + group: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getApplicationMailsForGroup( + group: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getApplicationMailsForGroup( + group: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getApplicationMailsForGroup.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/registrarManager/getApplicationMails/g`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns all mail notifications related to specific app form. + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getApplicationMailsForVo( + vo: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getApplicationMailsForVo( + vo: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getApplicationMailsForVo( + vo: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getApplicationMailsForVo( + vo: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling getApplicationMailsForVo.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/registrarManager/getApplicationMails/v`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets all applications for a given Group. + * @param group id of Group + * @param state list of states: NEW, VERIFIED, APPROVED, REJECTED + * @param dateFrom return with the same date or applications newer than this date + * @param dateTo return applications with the same date or older than this date + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getApplicationsForGroup( + group: number, + state?: Array, + dateFrom?: string, + dateTo?: string, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getApplicationsForGroup( + group: number, + state?: Array, + dateFrom?: string, + dateTo?: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getApplicationsForGroup( + group: number, + state?: Array, + dateFrom?: string, + dateTo?: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getApplicationsForGroup( + group: number, + state?: Array, + dateFrom?: string, + dateTo?: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getApplicationsForGroup.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (state) { + state.forEach((element) => { + queryParameters = queryParameters.append('state[]', element); + }); + } + if (dateFrom !== undefined && dateFrom !== null) { + queryParameters = queryParameters.set('dateFrom', dateFrom); + } + if (dateTo !== undefined && dateTo !== null) { + queryParameters = queryParameters.set('dateTo', dateTo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/registrarManager/getApplicationsForGroup`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets all aplications for a given Member. + * @param member id of Member + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getApplicationsForMember( + member: number, + group?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getApplicationsForMember( + member: number, + group?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getApplicationsForMember( + member: number, + group?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getApplicationsForMember( + member: number, + group?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getApplicationsForMember.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/registrarManager/getApplicationsForMember`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets all applications for a given VO. + * @param vo id of Vo + * @param state list of states: NEW, VERIFIED, APPROVED, REJECTED + * @param dateFrom return applications with the same date or newer than this date + * @param dateTo return applications with the same date or older than this date + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getApplicationsForVo( + vo: number, + state?: Array, + dateFrom?: string, + dateTo?: string, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getApplicationsForVo( + vo: number, + state?: Array, + dateFrom?: string, + dateTo?: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getApplicationsForVo( + vo: number, + state?: Array, + dateFrom?: string, + dateTo?: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getApplicationsForVo( + vo: number, + state?: Array, + dateFrom?: string, + dateTo?: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling getApplicationsForVo.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (state) { + state.forEach((element) => { + queryParameters = queryParameters.append('state[]', element); + }); + } + if (dateFrom !== undefined && dateFrom !== null) { + queryParameters = queryParameters.set('dateFrom', dateFrom); + } + if (dateTo !== undefined && dateTo !== null) { + queryParameters = queryParameters.set('dateTo', dateTo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/registrarManager/getApplicationsForVo`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get page of applications from the given vo, based on the query attributes. + * @param inputGetPaginatedApplications + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getApplicationsPage( + inputGetPaginatedApplications: InputGetPaginatedApplications, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getApplicationsPage( + inputGetPaginatedApplications: InputGetPaginatedApplications, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getApplicationsPage( + inputGetPaginatedApplications: InputGetPaginatedApplications, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getApplicationsPage( + inputGetPaginatedApplications: InputGetPaginatedApplications, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputGetPaginatedApplications === null || inputGetPaginatedApplications === undefined) { + throw new Error( + 'Required parameter inputGetPaginatedApplications was null or undefined when calling getApplicationsPage.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/registrarManager/getApplicationsPage`, + inputGetPaginatedApplications, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get time-limited token proving user identity in external source (for now 3 minutes). + * It can be used to join user identity with another by calling consolidateIdentityUsingToken() method and passing the token. Please note, that different authz (identity) must be used to perform both calls. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getConsolidatorToken(observe?: 'body', reportProgress?: boolean): Observable; + public getConsolidatorToken( + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getConsolidatorToken( + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getConsolidatorToken( + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/registrarManager/getConsolidatorToken`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets all items in Group application form. + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFormItemsForGroup( + group: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getFormItemsForGroup( + group: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getFormItemsForGroup( + group: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getFormItemsForGroup( + group: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getFormItemsForGroup.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/registrarManager/getFormItems/group`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets items of specified type in Group application form, for initital registration or extension of account. + * @param group id of Group + * @param type application type: INITIAL, EXTENSION or EMBEDDED + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFormItemsForGroupWithType( + group: number, + type?: string, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getFormItemsForGroupWithType( + group: number, + type?: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getFormItemsForGroupWithType( + group: number, + type?: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getFormItemsForGroupWithType( + group: number, + type?: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getFormItemsForGroupWithType.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (type !== undefined && type !== null) { + queryParameters = queryParameters.set('type', type); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/registrarManager/getFormItems/group-type`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets all items in VO application form. + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFormItemsForVo( + vo: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getFormItemsForVo( + vo: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getFormItemsForVo( + vo: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getFormItemsForVo( + vo: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling getFormItemsForVo.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/registrarManager/getFormItems/vo`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets items of specified type in VO application form, for initital registration or extension of account. + * @param vo id of Vo + * @param type application type: INITIAL or EXTENSION + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFormItemsForVoWithType( + vo: number, + type?: string, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getFormItemsForVoWithType( + vo: number, + type?: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getFormItemsForVoWithType( + vo: number, + type?: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getFormItemsForVoWithType( + vo: number, + type?: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling getFormItemsForVoWithType.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (type !== undefined && type !== null) { + queryParameters = queryParameters.set('type', type); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/registrarManager/getFormItems/vo-type`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets an application form for a given Group. + * There is exactly one form for membership per Group, one form is used for both initial registration and annual account expansion, just the form items are marked whether the should be present in one, the other, or both types of application. + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupApplicationForm( + group: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getGroupApplicationForm( + group: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getGroupApplicationForm( + group: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getGroupApplicationForm( + group: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getGroupApplicationForm.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/registrarManager/getApplicationForm/group`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns all groups which can be registered into during vo registration. + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupsToAutoRegistration( + vo: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getGroupsToAutoRegistration( + vo: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getGroupsToAutoRegistration( + vo: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getGroupsToAutoRegistration( + vo: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling getGroupsToAutoRegistration.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/registrarManager/getGroupsToAutoRegistration`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets an application form for a given VO. + * There is exactly one form for membership per VO, one form is used for both initial registration and annual account expansion, just the form items are marked whether the should be present in one, the other, or both types of application. + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVoApplicationForm( + vo: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getVoApplicationForm( + vo: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getVoApplicationForm( + vo: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getVoApplicationForm( + vo: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling getVoApplicationForm.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/registrarManager/getApplicationForm/vo`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Manually rejects an application. + * Expected to be called as a result of direct VO administrator action in the web UI. + * @param id numeric id + * @param reason description of reason + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public rejectApplication( + id: number, + reason?: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public rejectApplication( + id: number, + reason?: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public rejectApplication( + id: number, + reason?: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public rejectApplication( + id: number, + reason?: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (id === null || id === undefined) { + throw new Error( + 'Required parameter id was null or undefined when calling rejectApplication.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + if (reason !== undefined && reason !== null) { + queryParameters = queryParameters.set('reason', reason); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/registrarManager/rejectApplication`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Sends invitation email to user which is not member of VO + * @param email email address to send invitation to + * @param language preferred language to use + * @param voId id of VO to send invitation into + * @param name name of person used in invitation email (optional) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public sendInvitation( + email: string, + language: string, + voId?: number, + name?: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public sendInvitation( + email: string, + language: string, + voId?: number, + name?: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public sendInvitation( + email: string, + language: string, + voId?: number, + name?: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public sendInvitation( + email: string, + language: string, + voId?: number, + name?: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (email === null || email === undefined) { + throw new Error( + 'Required parameter email was null or undefined when calling sendInvitation.' + ); + } + if (language === null || language === undefined) { + throw new Error( + 'Required parameter language was null or undefined when calling sendInvitation.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (voId !== undefined && voId !== null) { + queryParameters = queryParameters.set('voId', voId); + } + if (name !== undefined && name !== null) { + queryParameters = queryParameters.set('name', name); + } + if (email !== undefined && email !== null) { + queryParameters = queryParameters.set('email', email); + } + if (language !== undefined && language !== null) { + queryParameters = queryParameters.set('language', language); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/registrarManager/sendInvitation`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Sends invitation email to user which is not member of VO and Group + * Invitation link targets VO application form fist, after submission, Group application form is displayed. + * @param email email address to send invitation to + * @param language preferred language to use + * @param voId id of VO to send invitation into + * @param groupId id of Group to send invitation into + * @param name name of person used in invitation email (optional) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public sendInvitationForGroup( + email: string, + language: string, + voId?: number, + groupId?: number, + name?: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public sendInvitationForGroup( + email: string, + language: string, + voId?: number, + groupId?: number, + name?: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public sendInvitationForGroup( + email: string, + language: string, + voId?: number, + groupId?: number, + name?: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public sendInvitationForGroup( + email: string, + language: string, + voId?: number, + groupId?: number, + name?: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (email === null || email === undefined) { + throw new Error( + 'Required parameter email was null or undefined when calling sendInvitationForGroup.' + ); + } + if (language === null || language === undefined) { + throw new Error( + 'Required parameter language was null or undefined when calling sendInvitationForGroup.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (voId !== undefined && voId !== null) { + queryParameters = queryParameters.set('voId', voId); + } + if (groupId !== undefined && groupId !== null) { + queryParameters = queryParameters.set('groupId', groupId); + } + if (name !== undefined && name !== null) { + queryParameters = queryParameters.set('name', name); + } + if (email !== undefined && email !== null) { + queryParameters = queryParameters.set('email', email); + } + if (language !== undefined && language !== null) { + queryParameters = queryParameters.set('language', language); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/registrarManager/sendInvitation/g`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Sends invitation email to user which is not member of Group + * @param userId id of user to send invitation to + * @param voId id of VO to send invitation into + * @param groupId id of Group to send invitation into + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public sendInvitationGroupToExistingUser( + userId?: number, + voId?: number, + groupId?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public sendInvitationGroupToExistingUser( + userId?: number, + voId?: number, + groupId?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public sendInvitationGroupToExistingUser( + userId?: number, + voId?: number, + groupId?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public sendInvitationGroupToExistingUser( + userId?: number, + voId?: number, + groupId?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (userId !== undefined && userId !== null) { + queryParameters = queryParameters.set('userId', userId); + } + if (voId !== undefined && voId !== null) { + queryParameters = queryParameters.set('voId', voId); + } + if (groupId !== undefined && groupId !== null) { + queryParameters = queryParameters.set('groupId', groupId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/registrarManager/sendInvitation/u-g`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Sends invitation email to user which is not member of VO + * @param userId id of user to send invitation to + * @param voId id of VO to send invitation into + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public sendInvitationToExistingUser( + userId?: number, + voId?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public sendInvitationToExistingUser( + userId?: number, + voId?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public sendInvitationToExistingUser( + userId?: number, + voId?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public sendInvitationToExistingUser( + userId?: number, + voId?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (userId !== undefined && userId !== null) { + queryParameters = queryParameters.set('userId', userId); + } + if (voId !== undefined && voId !== null) { + queryParameters = queryParameters.set('voId', voId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/registrarManager/sendInvitation/u`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Re-send mail notification for existing application. + * Message of specified type is sent only, when application is in expected state related to the notification. Note, that some data related to processing application are not available (e.g. list of exceptions during approval), since this method doesn\'t perform any action with Application itself. Perun admin can send any notification except USER_INVITE type, see #sendInvitation() for this. + * @param inputSendMessage + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public sendMessage( + inputSendMessage: InputSendMessage, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public sendMessage( + inputSendMessage: InputSendMessage, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public sendMessage( + inputSendMessage: InputSendMessage, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public sendMessage( + inputSendMessage: InputSendMessage, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputSendMessage === null || inputSendMessage === undefined) { + throw new Error( + 'Required parameter inputSendMessage was null or undefined when calling sendMessage.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/registrarManager/sendMessage`, + inputSendMessage, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Enable or disable sending for list of mail definitions. + * @param inputSetSendingEnabled + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setSendingEnabled( + inputSetSendingEnabled: InputSetSendingEnabled, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setSendingEnabled( + inputSetSendingEnabled: InputSetSendingEnabled, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setSendingEnabled( + inputSetSendingEnabled: InputSetSendingEnabled, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setSendingEnabled( + inputSetSendingEnabled: InputSetSendingEnabled, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputSetSendingEnabled === null || inputSetSendingEnabled === undefined) { + throw new Error( + 'Required parameter inputSetSendingEnabled was null or undefined when calling setSendingEnabled.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/registrarManager/setSendingEnabled`, + inputSetSendingEnabled, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Creates a new application and if succeeds, trigger validation and approval. The method triggers approval for VOs with auto-approved applications. + * @param inputSubmitApplication + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public submitApplication( + inputSubmitApplication: InputSubmitApplication, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public submitApplication( + inputSubmitApplication: InputSubmitApplication, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public submitApplication( + inputSubmitApplication: InputSubmitApplication, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public submitApplication( + inputSubmitApplication: InputSubmitApplication, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputSubmitApplication === null || inputSubmitApplication === undefined) { + throw new Error( + 'Required parameter inputSubmitApplication was null or undefined when calling submitApplication.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/registrarManager/submitApplication`, + inputSubmitApplication, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Updates an e-mail notification. + * @param inputUpdateApplicationMail + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateApplicationMail( + inputUpdateApplicationMail: InputUpdateApplicationMail, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public updateApplicationMail( + inputUpdateApplicationMail: InputUpdateApplicationMail, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public updateApplicationMail( + inputUpdateApplicationMail: InputUpdateApplicationMail, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public updateApplicationMail( + inputUpdateApplicationMail: InputUpdateApplicationMail, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputUpdateApplicationMail === null || inputUpdateApplicationMail === undefined) { + throw new Error( + 'Required parameter inputUpdateApplicationMail was null or undefined when calling updateApplicationMail.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/registrarManager/updateApplicationMail`, + inputUpdateApplicationMail, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Updates the form attributes, not the form items. + * @param inputUpdateForm + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateForm( + inputUpdateForm: InputUpdateForm, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public updateForm( + inputUpdateForm: InputUpdateForm, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public updateForm( + inputUpdateForm: InputUpdateForm, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public updateForm( + inputUpdateForm: InputUpdateForm, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputUpdateForm === null || inputUpdateForm === undefined) { + throw new Error( + 'Required parameter inputUpdateForm was null or undefined when calling updateForm.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/registrarManager/updateForm`, + inputUpdateForm, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Update application form item data value, which was originally submitted by the User. + * @param inputFormItemData + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateFormItemData( + inputFormItemData: InputFormItemData, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public updateFormItemData( + inputFormItemData: InputFormItemData, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public updateFormItemData( + inputFormItemData: InputFormItemData, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public updateFormItemData( + inputFormItemData: InputFormItemData, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputFormItemData === null || inputFormItemData === undefined) { + throw new Error( + 'Required parameter inputFormItemData was null or undefined when calling updateFormItemData.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/registrarManager/updateFormItemData`, + inputFormItemData, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Update application form items data, which was originally submitted by the User. + * @param inputFormItemData1 + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateFormItemsData( + inputFormItemData1: InputFormItemData1, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public updateFormItemsData( + inputFormItemData1: InputFormItemData1, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public updateFormItemsData( + inputFormItemData1: InputFormItemData1, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public updateFormItemsData( + inputFormItemData1: InputFormItemData1, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputFormItemData1 === null || inputFormItemData1 === undefined) { + throw new Error( + 'Required parameter inputFormItemData1 was null or undefined when calling updateFormItemsData.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/registrarManager/updateFormItemsData`, + inputFormItemData1, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Updates form items sent in list. + * @param inputUpdateFormItemsForGroup + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateFormItemsForGroup( + inputUpdateFormItemsForGroup: InputUpdateFormItemsForGroup, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public updateFormItemsForGroup( + inputUpdateFormItemsForGroup: InputUpdateFormItemsForGroup, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public updateFormItemsForGroup( + inputUpdateFormItemsForGroup: InputUpdateFormItemsForGroup, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public updateFormItemsForGroup( + inputUpdateFormItemsForGroup: InputUpdateFormItemsForGroup, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputUpdateFormItemsForGroup === null || inputUpdateFormItemsForGroup === undefined) { + throw new Error( + 'Required parameter inputUpdateFormItemsForGroup was null or undefined when calling updateFormItemsForGroup.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/registrarManager/updateFormItems/group`, + inputUpdateFormItemsForGroup, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Updates form items sent in list. + * @param inputUpdateFormItemsForVo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateFormItemsForVo( + inputUpdateFormItemsForVo: InputUpdateFormItemsForVo, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public updateFormItemsForVo( + inputUpdateFormItemsForVo: InputUpdateFormItemsForVo, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public updateFormItemsForVo( + inputUpdateFormItemsForVo: InputUpdateFormItemsForVo, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public updateFormItemsForVo( + inputUpdateFormItemsForVo: InputUpdateFormItemsForVo, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputUpdateFormItemsForVo === null || inputUpdateFormItemsForVo === undefined) { + throw new Error( + 'Required parameter inputUpdateFormItemsForVo was null or undefined when calling updateFormItemsForVo.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/registrarManager/updateFormItems/vo`, + inputUpdateFormItemsForVo, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Forcefully marks application as verified (only when application was in NEW state). + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public verifyApplication( + id: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public verifyApplication( + id: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public verifyApplication( + id: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public verifyApplication( + id: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (id === null || id === undefined) { + throw new Error( + 'Required parameter id was null or undefined when calling verifyApplication.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); } + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/registrarManager/verifyApplication`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } } diff --git a/libs/perun/openapi/src/lib/api/resourcesManager.service.ts b/libs/perun/openapi/src/lib/api/resourcesManager.service.ts index f5bb955df..b2747587f 100644 --- a/libs/perun/openapi/src/lib/api/resourcesManager.service.ts +++ b/libs/perun/openapi/src/lib/api/resourcesManager.service.ts @@ -11,11 +11,17 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { AssignedGroup } from '../model/assignedGroup'; import { AssignedMember } from '../model/assignedMember'; @@ -45,5422 +51,7492 @@ import { Service } from '../model/service'; import { User } from '../model/user'; import { Vo } from '../model/vo'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - - +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class ResourcesManagerService { + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string, + @Optional() configuration: Configuration + ) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + /** + * Try to activate the group-resource status. If the async is set to false, the validation is performed synchronously. The assignment will be either ACTIVE, in case of a sucessfull synchronous call, or it will be PROCESSING in case of an asynchronous call. After the async validation, the state can be either ACTIVE or FAILED. + * @param group id of Group + * @param resource id of Resource + * @param async asynchronous flag, if set to true, some operation will be performed asynchronously + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public activateGroupResourceAssignment( + group: number, + resource: number, + async?: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public activateGroupResourceAssignment( + group: number, + resource: number, + async?: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public activateGroupResourceAssignment( + group: number, + resource: number, + async?: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public activateGroupResourceAssignment( + group: number, + resource: number, + async?: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling activateGroupResourceAssignment.' + ); + } + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling activateGroupResourceAssignment.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (async !== undefined && async !== null) { + queryParameters = queryParameters.set('async', async); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/resourcesManager/activateGroupResourceAssignment`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Adds a group administrator to the Resource. + * @param resource id of Resource + * @param authorizedGroup Group id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addAdminToGroup( + resource: number, + authorizedGroup: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public addAdminToGroup( + resource: number, + authorizedGroup: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public addAdminToGroup( + resource: number, + authorizedGroup: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public addAdminToGroup( + resource: number, + authorizedGroup: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling addAdminToGroup.' + ); + } + if (authorizedGroup === null || authorizedGroup === undefined) { + throw new Error( + 'Required parameter authorizedGroup was null or undefined when calling addAdminToGroup.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (authorizedGroup !== undefined && authorizedGroup !== null) { + queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/resourcesManager/addAdmin/r-g`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Adds a Resource admin. + * @param resource id of Resource + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addAdminToUser( + resource: number, + user: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public addAdminToUser( + resource: number, + user: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public addAdminToUser( + resource: number, + user: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public addAdminToUser( + resource: number, + user: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling addAdminToUser.' + ); + } + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling addAdminToUser.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/resourcesManager/addAdmin/r-u`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Sets ResourceSelfService role to given group for given resource. + * @param resource id of Resource + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addResourceSelfServiceGroup( + resource: number, + group: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public addResourceSelfServiceGroup( + resource: number, + group: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public addResourceSelfServiceGroup( + resource: number, + group: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public addResourceSelfServiceGroup( + resource: number, + group: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling addResourceSelfServiceGroup.' + ); + } + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling addResourceSelfServiceGroup.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/resourcesManager/addResourceSelfServiceGroup`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Sets ResourceSelfService role to given user for given resource. + * @param resource id of Resource + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addResourceSelfServiceUser( + resource: number, + user: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public addResourceSelfServiceUser( + resource: number, + user: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public addResourceSelfServiceUser( + resource: number, + user: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public addResourceSelfServiceUser( + resource: number, + user: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling addResourceSelfServiceUser.' + ); + } + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling addResourceSelfServiceUser.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/resourcesManager/addResourceSelfServiceUser`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Assigns given groups to all of the given resources. If async is set to false, check if attributes for each member from groups are valid and fill members\' attributes with missing values. + * @param groups list of Group ids List<Integer> + * @param resources list of Resource ids List<Integer> + * @param async asynchronous flag, if set to true, some operation will be performed asynchronously + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public allowGroupsToResources( + groups: Array, + resources: Array, + async?: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public allowGroupsToResources( + groups: Array, + resources: Array, + async?: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public allowGroupsToResources( + groups: Array, + resources: Array, + async?: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public allowGroupsToResources( + groups: Array, + resources: Array, + async?: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (groups === null || groups === undefined) { + throw new Error( + 'Required parameter groups was null or undefined when calling allowGroupsToResources.' + ); + } + if (resources === null || resources === undefined) { + throw new Error( + 'Required parameter resources was null or undefined when calling allowGroupsToResources.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (groups) { + groups.forEach((element) => { + queryParameters = queryParameters.append('groups[]', element); + }); + } + if (resources) { + resources.forEach((element) => { + queryParameters = queryParameters.append('resources[]', element); + }); + } + if (async !== undefined && async !== null) { + queryParameters = queryParameters.set('async', async); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/resourcesManager/allowGroupsToResources`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Assigns a group to a resource. Check if attributes for each member from group are valid. Fill members\' attributes with missing value. Work in sync/async mode. Provide options for creating inactive or automatic subgroups group-resource assignments. + * @param group id of Group + * @param resource id of Resource + * @param async asynchronous flag, if set to true, some operation will be performed asynchronously + * @param assignInactive flag, if set to true, group-resource assignment will have status INACTIVE + * @param autoAssignSubgroups flag, if set to true, subgroups are assigned to resource as well + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public assignGroupToResource( + group: number, + resource: number, + async?: boolean, + assignInactive?: boolean, + autoAssignSubgroups?: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public assignGroupToResource( + group: number, + resource: number, + async?: boolean, + assignInactive?: boolean, + autoAssignSubgroups?: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public assignGroupToResource( + group: number, + resource: number, + async?: boolean, + assignInactive?: boolean, + autoAssignSubgroups?: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public assignGroupToResource( + group: number, + resource: number, + async?: boolean, + assignInactive?: boolean, + autoAssignSubgroups?: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling assignGroupToResource.' + ); + } + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling assignGroupToResource.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (async !== undefined && async !== null) { + queryParameters = queryParameters.set('async', async); + } + if (assignInactive !== undefined && assignInactive !== null) { + queryParameters = queryParameters.set('assignInactive', assignInactive); + } + if (autoAssignSubgroups !== undefined && autoAssignSubgroups !== null) { + queryParameters = queryParameters.set('autoAssignSubgroups', autoAssignSubgroups); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/resourcesManager/assignGroupToResource`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Assigns a group to resources. Check if attributes for each member from group are valid. Fill members\' attributes with missing values. Work in sync/async mode. Provide options for creating inactive or automatic subgroups group-resource assignments. + * @param group id of Group + * @param resources list of Resource ids List<Integer> + * @param async asynchronous flag, if set to true, some operation will be performed asynchronously + * @param assignInactive flag, if set to true, group-resource assignment will have status INACTIVE + * @param autoAssignSubgroups flag, if set to true, subgroups are assigned to resource as well + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public assignGroupToResources( + group: number, + resources: Array, + async?: boolean, + assignInactive?: boolean, + autoAssignSubgroups?: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public assignGroupToResources( + group: number, + resources: Array, + async?: boolean, + assignInactive?: boolean, + autoAssignSubgroups?: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public assignGroupToResources( + group: number, + resources: Array, + async?: boolean, + assignInactive?: boolean, + autoAssignSubgroups?: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public assignGroupToResources( + group: number, + resources: Array, + async?: boolean, + assignInactive?: boolean, + autoAssignSubgroups?: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling assignGroupToResources.' + ); + } + if (resources === null || resources === undefined) { + throw new Error( + 'Required parameter resources was null or undefined when calling assignGroupToResources.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (resources) { + resources.forEach((element) => { + queryParameters = queryParameters.append('resources[]', element); + }); + } + if (async !== undefined && async !== null) { + queryParameters = queryParameters.set('async', async); + } + if (assignInactive !== undefined && assignInactive !== null) { + queryParameters = queryParameters.set('assignInactive', assignInactive); + } + if (autoAssignSubgroups !== undefined && autoAssignSubgroups !== null) { + queryParameters = queryParameters.set('autoAssignSubgroups', autoAssignSubgroups); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/resourcesManager/assignGroupToResources`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Assigns groups to a resource. Check if attributes for each member from groups are valid. Fill members\' attributes with missing values. Work in sync/async mode. Provide options for creating inactive or automatic subgroups group-resource assignments. + * @param groups list of Group ids List<Integer> + * @param resource id of Resource + * @param async asynchronous flag, if set to true, some operation will be performed asynchronously + * @param assignInactive flag, if set to true, group-resource assignment will have status INACTIVE + * @param autoAssignSubgroups flag, if set to true, subgroups are assigned to resource as well + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public assignGroupsToResource( + groups: Array, + resource: number, + async?: boolean, + assignInactive?: boolean, + autoAssignSubgroups?: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public assignGroupsToResource( + groups: Array, + resource: number, + async?: boolean, + assignInactive?: boolean, + autoAssignSubgroups?: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public assignGroupsToResource( + groups: Array, + resource: number, + async?: boolean, + assignInactive?: boolean, + autoAssignSubgroups?: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public assignGroupsToResource( + groups: Array, + resource: number, + async?: boolean, + assignInactive?: boolean, + autoAssignSubgroups?: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (groups === null || groups === undefined) { + throw new Error( + 'Required parameter groups was null or undefined when calling assignGroupsToResource.' + ); + } + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling assignGroupsToResource.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (groups) { + groups.forEach((element) => { + queryParameters = queryParameters.append('groups[]', element); + }); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (async !== undefined && async !== null) { + queryParameters = queryParameters.set('async', async); + } + if (assignInactive !== undefined && assignInactive !== null) { + queryParameters = queryParameters.set('assignInactive', assignInactive); + } + if (autoAssignSubgroups !== undefined && autoAssignSubgroups !== null) { + queryParameters = queryParameters.set('autoAssignSubgroups', autoAssignSubgroups); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/resourcesManager/assignGroupsToResource`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Assigns ResourceRag to resource. The ResourceTag must contain its id, voId and tagName. + * @param inputAssignResourceTagToResource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public assignResourceTagToResource( + inputAssignResourceTagToResource: InputAssignResourceTagToResource, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public assignResourceTagToResource( + inputAssignResourceTagToResource: InputAssignResourceTagToResource, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public assignResourceTagToResource( + inputAssignResourceTagToResource: InputAssignResourceTagToResource, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public assignResourceTagToResource( + inputAssignResourceTagToResource: InputAssignResourceTagToResource, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if ( + inputAssignResourceTagToResource === null || + inputAssignResourceTagToResource === undefined + ) { + throw new Error( + 'Required parameter inputAssignResourceTagToResource was null or undefined when calling assignResourceTagToResource.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/resourcesManager/assignResourceTagToResource`, + inputAssignResourceTagToResource, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Assigns service to resource. + * @param resource id of Resource + * @param service id of Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public assignService( + resource: number, + service: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public assignService( + resource: number, + service: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public assignService( + resource: number, + service: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public assignService( + resource: number, + service: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling assignService.' + ); + } + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling assignService.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/resourcesManager/assignService`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Assigns services to resource. + * @param resource id of Resource + * @param services list of Service ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public assignServices( + resource: number, + services: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public assignServices( + resource: number, + services: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public assignServices( + resource: number, + services: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public assignServices( + resource: number, + services: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling assignServices.' + ); + } + if (services === null || services === undefined) { + throw new Error( + 'Required parameter services was null or undefined when calling assignServices.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (services) { + services.forEach((element) => { + queryParameters = queryParameters.append('services[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/resourcesManager/assignServices`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Assign all services from a services package to a resource. + * @param resource id of Resource + * @param servicesPackage id of ServicesPackage + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public assignServicesPackage( + resource: number, + servicesPackage: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public assignServicesPackage( + resource: number, + servicesPackage: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public assignServicesPackage( + resource: number, + servicesPackage: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public assignServicesPackage( + resource: number, + servicesPackage: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling assignServicesPackage.' + ); + } + if (servicesPackage === null || servicesPackage === undefined) { + throw new Error( + 'Required parameter servicesPackage was null or undefined when calling assignServicesPackage.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (servicesPackage !== undefined && servicesPackage !== null) { + queryParameters = queryParameters.set('servicesPackage', servicesPackage); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/resourcesManager/assignServicesPackage`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Copy \"template\" settings from user\'s another existing resource and create new resource with this template. The settings are attributes, services, tags (if exists), groups and their members (if the resources are from the same VO and withGroups is true) Template Resource can be from any of user\'s facilities. + * @param inputCopyResource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public copyResource( + inputCopyResource: InputCopyResource, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public copyResource( + inputCopyResource: InputCopyResource, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public copyResource( + inputCopyResource: InputCopyResource, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public copyResource( + inputCopyResource: InputCopyResource, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputCopyResource === null || inputCopyResource === undefined) { + throw new Error( + 'Required parameter inputCopyResource was null or undefined when calling copyResource.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/resourcesManager/copyResource`, + inputCopyResource, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Creates a new resource. + * @param vo id of Vo + * @param facility id of Facility + * @param name name of entity + * @param description optional resource description + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createResource( + vo: number, + facility: number, + name: string, + description?: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public createResource( + vo: number, + facility: number, + name: string, + description?: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public createResource( + vo: number, + facility: number, + name: string, + description?: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public createResource( + vo: number, + facility: number, + name: string, + description?: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling createResource.'); + } + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling createResource.' + ); + } + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling createResource.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (name !== undefined && name !== null) { + queryParameters = queryParameters.set('name', name); + } + if (description !== undefined && description !== null) { + queryParameters = queryParameters.set('description', description); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/resourcesManager/createResource`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Create new resource tag in VO + * @param inputCreateResourceTagWithResourceTag + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createResourceTagWithResourceTag( + inputCreateResourceTagWithResourceTag: InputCreateResourceTagWithResourceTag, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public createResourceTagWithResourceTag( + inputCreateResourceTagWithResourceTag: InputCreateResourceTagWithResourceTag, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public createResourceTagWithResourceTag( + inputCreateResourceTagWithResourceTag: InputCreateResourceTagWithResourceTag, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public createResourceTagWithResourceTag( + inputCreateResourceTagWithResourceTag: InputCreateResourceTagWithResourceTag, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if ( + inputCreateResourceTagWithResourceTag === null || + inputCreateResourceTagWithResourceTag === undefined + ) { + throw new Error( + 'Required parameter inputCreateResourceTagWithResourceTag was null or undefined when calling createResourceTagWithResourceTag.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/resourcesManager/createResourceTag/resourceTag`, + inputCreateResourceTagWithResourceTag, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Create new resource tag defined by tag name in VO + * @param tagName tagName + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createResourceTagWithTagName( + tagName: string, + vo: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public createResourceTagWithTagName( + tagName: string, + vo: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public createResourceTagWithTagName( + tagName: string, + vo: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public createResourceTagWithTagName( + tagName: string, + vo: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (tagName === null || tagName === undefined) { + throw new Error( + 'Required parameter tagName was null or undefined when calling createResourceTagWithTagName.' + ); + } + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling createResourceTagWithTagName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (tagName !== undefined && tagName !== null) { + queryParameters = queryParameters.set('tagName', tagName); + } + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/resourcesManager/createResourceTag/tagName`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Deactivates the group-resource assignment. The assignment will become INACTIVE and will not be used to allow users from the given group to the resource. + * @param group id of Group + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deactivateGroupResourceAssignment( + group: number, + resource: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public deactivateGroupResourceAssignment( + group: number, + resource: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public deactivateGroupResourceAssignment( + group: number, + resource: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public deactivateGroupResourceAssignment( + group: number, + resource: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling deactivateGroupResourceAssignment.' + ); + } + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling deactivateGroupResourceAssignment.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/resourcesManager/deactivateGroupResourceAssignment`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Deletes all VO resources + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteAllResources( + vo: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public deleteAllResources( + vo: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public deleteAllResources( + vo: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public deleteAllResources( + vo: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling deleteAllResources.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/resourcesManager/deleteAllResources`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Delete all resources tags of VO + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteAllResourcesTagsForVo( + vo: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public deleteAllResourcesTagsForVo( + vo: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public deleteAllResourcesTagsForVo( + vo: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public deleteAllResourcesTagsForVo( + vo: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling deleteAllResourcesTagsForVo.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/resourcesManager/deleteAllResourcesTagsForVo`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Deletes a resource. + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteResource( + resource: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public deleteResource( + resource: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public deleteResource( + resource: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public deleteResource( + resource: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling deleteResource.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/resourcesManager/deleteResource`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Delete resource tag by it\'s id and VO_ID + * @param inputDeleteResourceTag + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteResourceTag( + inputDeleteResourceTag: InputDeleteResourceTag, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public deleteResourceTag( + inputDeleteResourceTag: InputDeleteResourceTag, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public deleteResourceTag( + inputDeleteResourceTag: InputDeleteResourceTag, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public deleteResourceTag( + inputDeleteResourceTag: InputDeleteResourceTag, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputDeleteResourceTag === null || inputDeleteResourceTag === undefined) { + throw new Error( + 'Required parameter inputDeleteResourceTag was null or undefined when calling deleteResourceTag.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/resourcesManager/deleteResourceTag`, + inputDeleteResourceTag, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all Resource group admins. + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAdminGroups( + resource: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAdminGroups( + resource: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAdminGroups( + resource: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAdminGroups( + resource: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getAdminGroups.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/resourcesManager/getAdminGroups`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get list of all resource administrators for supported role and given resource. + * If onlyDirectAdmins is == true, return only direct admins of the group for supported role. Otherwise include users who are VALID members of administrator groups. Supported roles are ResourceAdmin, VOAdmin. + * @param resource id of Resource + * @param onlyDirectAdmins boolean if true, get only direct resource administrators (if false, get both direct and indirect) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAdmins( + resource: number, + onlyDirectAdmins: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAdmins( + resource: number, + onlyDirectAdmins: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAdmins( + resource: number, + onlyDirectAdmins: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAdmins( + resource: number, + onlyDirectAdmins: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getAdmins.'); + } + if (onlyDirectAdmins === null || onlyDirectAdmins === undefined) { + throw new Error( + 'Required parameter onlyDirectAdmins was null or undefined when calling getAdmins.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (onlyDirectAdmins !== undefined && onlyDirectAdmins !== null) { + queryParameters = queryParameters.set('onlyDirectAdmins', onlyDirectAdmins); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/resourcesManager/getAdmins`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all resources with the specific tag assigned. + * @param inputGetAllResourcesByResourceTag + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllResourcesByResourceTag( + inputGetAllResourcesByResourceTag: InputGetAllResourcesByResourceTag, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAllResourcesByResourceTag( + inputGetAllResourcesByResourceTag: InputGetAllResourcesByResourceTag, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllResourcesByResourceTag( + inputGetAllResourcesByResourceTag: InputGetAllResourcesByResourceTag, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAllResourcesByResourceTag( + inputGetAllResourcesByResourceTag: InputGetAllResourcesByResourceTag, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if ( + inputGetAllResourcesByResourceTag === null || + inputGetAllResourcesByResourceTag === undefined + ) { + throw new Error( + 'Required parameter inputGetAllResourcesByResourceTag was null or undefined when calling getAllResourcesByResourceTag.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post>( + `${this.configuration.basePath}/json/resourcesManager/getAllResourcesByResourceTag`, + inputGetAllResourcesByResourceTag, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets all resource tags of Resource. + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllResourcesTagsForResource( + resource: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAllResourcesTagsForResource( + resource: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllResourcesTagsForResource( + resource: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAllResourcesTagsForResource( + resource: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getAllResourcesTagsForResource.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/resourcesManager/getAllResourcesTagsForResource`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets all resource tags of VO. + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllResourcesTagsForVo( + vo: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAllResourcesTagsForVo( + vo: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllResourcesTagsForVo( + vo: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAllResourcesTagsForVo( + vo: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling getAllResourcesTagsForVo.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/resourcesManager/getAllResourcesTagsForVo`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns list of Resources, where the user is an Administrator. + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllResourcesWhereUserIsAdmin( + user: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAllResourcesWhereUserIsAdmin( + user: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllResourcesWhereUserIsAdmin( + user: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAllResourcesWhereUserIsAdmin( + user: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling getAllResourcesWhereUserIsAdmin.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/resourcesManager/getResourcesWhereUserIsAdmin/all`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns all members assigned to the resource. + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllowedMembers( + resource: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAllowedMembers( + resource: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllowedMembers( + resource: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAllowedMembers( + resource: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getAllowedMembers.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/resourcesManager/getAllowedMembers`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all resources which have the member access on. + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllowedResources( + member: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAllowedResources( + member: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllowedResources( + member: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAllowedResources( + member: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getAllowedResources.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/resourcesManager/getAllowedResources`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns all users assigned to the resource. + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllowedUsersOfResource( + resource: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAllowedUsersOfResource( + resource: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllowedUsersOfResource( + resource: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAllowedUsersOfResource( + resource: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getAllowedUsersOfResource.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/resourcesManager/getAllowedUsers`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * List all groups associated with the resource and optionally a member. + * @param resource id of Resource + * @param member optional member id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedGroups( + resource: number, + member?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAssignedGroups( + resource: number, + member?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAssignedGroups( + resource: number, + member?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAssignedGroups( + resource: number, + member?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getAssignedGroups.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/resourcesManager/getAssignedGroups`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns all members assigned to the resource. + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedMembers( + resource: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAssignedMembers( + resource: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAssignedMembers( + resource: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAssignedMembers( + resource: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getAssignedMembers.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/resourcesManager/getAssignedMembers`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns members of groups assigned to resource with status of group-resource assignment. + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedMembersWithStatus( + resource: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAssignedMembersWithStatus( + resource: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAssignedMembersWithStatus( + resource: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAssignedMembersWithStatus( + resource: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getAssignedMembersWithStatus.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/resourcesManager/getAssignedMembersWithStatus`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * List all resources to which the group is assigned. + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedResourcesWithGroup( + group: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAssignedResourcesWithGroup( + group: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAssignedResourcesWithGroup( + group: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAssignedResourcesWithGroup( + group: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getAssignedResourcesWithGroup.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/resourcesManager/getAssignedResources/g`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * List all resources associated with a member\'s group. + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedResourcesWithMember( + member: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAssignedResourcesWithMember( + member: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAssignedResourcesWithMember( + member: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAssignedResourcesWithMember( + member: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getAssignedResourcesWithMember.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/resourcesManager/getAssignedResources/m`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns all assigned resources with statuses where member is assigned through the groups. + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedResourcesWithStatus( + member: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAssignedResourcesWithStatus( + member: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAssignedResourcesWithStatus( + member: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAssignedResourcesWithStatus( + member: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getAssignedResourcesWithStatus.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/resourcesManager/getAssignedResourcesWithStatus`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns all members assigned to the resource as RichMembers. + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedRichMembers( + resource: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAssignedRichMembers( + resource: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAssignedRichMembers( + resource: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAssignedRichMembers( + resource: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getAssignedRichMembers.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/resourcesManager/getAssignedRichMembers`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * List all rich resources associated with a group. + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedRichResourcesWithGroup( + group: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAssignedRichResourcesWithGroup( + group: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAssignedRichResourcesWithGroup( + group: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAssignedRichResourcesWithGroup( + group: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getAssignedRichResourcesWithGroup.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/resourcesManager/getAssignedRichResources/g`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * List all rich resources associated with a member\'s group. + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedRichResourcesWithMember( + member: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAssignedRichResourcesWithMember( + member: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAssignedRichResourcesWithMember( + member: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAssignedRichResourcesWithMember( + member: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getAssignedRichResourcesWithMember.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/resourcesManager/getAssignedRichResources/m`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all rich resources where the service and the member are assigned with facility property filled. + * @param member id of Member + * @param service id of Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedRichResourcesWithMemberService( + member: number, + service: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAssignedRichResourcesWithMemberService( + member: number, + service: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAssignedRichResourcesWithMemberService( + member: number, + service: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAssignedRichResourcesWithMemberService( + member: number, + service: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getAssignedRichResourcesWithMemberService.' + ); + } + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling getAssignedRichResourcesWithMemberService.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/resourcesManager/getAssignedRichResources/s-m`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * List all services associated with the resource. + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedServicesToResource( + resource: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAssignedServicesToResource( + resource: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAssignedServicesToResource( + resource: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAssignedServicesToResource( + resource: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getAssignedServicesToResource.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/resourcesManager/getAssignedServices`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all bans for member on any resource. + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getBansForMember( + member: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getBansForMember( + member: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getBansForMember( + member: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getBansForMember( + member: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getBansForMember.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/resourcesManager/getBansForMember`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all bans for members on the resource. + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getBansForResource( + resource: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getBansForResource( + resource: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getBansForResource( + resource: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getBansForResource( + resource: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getBansForResource.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/resourcesManager/getBansForResource`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Find resource for given id and returns it with given attributes. If attrNames are null or empty, all resource attributes are returned. + * @param id numeric id + * @param attrNames list of attribute names List<String> or null + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getEnrichedResourceById( + id: number, + attrNames?: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getEnrichedResourceById( + id: number, + attrNames?: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getEnrichedResourceById( + id: number, + attrNames?: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getEnrichedResourceById( + id: number, + attrNames?: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (id === null || id === undefined) { + throw new Error( + 'Required parameter id was null or undefined when calling getEnrichedResourceById.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/resourcesManager/getEnrichedResourceById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Find resources for given facility and attributes for given names. If the attrNames are empty or null, return all attributes. + * @param facility id of Facility + * @param attrNames list of attribute names List<String> or null + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getEnrichedResourcesForFacility( + facility: number, + attrNames?: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getEnrichedResourcesForFacility( + facility: number, + attrNames?: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getEnrichedResourcesForFacility( + facility: number, + attrNames?: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getEnrichedResourcesForFacility( + facility: number, + attrNames?: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getEnrichedResourcesForFacility.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/resourcesManager/getEnrichedResourcesForFacility`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Find resources for given vo and attributes for given names. If the attrNames are empty or null, return all attributes. + * @param vo id of Vo + * @param attrNames list of attribute names List<String> or null + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getEnrichedResourcesForVo( + vo: number, + attrNames?: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getEnrichedResourcesForVo( + vo: number, + attrNames?: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getEnrichedResourcesForVo( + vo: number, + attrNames?: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getEnrichedResourcesForVo( + vo: number, + attrNames?: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling getEnrichedResourcesForVo.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/resourcesManager/getEnrichedResourcesForVo`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get facility which belongs to a specific resource. + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacility( + resource: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getFacility( + resource: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getFacility( + resource: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getFacility( + resource: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getFacility.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/resourcesManager/getFacility`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Lists all of the assigned groups for the given resource. Also, returns specified attributes for the groups. + * @param resource id of Resource + * @param attrNames list of attribute names List<String> or null + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupAssignments( + resource: number, + attrNames?: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getGroupAssignments( + resource: number, + attrNames?: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getGroupAssignments( + resource: number, + attrNames?: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getGroupAssignments( + resource: number, + attrNames?: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getGroupAssignments.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/resourcesManager/getGroupAssignments`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Lists all of the resource assignments for the given group. Also, returns specified attributes for the resources and resource tags. + * @param group id of Group + * @param attrNames list of attribute names List<String> or null + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourceAssignments( + group: number, + attrNames?: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getResourceAssignments( + group: number, + attrNames?: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getResourceAssignments( + group: number, + attrNames?: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getResourceAssignments( + group: number, + attrNames?: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getResourceAssignments.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/resourcesManager/getResourceAssignments`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get ban by memberId and resource id. + * @param member id of Member + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourceBan( + member: number, + resource: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getResourceBan( + member: number, + resource: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getResourceBan( + member: number, + resource: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getResourceBan( + member: number, + resource: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getResourceBan.' + ); + } + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getResourceBan.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/resourcesManager/getBan`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get Ban for member on resource by it\'s id. + * @param banId BanOnResource id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourceBanById( + banId: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getResourceBanById( + banId: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getResourceBanById( + banId: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getResourceBanById( + banId: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (banId === null || banId === undefined) { + throw new Error( + 'Required parameter banId was null or undefined when calling getResourceBanById.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (banId !== undefined && banId !== null) { + queryParameters = queryParameters.set('banId', banId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/resourcesManager/getBanById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns a resource by id. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourceById( + id: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getResourceById( + id: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getResourceById( + id: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getResourceById( + id: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getResourceById.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/resourcesManager/getResourceById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns resource by its name, Vo id and Facility id. + * @param vo id of Vo + * @param facility id of Facility + * @param name name of entity + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourceByName( + vo: number, + facility: number, + name: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getResourceByName( + vo: number, + facility: number, + name: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getResourceByName( + vo: number, + facility: number, + name: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getResourceByName( + vo: number, + facility: number, + name: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling getResourceByName.' + ); + } + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getResourceByName.' + ); + } + if (name === null || name === undefined) { + throw new Error( + 'Required parameter name was null or undefined when calling getResourceByName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (name !== undefined && name !== null) { + queryParameters = queryParameters.set('name', name); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/resourcesManager/getResourceByName`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all VO resources. + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResources( + vo: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getResources( + vo: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getResources( + vo: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getResources( + vo: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getResources.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/resourcesManager/getResources`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns list of Resources by their ids. + * @param ids list of ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourcesByIds( + ids: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getResourcesByIds( + ids: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getResourcesByIds( + ids: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getResourcesByIds( + ids: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (ids === null || ids === undefined) { + throw new Error( + 'Required parameter ids was null or undefined when calling getResourcesByIds.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (ids) { + ids.forEach((element) => { + queryParameters = queryParameters.append('ids[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/resourcesManager/getResourcesByIds`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets count of all users. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourcesCountForAll(observe?: 'body', reportProgress?: boolean): Observable; + public getResourcesCountForAll( + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getResourcesCountForAll( + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getResourcesCountForAll( + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/resourcesManager/getResourcesCount/all`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns number of VO resources + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourcesCountForVo( + vo: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getResourcesCountForVo( + vo: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getResourcesCountForVo( + vo: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getResourcesCountForVo( + vo: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling getResourcesCountForVo.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/resourcesManager/getResourcesCount/vo`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns list of Resources for specified VO, where the user is an Administrator. + * @param vo id of Vo + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourcesFromVoWhereUserIsAdmin( + vo: number, + user: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getResourcesFromVoWhereUserIsAdmin( + vo: number, + user: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getResourcesFromVoWhereUserIsAdmin( + vo: number, + user: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getResourcesFromVoWhereUserIsAdmin( + vo: number, + user: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling getResourcesFromVoWhereUserIsAdmin.' + ); + } + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling getResourcesFromVoWhereUserIsAdmin.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/resourcesManager/getResourcesWhereUserIsAdmin/fromVo`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns list of Resources for specified VO and Facility, where the group is an Administrator. + * @param facility id of Facility + * @param vo id of Vo + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourcesWhereGroupIsAdmin( + facility: number, + vo: number, + group: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getResourcesWhereGroupIsAdmin( + facility: number, + vo: number, + group: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getResourcesWhereGroupIsAdmin( + facility: number, + vo: number, + group: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getResourcesWhereGroupIsAdmin( + facility: number, + vo: number, + group: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getResourcesWhereGroupIsAdmin.' + ); + } + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling getResourcesWhereGroupIsAdmin.' + ); + } + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getResourcesWhereGroupIsAdmin.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/resourcesManager/getResourcesWhereUserIsAdmin/group`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns list of Resources for specified VO and Facility, where the user is a direct Administrator or a VALID member of an administrator group. + * @param facility id of Facility + * @param vo id of Vo + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getResourcesWhereUserIsAdmin( + facility: number, + vo: number, + user: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getResourcesWhereUserIsAdmin( + facility: number, + vo: number, + user: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getResourcesWhereUserIsAdmin( + facility: number, + vo: number, + user: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getResourcesWhereUserIsAdmin( + facility: number, + vo: number, + user: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getResourcesWhereUserIsAdmin.' + ); + } + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling getResourcesWhereUserIsAdmin.' + ); + } + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling getResourcesWhereUserIsAdmin.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/resourcesManager/getResourcesWhereUserIsAdmin`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get list of all richUser administrators for the resource and supported role with specific attributes. If some group is administrator of the given group, all VALID members are included in the list. Supported roles: ResourceAdmin, VOAdmin If \"onlyDirectAdmins\" is true, return only direct admins of the resource for supported role with specific attributes. If \"allUserAttributes\" is true, do not specify attributes through list and return them all in objects richUser. Ignoring list of specific attributes. + * @param resource id of Resource + * @param specificAttributes list of specified attributes which are needed in object richUser + * @param allUserAttributes if == true, get all possible user attributes and ignore list of specificAttributes (if false, get only specific attributes) + * @param onlyDirectAdmins if == true, get only direct resource administrators (if false, get both direct and indirect) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRichAdmins( + resource: number, + specificAttributes: Array, + allUserAttributes: boolean, + onlyDirectAdmins: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getRichAdmins( + resource: number, + specificAttributes: Array, + allUserAttributes: boolean, + onlyDirectAdmins: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getRichAdmins( + resource: number, + specificAttributes: Array, + allUserAttributes: boolean, + onlyDirectAdmins: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getRichAdmins( + resource: number, + specificAttributes: Array, + allUserAttributes: boolean, + onlyDirectAdmins: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getRichAdmins.' + ); + } + if (specificAttributes === null || specificAttributes === undefined) { + throw new Error( + 'Required parameter specificAttributes was null or undefined when calling getRichAdmins.' + ); + } + if (allUserAttributes === null || allUserAttributes === undefined) { + throw new Error( + 'Required parameter allUserAttributes was null or undefined when calling getRichAdmins.' + ); + } + if (onlyDirectAdmins === null || onlyDirectAdmins === undefined) { + throw new Error( + 'Required parameter onlyDirectAdmins was null or undefined when calling getRichAdmins.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (specificAttributes) { + specificAttributes.forEach((element) => { + queryParameters = queryParameters.append('specificAttributes', element); + }); + } + if (allUserAttributes !== undefined && allUserAttributes !== null) { + queryParameters = queryParameters.set('allUserAttributes', allUserAttributes); + } + if (onlyDirectAdmins !== undefined && onlyDirectAdmins !== null) { + queryParameters = queryParameters.set('onlyDirectAdmins', onlyDirectAdmins); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/resourcesManager/getRichAdmins`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns RichResource by id (also containing facility and VO inside). + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRichResourceById( + id: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getRichResourceById( + id: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getRichResourceById( + id: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getRichResourceById( + id: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (id === null || id === undefined) { + throw new Error( + 'Required parameter id was null or undefined when calling getRichResourceById.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/resourcesManager/getRichResourceById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all VO rich resources. + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRichResources( + vo: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getRichResources( + vo: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getRichResources( + vo: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getRichResources( + vo: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getRichResources.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/resourcesManager/getRichResources`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns list of RichResources by their ids. + * @param ids list of ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRichResourcesByIds( + ids: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getRichResourcesByIds( + ids: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getRichResourcesByIds( + ids: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getRichResourcesByIds( + ids: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (ids === null || ids === undefined) { + throw new Error( + 'Required parameter ids was null or undefined when calling getRichResourcesByIds.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (ids) { + ids.forEach((element) => { + queryParameters = queryParameters.append('ids[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/resourcesManager/getRichResourcesByIds`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns Vo which is tied to a specific resource. + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVo(resource: number, observe?: 'body', reportProgress?: boolean): Observable; + public getVo( + resource: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getVo( + resource: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getVo( + resource: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error('Required parameter resource was null or undefined when calling getVo.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get(`${this.configuration.basePath}/json/resourcesManager/getVo`, { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + }); + } + + /** + * Removes all resources tags from a resource. + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeAllResourceTagsFromResource( + resource: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeAllResourceTagsFromResource( + resource: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeAllResourceTagsFromResource( + resource: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeAllResourceTagsFromResource( + resource: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling removeAllResourceTagsFromResource.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/resourcesManager/removeAllResourcesTagFromResource`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove specific ban by memberId and resourceId. + * @param member id of Member + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeBanByMemberAndResource( + member: number, + resource: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeBanByMemberAndResource( + member: number, + resource: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeBanByMemberAndResource( + member: number, + resource: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeBanByMemberAndResource( + member: number, + resource: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling removeBanByMemberAndResource.' + ); + } + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling removeBanByMemberAndResource.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/resourcesManager/removeBan/member-resource-id`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Removes a group administrator of the Resource. + * @param resource id of Resource + * @param authorizedGroup Group id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeGroupAdminResource( + resource: number, + authorizedGroup: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeGroupAdminResource( + resource: number, + authorizedGroup: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeGroupAdminResource( + resource: number, + authorizedGroup: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeGroupAdminResource( + resource: number, + authorizedGroup: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling removeGroupAdminResource.' + ); + } + if (authorizedGroup === null || authorizedGroup === undefined) { + throw new Error( + 'Required parameter authorizedGroup was null or undefined when calling removeGroupAdminResource.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (authorizedGroup !== undefined && authorizedGroup !== null) { + queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/resourcesManager/removeAdmin/r-g`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove a group from a resource. After removing, check attributes and fix them if it is needed. + * @param group id of Group + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeGroupFromResource( + group: number, + resource: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeGroupFromResource( + group: number, + resource: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeGroupFromResource( + group: number, + resource: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeGroupFromResource( + group: number, + resource: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling removeGroupFromResource.' + ); + } + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling removeGroupFromResource.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/resourcesManager/removeGroupFromResource`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove a group from resource. After removing, check attributes and fix them if it is needed. + * @param group id of Group + * @param resources list of Resource ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeGroupFromResources( + group: number, + resources: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeGroupFromResources( + group: number, + resources: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeGroupFromResources( + group: number, + resources: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeGroupFromResources( + group: number, + resources: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling removeGroupFromResources.' + ); + } + if (resources === null || resources === undefined) { + throw new Error( + 'Required parameter resources was null or undefined when calling removeGroupFromResources.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (resources) { + resources.forEach((element) => { + queryParameters = queryParameters.append('resources[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/resourcesManager/removeGroupFromResources`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove groups from a resource. After removing, check attributes and fix them if it is needed. + * @param groups list of Group ids List<Integer> + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeGroupsFromResource( + groups: Array, + resource: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeGroupsFromResource( + groups: Array, + resource: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeGroupsFromResource( + groups: Array, + resource: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeGroupsFromResource( + groups: Array, + resource: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (groups === null || groups === undefined) { + throw new Error( + 'Required parameter groups was null or undefined when calling removeGroupsFromResource.' + ); + } + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling removeGroupsFromResource.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (groups) { + groups.forEach((element) => { + queryParameters = queryParameters.append('groups[]', element); + }); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/resourcesManager/removeGroupsFromResource`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove specific ban by it\'s id. + * @param banId BanOnResource id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeResourceBanById( + banId: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeResourceBanById( + banId: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeResourceBanById( + banId: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeResourceBanById( + banId: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (banId === null || banId === undefined) { + throw new Error( + 'Required parameter banId was null or undefined when calling removeResourceBanById.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (banId !== undefined && banId !== null) { + queryParameters = queryParameters.set('banId', banId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/resourcesManager/removeBan/id`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Unset ResourceSelfService role to given group for given resource. + * @param resource id of Resource + * @param group id of Group + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeResourceSelfServiceGroup( + resource: number, + group: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeResourceSelfServiceGroup( + resource: number, + group: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeResourceSelfServiceGroup( + resource: number, + group: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeResourceSelfServiceGroup( + resource: number, + group: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling removeResourceSelfServiceGroup.' + ); + } + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling removeResourceSelfServiceGroup.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/resourcesManager/removeResourceSelfServiceGroup`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Unset ResourceSelfService role to given user for given resource. + * @param resource id of Resource + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeResourceSelfServiceUser( + resource: number, + user: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeResourceSelfServiceUser( + resource: number, + user: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeResourceSelfServiceUser( + resource: number, + user: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeResourceSelfServiceUser( + resource: number, + user: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling removeResourceSelfServiceUser.' + ); + } + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling removeResourceSelfServiceUser.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/resourcesManager/removeResourceSelfServiceUser`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Removes ResourceRag from a resource. The ResourceTag must contain its id, voId and tagName. + * @param inputRemoveResourceTagFromResource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeResourceTagFromResource( + inputRemoveResourceTagFromResource: InputRemoveResourceTagFromResource, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeResourceTagFromResource( + inputRemoveResourceTagFromResource: InputRemoveResourceTagFromResource, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeResourceTagFromResource( + inputRemoveResourceTagFromResource: InputRemoveResourceTagFromResource, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeResourceTagFromResource( + inputRemoveResourceTagFromResource: InputRemoveResourceTagFromResource, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if ( + inputRemoveResourceTagFromResource === null || + inputRemoveResourceTagFromResource === undefined + ) { + throw new Error( + 'Required parameter inputRemoveResourceTagFromResource was null or undefined when calling removeResourceTagFromResource.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/resourcesManager/removeResourceTagFromResource`, + inputRemoveResourceTagFromResource, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Removes a service from a resource. + * @param resource id of Resource + * @param service id of Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeService( + resource: number, + service: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeService( + resource: number, + service: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeService( + resource: number, + service: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeService( + resource: number, + service: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling removeService.' + ); + } + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling removeService.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/resourcesManager/removeService`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Removes services from a resource. + * @param resource id of Resource + * @param services list of Service ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeServices( + resource: number, + services: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeServices( + resource: number, + services: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeServices( + resource: number, + services: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeServices( + resource: number, + services: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling removeServices.' + ); + } + if (services === null || services === undefined) { + throw new Error( + 'Required parameter services was null or undefined when calling removeServices.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (services) { + services.forEach((element) => { + queryParameters = queryParameters.append('services[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/resourcesManager/removeServices`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove from resource all services from services package. + * @param resource id of Resource + * @param servicesPackage id of ServicesPackage + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeServicesPackage( + resource: number, + servicesPackage: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeServicesPackage( + resource: number, + servicesPackage: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeServicesPackage( + resource: number, + servicesPackage: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeServicesPackage( + resource: number, + servicesPackage: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling removeServicesPackage.' + ); + } + if (servicesPackage === null || servicesPackage === undefined) { + throw new Error( + 'Required parameter servicesPackage was null or undefined when calling removeServicesPackage.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (servicesPackage !== undefined && servicesPackage !== null) { + queryParameters = queryParameters.set('servicesPackage', servicesPackage); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/resourcesManager/removeServicesPackage`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Removes a Resource admin. + * @param resource id of Resource + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeUserAdminResource( + resource: number, + user: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeUserAdminResource( + resource: number, + user: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeUserAdminResource( + resource: number, + user: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeUserAdminResource( + resource: number, + user: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling removeUserAdminResource.' + ); + } + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling removeUserAdminResource.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/resourcesManager/removeAdmin/r-u`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Set ban for member on resource. + * @param inputSetBan + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setResourceBan( + inputSetBan: InputSetBan, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setResourceBan( + inputSetBan: InputSetBan, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setResourceBan( + inputSetBan: InputSetBan, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setResourceBan( + inputSetBan: InputSetBan, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputSetBan === null || inputSetBan === undefined) { + throw new Error( + 'Required parameter inputSetBan was null or undefined when calling setResourceBan.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/resourcesManager/setBan`, + inputSetBan, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Unassigns given groups from the given resources. + * @param groups list of Group ids List<Integer> + * @param resources list of Resource ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public unallowGroupsFromResources( + groups: Array, + resources: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public unallowGroupsFromResources( + groups: Array, + resources: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public unallowGroupsFromResources( + groups: Array, + resources: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public unallowGroupsFromResources( + groups: Array, + resources: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (groups === null || groups === undefined) { + throw new Error( + 'Required parameter groups was null or undefined when calling unallowGroupsFromResources.' + ); + } + if (resources === null || resources === undefined) { + throw new Error( + 'Required parameter resources was null or undefined when calling unallowGroupsFromResources.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (groups) { + groups.forEach((element) => { + queryParameters = queryParameters.append('groups[]', element); + }); + } + if (resources) { + resources.forEach((element) => { + queryParameters = queryParameters.append('resources[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/resourcesManager/unallowGroupsFromResources`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Updates a resource. + * @param inputUpdateResource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateResource( + inputUpdateResource: InputUpdateResource, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public updateResource( + inputUpdateResource: InputUpdateResource, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public updateResource( + inputUpdateResource: InputUpdateResource, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public updateResource( + inputUpdateResource: InputUpdateResource, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputUpdateResource === null || inputUpdateResource === undefined) { + throw new Error( + 'Required parameter inputUpdateResource was null or undefined when calling updateResource.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/resourcesManager/updateResource`, + inputUpdateResource, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Update existing ban (description, validation timestamp) + * @param inputUpdateBan + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateResourceBan( + inputUpdateBan: InputUpdateBan, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public updateResourceBan( + inputUpdateBan: InputUpdateBan, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public updateResourceBan( + inputUpdateBan: InputUpdateBan, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public updateResourceBan( + inputUpdateBan: InputUpdateBan, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputUpdateBan === null || inputUpdateBan === undefined) { + throw new Error( + 'Required parameter inputUpdateBan was null or undefined when calling updateResourceBan.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/resourcesManager/updateBan`, + inputUpdateBan, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Update resource tag name by it\'s id and VO_ID + * @param inputUpdateResourceTag + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateResourceTag( + inputUpdateResourceTag: InputUpdateResourceTag, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public updateResourceTag( + inputUpdateResourceTag: InputUpdateResourceTag, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public updateResourceTag( + inputUpdateResourceTag: InputUpdateResourceTag, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public updateResourceTag( + inputUpdateResourceTag: InputUpdateResourceTag, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputUpdateResourceTag === null || inputUpdateResourceTag === undefined) { + throw new Error( + 'Required parameter inputUpdateResourceTag was null or undefined when calling updateResourceTag.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - - - /** - * Try to activate the group-resource status. If the async is set to false, the validation is performed synchronously. The assignment will be either ACTIVE, in case of a sucessfull synchronous call, or it will be PROCESSING in case of an asynchronous call. After the async validation, the state can be either ACTIVE or FAILED. - * @param group id of Group - * @param resource id of Resource - * @param async asynchronous flag, if set to true, some operation will be performed asynchronously - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public activateGroupResourceAssignment(group: number, resource: number, async?: boolean, observe?: 'body', reportProgress?: boolean): Observable; - public activateGroupResourceAssignment(group: number, resource: number, async?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; - public activateGroupResourceAssignment(group: number, resource: number, async?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; - public activateGroupResourceAssignment(group: number, resource: number, async?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling activateGroupResourceAssignment.'); - } - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling activateGroupResourceAssignment.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (async !== undefined && async !== null) { - queryParameters = queryParameters.set('async', async); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/activateGroupResourceAssignment`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Adds a group administrator to the Resource. - * @param resource id of Resource - * @param authorizedGroup Group id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addAdminToGroup(resource: number, authorizedGroup: number, observe?: 'body', reportProgress?: boolean): Observable; - public addAdminToGroup(resource: number, authorizedGroup: number, observe?: 'response', reportProgress?: boolean): Observable>; - public addAdminToGroup(resource: number, authorizedGroup: number, observe?: 'events', reportProgress?: boolean): Observable>; - public addAdminToGroup(resource: number, authorizedGroup: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling addAdminToGroup.'); - } - if (authorizedGroup === null || authorizedGroup === undefined) { - throw new Error('Required parameter authorizedGroup was null or undefined when calling addAdminToGroup.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (authorizedGroup !== undefined && authorizedGroup !== null) { - queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/addAdmin/r-g`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Adds a Resource admin. - * @param resource id of Resource - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addAdminToUser(resource: number, user: number, observe?: 'body', reportProgress?: boolean): Observable; - public addAdminToUser(resource: number, user: number, observe?: 'response', reportProgress?: boolean): Observable>; - public addAdminToUser(resource: number, user: number, observe?: 'events', reportProgress?: boolean): Observable>; - public addAdminToUser(resource: number, user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling addAdminToUser.'); - } - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling addAdminToUser.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/addAdmin/r-u`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Sets ResourceSelfService role to given group for given resource. - * @param resource id of Resource - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addResourceSelfServiceGroup(resource: number, group: number, observe?: 'body', reportProgress?: boolean): Observable; - public addResourceSelfServiceGroup(resource: number, group: number, observe?: 'response', reportProgress?: boolean): Observable>; - public addResourceSelfServiceGroup(resource: number, group: number, observe?: 'events', reportProgress?: boolean): Observable>; - public addResourceSelfServiceGroup(resource: number, group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling addResourceSelfServiceGroup.'); - } - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling addResourceSelfServiceGroup.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/addResourceSelfServiceGroup`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Sets ResourceSelfService role to given user for given resource. - * @param resource id of Resource - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addResourceSelfServiceUser(resource: number, user: number, observe?: 'body', reportProgress?: boolean): Observable; - public addResourceSelfServiceUser(resource: number, user: number, observe?: 'response', reportProgress?: boolean): Observable>; - public addResourceSelfServiceUser(resource: number, user: number, observe?: 'events', reportProgress?: boolean): Observable>; - public addResourceSelfServiceUser(resource: number, user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling addResourceSelfServiceUser.'); - } - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling addResourceSelfServiceUser.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/addResourceSelfServiceUser`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Assigns given groups to all of the given resources. If async is set to false, check if attributes for each member from groups are valid and fill members\' attributes with missing values. - * @param groups list of Group ids List<Integer> - * @param resources list of Resource ids List<Integer> - * @param async asynchronous flag, if set to true, some operation will be performed asynchronously - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public allowGroupsToResources(groups: Array, resources: Array, async?: boolean, observe?: 'body', reportProgress?: boolean): Observable; - public allowGroupsToResources(groups: Array, resources: Array, async?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; - public allowGroupsToResources(groups: Array, resources: Array, async?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; - public allowGroupsToResources(groups: Array, resources: Array, async?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (groups === null || groups === undefined) { - throw new Error('Required parameter groups was null or undefined when calling allowGroupsToResources.'); - } - if (resources === null || resources === undefined) { - throw new Error('Required parameter resources was null or undefined when calling allowGroupsToResources.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (groups) { - groups.forEach((element) => { - queryParameters = queryParameters.append('groups[]', element); - }) - } - if (resources) { - resources.forEach((element) => { - queryParameters = queryParameters.append('resources[]', element); - }) - } - if (async !== undefined && async !== null) { - queryParameters = queryParameters.set('async', async); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/allowGroupsToResources`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Assigns a group to a resource. Check if attributes for each member from group are valid. Fill members\' attributes with missing value. Work in sync/async mode. Provide options for creating inactive or automatic subgroups group-resource assignments. - * @param group id of Group - * @param resource id of Resource - * @param async asynchronous flag, if set to true, some operation will be performed asynchronously - * @param assignInactive flag, if set to true, group-resource assignment will have status INACTIVE - * @param autoAssignSubgroups flag, if set to true, subgroups are assigned to resource as well - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public assignGroupToResource(group: number, resource: number, async?: boolean, assignInactive?: boolean, autoAssignSubgroups?: boolean, observe?: 'body', reportProgress?: boolean): Observable; - public assignGroupToResource(group: number, resource: number, async?: boolean, assignInactive?: boolean, autoAssignSubgroups?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; - public assignGroupToResource(group: number, resource: number, async?: boolean, assignInactive?: boolean, autoAssignSubgroups?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; - public assignGroupToResource(group: number, resource: number, async?: boolean, assignInactive?: boolean, autoAssignSubgroups?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling assignGroupToResource.'); - } - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling assignGroupToResource.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (async !== undefined && async !== null) { - queryParameters = queryParameters.set('async', async); - } - if (assignInactive !== undefined && assignInactive !== null) { - queryParameters = queryParameters.set('assignInactive', assignInactive); - } - if (autoAssignSubgroups !== undefined && autoAssignSubgroups !== null) { - queryParameters = queryParameters.set('autoAssignSubgroups', autoAssignSubgroups); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/assignGroupToResource`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Assigns a group to resources. Check if attributes for each member from group are valid. Fill members\' attributes with missing values. Work in sync/async mode. Provide options for creating inactive or automatic subgroups group-resource assignments. - * @param group id of Group - * @param resources list of Resource ids List<Integer> - * @param async asynchronous flag, if set to true, some operation will be performed asynchronously - * @param assignInactive flag, if set to true, group-resource assignment will have status INACTIVE - * @param autoAssignSubgroups flag, if set to true, subgroups are assigned to resource as well - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public assignGroupToResources(group: number, resources: Array, async?: boolean, assignInactive?: boolean, autoAssignSubgroups?: boolean, observe?: 'body', reportProgress?: boolean): Observable; - public assignGroupToResources(group: number, resources: Array, async?: boolean, assignInactive?: boolean, autoAssignSubgroups?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; - public assignGroupToResources(group: number, resources: Array, async?: boolean, assignInactive?: boolean, autoAssignSubgroups?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; - public assignGroupToResources(group: number, resources: Array, async?: boolean, assignInactive?: boolean, autoAssignSubgroups?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling assignGroupToResources.'); - } - if (resources === null || resources === undefined) { - throw new Error('Required parameter resources was null or undefined when calling assignGroupToResources.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (resources) { - resources.forEach((element) => { - queryParameters = queryParameters.append('resources[]', element); - }) - } - if (async !== undefined && async !== null) { - queryParameters = queryParameters.set('async', async); - } - if (assignInactive !== undefined && assignInactive !== null) { - queryParameters = queryParameters.set('assignInactive', assignInactive); - } - if (autoAssignSubgroups !== undefined && autoAssignSubgroups !== null) { - queryParameters = queryParameters.set('autoAssignSubgroups', autoAssignSubgroups); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/assignGroupToResources`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Assigns groups to a resource. Check if attributes for each member from groups are valid. Fill members\' attributes with missing values. Work in sync/async mode. Provide options for creating inactive or automatic subgroups group-resource assignments. - * @param groups list of Group ids List<Integer> - * @param resource id of Resource - * @param async asynchronous flag, if set to true, some operation will be performed asynchronously - * @param assignInactive flag, if set to true, group-resource assignment will have status INACTIVE - * @param autoAssignSubgroups flag, if set to true, subgroups are assigned to resource as well - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public assignGroupsToResource(groups: Array, resource: number, async?: boolean, assignInactive?: boolean, autoAssignSubgroups?: boolean, observe?: 'body', reportProgress?: boolean): Observable; - public assignGroupsToResource(groups: Array, resource: number, async?: boolean, assignInactive?: boolean, autoAssignSubgroups?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; - public assignGroupsToResource(groups: Array, resource: number, async?: boolean, assignInactive?: boolean, autoAssignSubgroups?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; - public assignGroupsToResource(groups: Array, resource: number, async?: boolean, assignInactive?: boolean, autoAssignSubgroups?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (groups === null || groups === undefined) { - throw new Error('Required parameter groups was null or undefined when calling assignGroupsToResource.'); - } - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling assignGroupsToResource.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (groups) { - groups.forEach((element) => { - queryParameters = queryParameters.append('groups[]', element); - }) - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (async !== undefined && async !== null) { - queryParameters = queryParameters.set('async', async); - } - if (assignInactive !== undefined && assignInactive !== null) { - queryParameters = queryParameters.set('assignInactive', assignInactive); - } - if (autoAssignSubgroups !== undefined && autoAssignSubgroups !== null) { - queryParameters = queryParameters.set('autoAssignSubgroups', autoAssignSubgroups); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/assignGroupsToResource`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Assigns ResourceRag to resource. The ResourceTag must contain its id, voId and tagName. - * @param inputAssignResourceTagToResource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public assignResourceTagToResource(inputAssignResourceTagToResource: InputAssignResourceTagToResource, observe?: 'body', reportProgress?: boolean): Observable; - public assignResourceTagToResource(inputAssignResourceTagToResource: InputAssignResourceTagToResource, observe?: 'response', reportProgress?: boolean): Observable>; - public assignResourceTagToResource(inputAssignResourceTagToResource: InputAssignResourceTagToResource, observe?: 'events', reportProgress?: boolean): Observable>; - public assignResourceTagToResource(inputAssignResourceTagToResource: InputAssignResourceTagToResource, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputAssignResourceTagToResource === null || inputAssignResourceTagToResource === undefined) { - throw new Error('Required parameter inputAssignResourceTagToResource was null or undefined when calling assignResourceTagToResource.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/resourcesManager/assignResourceTagToResource`, - inputAssignResourceTagToResource, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Assigns service to resource. - * @param resource id of Resource - * @param service id of Service - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public assignService(resource: number, service: number, observe?: 'body', reportProgress?: boolean): Observable; - public assignService(resource: number, service: number, observe?: 'response', reportProgress?: boolean): Observable>; - public assignService(resource: number, service: number, observe?: 'events', reportProgress?: boolean): Observable>; - public assignService(resource: number, service: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling assignService.'); - } - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling assignService.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/assignService`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Assigns services to resource. - * @param resource id of Resource - * @param services list of Service ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public assignServices(resource: number, services: Array, observe?: 'body', reportProgress?: boolean): Observable; - public assignServices(resource: number, services: Array, observe?: 'response', reportProgress?: boolean): Observable>; - public assignServices(resource: number, services: Array, observe?: 'events', reportProgress?: boolean): Observable>; - public assignServices(resource: number, services: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling assignServices.'); - } - if (services === null || services === undefined) { - throw new Error('Required parameter services was null or undefined when calling assignServices.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (services) { - services.forEach((element) => { - queryParameters = queryParameters.append('services[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/assignServices`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Assign all services from a services package to a resource. - * @param resource id of Resource - * @param servicesPackage id of ServicesPackage - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public assignServicesPackage(resource: number, servicesPackage: number, observe?: 'body', reportProgress?: boolean): Observable; - public assignServicesPackage(resource: number, servicesPackage: number, observe?: 'response', reportProgress?: boolean): Observable>; - public assignServicesPackage(resource: number, servicesPackage: number, observe?: 'events', reportProgress?: boolean): Observable>; - public assignServicesPackage(resource: number, servicesPackage: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling assignServicesPackage.'); - } - if (servicesPackage === null || servicesPackage === undefined) { - throw new Error('Required parameter servicesPackage was null or undefined when calling assignServicesPackage.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (servicesPackage !== undefined && servicesPackage !== null) { - queryParameters = queryParameters.set('servicesPackage', servicesPackage); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/assignServicesPackage`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Copy \"template\" settings from user\'s another existing resource and create new resource with this template. The settings are attributes, services, tags (if exists), groups and their members (if the resources are from the same VO and withGroups is true) Template Resource can be from any of user\'s facilities. - * @param inputCopyResource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public copyResource(inputCopyResource: InputCopyResource, observe?: 'body', reportProgress?: boolean): Observable; - public copyResource(inputCopyResource: InputCopyResource, observe?: 'response', reportProgress?: boolean): Observable>; - public copyResource(inputCopyResource: InputCopyResource, observe?: 'events', reportProgress?: boolean): Observable>; - public copyResource(inputCopyResource: InputCopyResource, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputCopyResource === null || inputCopyResource === undefined) { - throw new Error('Required parameter inputCopyResource was null or undefined when calling copyResource.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/resourcesManager/copyResource`, - inputCopyResource, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Creates a new resource. - * @param vo id of Vo - * @param facility id of Facility - * @param name name of entity - * @param description optional resource description - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createResource(vo: number, facility: number, name: string, description?: string, observe?: 'body', reportProgress?: boolean): Observable; - public createResource(vo: number, facility: number, name: string, description?: string, observe?: 'response', reportProgress?: boolean): Observable>; - public createResource(vo: number, facility: number, name: string, description?: string, observe?: 'events', reportProgress?: boolean): Observable>; - public createResource(vo: number, facility: number, name: string, description?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling createResource.'); - } - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling createResource.'); - } - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling createResource.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (name !== undefined && name !== null) { - queryParameters = queryParameters.set('name', name); - } - if (description !== undefined && description !== null) { - queryParameters = queryParameters.set('description', description); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/createResource`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Create new resource tag in VO - * @param inputCreateResourceTagWithResourceTag - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createResourceTagWithResourceTag(inputCreateResourceTagWithResourceTag: InputCreateResourceTagWithResourceTag, observe?: 'body', reportProgress?: boolean): Observable; - public createResourceTagWithResourceTag(inputCreateResourceTagWithResourceTag: InputCreateResourceTagWithResourceTag, observe?: 'response', reportProgress?: boolean): Observable>; - public createResourceTagWithResourceTag(inputCreateResourceTagWithResourceTag: InputCreateResourceTagWithResourceTag, observe?: 'events', reportProgress?: boolean): Observable>; - public createResourceTagWithResourceTag(inputCreateResourceTagWithResourceTag: InputCreateResourceTagWithResourceTag, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputCreateResourceTagWithResourceTag === null || inputCreateResourceTagWithResourceTag === undefined) { - throw new Error('Required parameter inputCreateResourceTagWithResourceTag was null or undefined when calling createResourceTagWithResourceTag.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/resourcesManager/createResourceTag/resourceTag`, - inputCreateResourceTagWithResourceTag, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Create new resource tag defined by tag name in VO - * @param tagName tagName - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createResourceTagWithTagName(tagName: string, vo: number, observe?: 'body', reportProgress?: boolean): Observable; - public createResourceTagWithTagName(tagName: string, vo: number, observe?: 'response', reportProgress?: boolean): Observable>; - public createResourceTagWithTagName(tagName: string, vo: number, observe?: 'events', reportProgress?: boolean): Observable>; - public createResourceTagWithTagName(tagName: string, vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (tagName === null || tagName === undefined) { - throw new Error('Required parameter tagName was null or undefined when calling createResourceTagWithTagName.'); - } - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling createResourceTagWithTagName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (tagName !== undefined && tagName !== null) { - queryParameters = queryParameters.set('tagName', tagName); - } - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/createResourceTag/tagName`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Deactivates the group-resource assignment. The assignment will become INACTIVE and will not be used to allow users from the given group to the resource. - * @param group id of Group - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deactivateGroupResourceAssignment(group: number, resource: number, observe?: 'body', reportProgress?: boolean): Observable; - public deactivateGroupResourceAssignment(group: number, resource: number, observe?: 'response', reportProgress?: boolean): Observable>; - public deactivateGroupResourceAssignment(group: number, resource: number, observe?: 'events', reportProgress?: boolean): Observable>; - public deactivateGroupResourceAssignment(group: number, resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling deactivateGroupResourceAssignment.'); - } - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling deactivateGroupResourceAssignment.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/deactivateGroupResourceAssignment`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Deletes all VO resources - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteAllResources(vo: number, observe?: 'body', reportProgress?: boolean): Observable; - public deleteAllResources(vo: number, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteAllResources(vo: number, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteAllResources(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling deleteAllResources.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/deleteAllResources`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Delete all resources tags of VO - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteAllResourcesTagsForVo(vo: number, observe?: 'body', reportProgress?: boolean): Observable; - public deleteAllResourcesTagsForVo(vo: number, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteAllResourcesTagsForVo(vo: number, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteAllResourcesTagsForVo(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling deleteAllResourcesTagsForVo.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/deleteAllResourcesTagsForVo`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Deletes a resource. - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteResource(resource: number, observe?: 'body', reportProgress?: boolean): Observable; - public deleteResource(resource: number, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteResource(resource: number, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteResource(resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling deleteResource.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/deleteResource`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Delete resource tag by it\'s id and VO_ID - * @param inputDeleteResourceTag - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteResourceTag(inputDeleteResourceTag: InputDeleteResourceTag, observe?: 'body', reportProgress?: boolean): Observable; - public deleteResourceTag(inputDeleteResourceTag: InputDeleteResourceTag, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteResourceTag(inputDeleteResourceTag: InputDeleteResourceTag, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteResourceTag(inputDeleteResourceTag: InputDeleteResourceTag, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputDeleteResourceTag === null || inputDeleteResourceTag === undefined) { - throw new Error('Required parameter inputDeleteResourceTag was null or undefined when calling deleteResourceTag.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/resourcesManager/deleteResourceTag`, - inputDeleteResourceTag, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all Resource group admins. - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAdminGroups(resource: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAdminGroups(resource: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAdminGroups(resource: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAdminGroups(resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getAdminGroups.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getAdminGroups`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get list of all resource administrators for supported role and given resource. - * If onlyDirectAdmins is == true, return only direct admins of the group for supported role. Otherwise include users who are VALID members of administrator groups. Supported roles are ResourceAdmin, VOAdmin. - * @param resource id of Resource - * @param onlyDirectAdmins boolean if true, get only direct resource administrators (if false, get both direct and indirect) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAdmins(resource: number, onlyDirectAdmins: boolean, observe?: 'body', reportProgress?: boolean): Observable>; - public getAdmins(resource: number, onlyDirectAdmins: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAdmins(resource: number, onlyDirectAdmins: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAdmins(resource: number, onlyDirectAdmins: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getAdmins.'); - } - if (onlyDirectAdmins === null || onlyDirectAdmins === undefined) { - throw new Error('Required parameter onlyDirectAdmins was null or undefined when calling getAdmins.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (onlyDirectAdmins !== undefined && onlyDirectAdmins !== null) { - queryParameters = queryParameters.set('onlyDirectAdmins', onlyDirectAdmins); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getAdmins`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all resources with the specific tag assigned. - * @param inputGetAllResourcesByResourceTag - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllResourcesByResourceTag(inputGetAllResourcesByResourceTag: InputGetAllResourcesByResourceTag, observe?: 'body', reportProgress?: boolean): Observable>; - public getAllResourcesByResourceTag(inputGetAllResourcesByResourceTag: InputGetAllResourcesByResourceTag, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllResourcesByResourceTag(inputGetAllResourcesByResourceTag: InputGetAllResourcesByResourceTag, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllResourcesByResourceTag(inputGetAllResourcesByResourceTag: InputGetAllResourcesByResourceTag, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputGetAllResourcesByResourceTag === null || inputGetAllResourcesByResourceTag === undefined) { - throw new Error('Required parameter inputGetAllResourcesByResourceTag was null or undefined when calling getAllResourcesByResourceTag.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post>(`${this.configuration.basePath}/json/resourcesManager/getAllResourcesByResourceTag`, - inputGetAllResourcesByResourceTag, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Gets all resource tags of Resource. - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllResourcesTagsForResource(resource: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAllResourcesTagsForResource(resource: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllResourcesTagsForResource(resource: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllResourcesTagsForResource(resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getAllResourcesTagsForResource.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getAllResourcesTagsForResource`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Gets all resource tags of VO. - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllResourcesTagsForVo(vo: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAllResourcesTagsForVo(vo: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllResourcesTagsForVo(vo: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllResourcesTagsForVo(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getAllResourcesTagsForVo.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getAllResourcesTagsForVo`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns list of Resources, where the user is an Administrator. - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllResourcesWhereUserIsAdmin(user: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAllResourcesWhereUserIsAdmin(user: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllResourcesWhereUserIsAdmin(user: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllResourcesWhereUserIsAdmin(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getAllResourcesWhereUserIsAdmin.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getResourcesWhereUserIsAdmin/all`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns all members assigned to the resource. - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllowedMembers(resource: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAllowedMembers(resource: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllowedMembers(resource: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllowedMembers(resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getAllowedMembers.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getAllowedMembers`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all resources which have the member access on. - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllowedResources(member: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAllowedResources(member: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllowedResources(member: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllowedResources(member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getAllowedResources.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getAllowedResources`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns all users assigned to the resource. - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllowedUsersOfResource(resource: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAllowedUsersOfResource(resource: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllowedUsersOfResource(resource: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllowedUsersOfResource(resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getAllowedUsersOfResource.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getAllowedUsers`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * List all groups associated with the resource and optionally a member. - * @param resource id of Resource - * @param member optional member id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedGroups(resource: number, member?: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAssignedGroups(resource: number, member?: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAssignedGroups(resource: number, member?: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAssignedGroups(resource: number, member?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getAssignedGroups.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getAssignedGroups`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns all members assigned to the resource. - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedMembers(resource: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAssignedMembers(resource: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAssignedMembers(resource: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAssignedMembers(resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getAssignedMembers.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getAssignedMembers`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns members of groups assigned to resource with status of group-resource assignment. - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedMembersWithStatus(resource: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAssignedMembersWithStatus(resource: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAssignedMembersWithStatus(resource: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAssignedMembersWithStatus(resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getAssignedMembersWithStatus.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getAssignedMembersWithStatus`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * List all resources to which the group is assigned. - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedResourcesWithGroup(group: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAssignedResourcesWithGroup(group: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAssignedResourcesWithGroup(group: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAssignedResourcesWithGroup(group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getAssignedResourcesWithGroup.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getAssignedResources/g`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * List all resources associated with a member\'s group. - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedResourcesWithMember(member: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAssignedResourcesWithMember(member: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAssignedResourcesWithMember(member: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAssignedResourcesWithMember(member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getAssignedResourcesWithMember.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getAssignedResources/m`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns all assigned resources with statuses where member is assigned through the groups. - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedResourcesWithStatus(member: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAssignedResourcesWithStatus(member: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAssignedResourcesWithStatus(member: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAssignedResourcesWithStatus(member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getAssignedResourcesWithStatus.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getAssignedResourcesWithStatus`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns all members assigned to the resource as RichMembers. - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedRichMembers(resource: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAssignedRichMembers(resource: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAssignedRichMembers(resource: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAssignedRichMembers(resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getAssignedRichMembers.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getAssignedRichMembers`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * List all rich resources associated with a group. - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedRichResourcesWithGroup(group: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAssignedRichResourcesWithGroup(group: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAssignedRichResourcesWithGroup(group: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAssignedRichResourcesWithGroup(group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getAssignedRichResourcesWithGroup.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getAssignedRichResources/g`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * List all rich resources associated with a member\'s group. - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedRichResourcesWithMember(member: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAssignedRichResourcesWithMember(member: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAssignedRichResourcesWithMember(member: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAssignedRichResourcesWithMember(member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getAssignedRichResourcesWithMember.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getAssignedRichResources/m`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all rich resources where the service and the member are assigned with facility property filled. - * @param member id of Member - * @param service id of Service - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedRichResourcesWithMemberService(member: number, service: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAssignedRichResourcesWithMemberService(member: number, service: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAssignedRichResourcesWithMemberService(member: number, service: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAssignedRichResourcesWithMemberService(member: number, service: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getAssignedRichResourcesWithMemberService.'); - } - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling getAssignedRichResourcesWithMemberService.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getAssignedRichResources/s-m`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * List all services associated with the resource. - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedServicesToResource(resource: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAssignedServicesToResource(resource: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAssignedServicesToResource(resource: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAssignedServicesToResource(resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getAssignedServicesToResource.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getAssignedServices`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all bans for member on any resource. - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getBansForMember(member: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getBansForMember(member: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getBansForMember(member: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getBansForMember(member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getBansForMember.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getBansForMember`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all bans for members on the resource. - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getBansForResource(resource: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getBansForResource(resource: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getBansForResource(resource: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getBansForResource(resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getBansForResource.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getBansForResource`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Find resource for given id and returns it with given attributes. If attrNames are null or empty, all resource attributes are returned. - * @param id numeric id - * @param attrNames list of attribute names List<String> or null - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getEnrichedResourceById(id: number, attrNames?: Array, observe?: 'body', reportProgress?: boolean): Observable; - public getEnrichedResourceById(id: number, attrNames?: Array, observe?: 'response', reportProgress?: boolean): Observable>; - public getEnrichedResourceById(id: number, attrNames?: Array, observe?: 'events', reportProgress?: boolean): Observable>; - public getEnrichedResourceById(id: number, attrNames?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getEnrichedResourceById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/resourcesManager/getEnrichedResourceById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Find resources for given facility and attributes for given names. If the attrNames are empty or null, return all attributes. - * @param facility id of Facility - * @param attrNames list of attribute names List<String> or null - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getEnrichedResourcesForFacility(facility: number, attrNames?: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getEnrichedResourcesForFacility(facility: number, attrNames?: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getEnrichedResourcesForFacility(facility: number, attrNames?: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getEnrichedResourcesForFacility(facility: number, attrNames?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getEnrichedResourcesForFacility.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getEnrichedResourcesForFacility`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Find resources for given vo and attributes for given names. If the attrNames are empty or null, return all attributes. - * @param vo id of Vo - * @param attrNames list of attribute names List<String> or null - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getEnrichedResourcesForVo(vo: number, attrNames?: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getEnrichedResourcesForVo(vo: number, attrNames?: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getEnrichedResourcesForVo(vo: number, attrNames?: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getEnrichedResourcesForVo(vo: number, attrNames?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getEnrichedResourcesForVo.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getEnrichedResourcesForVo`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get facility which belongs to a specific resource. - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacility(resource: number, observe?: 'body', reportProgress?: boolean): Observable; - public getFacility(resource: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getFacility(resource: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getFacility(resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getFacility.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/resourcesManager/getFacility`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Lists all of the assigned groups for the given resource. Also, returns specified attributes for the groups. - * @param resource id of Resource - * @param attrNames list of attribute names List<String> or null - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupAssignments(resource: number, attrNames?: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getGroupAssignments(resource: number, attrNames?: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getGroupAssignments(resource: number, attrNames?: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getGroupAssignments(resource: number, attrNames?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getGroupAssignments.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getGroupAssignments`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Lists all of the resource assignments for the given group. Also, returns specified attributes for the resources and resource tags. - * @param group id of Group - * @param attrNames list of attribute names List<String> or null - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourceAssignments(group: number, attrNames?: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getResourceAssignments(group: number, attrNames?: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getResourceAssignments(group: number, attrNames?: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getResourceAssignments(group: number, attrNames?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getResourceAssignments.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getResourceAssignments`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get ban by memberId and resource id. - * @param member id of Member - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourceBan(member: number, resource: number, observe?: 'body', reportProgress?: boolean): Observable; - public getResourceBan(member: number, resource: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getResourceBan(member: number, resource: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getResourceBan(member: number, resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getResourceBan.'); - } - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getResourceBan.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/resourcesManager/getBan`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get Ban for member on resource by it\'s id. - * @param banId BanOnResource id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourceBanById(banId: number, observe?: 'body', reportProgress?: boolean): Observable; - public getResourceBanById(banId: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getResourceBanById(banId: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getResourceBanById(banId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (banId === null || banId === undefined) { - throw new Error('Required parameter banId was null or undefined when calling getResourceBanById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (banId !== undefined && banId !== null) { - queryParameters = queryParameters.set('banId', banId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/resourcesManager/getBanById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns a resource by id. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourceById(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public getResourceById(id: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getResourceById(id: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getResourceById(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getResourceById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/resourcesManager/getResourceById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns resource by its name, Vo id and Facility id. - * @param vo id of Vo - * @param facility id of Facility - * @param name name of entity - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourceByName(vo: number, facility: number, name: string, observe?: 'body', reportProgress?: boolean): Observable; - public getResourceByName(vo: number, facility: number, name: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getResourceByName(vo: number, facility: number, name: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getResourceByName(vo: number, facility: number, name: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getResourceByName.'); - } - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getResourceByName.'); - } - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling getResourceByName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (name !== undefined && name !== null) { - queryParameters = queryParameters.set('name', name); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/resourcesManager/getResourceByName`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all VO resources. - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResources(vo: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getResources(vo: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getResources(vo: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getResources(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getResources.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getResources`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns list of Resources by their ids. - * @param ids list of ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourcesByIds(ids: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getResourcesByIds(ids: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getResourcesByIds(ids: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getResourcesByIds(ids: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (ids === null || ids === undefined) { - throw new Error('Required parameter ids was null or undefined when calling getResourcesByIds.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (ids) { - ids.forEach((element) => { - queryParameters = queryParameters.append('ids[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getResourcesByIds`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Gets count of all users. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourcesCountForAll(observe?: 'body', reportProgress?: boolean): Observable; - public getResourcesCountForAll(observe?: 'response', reportProgress?: boolean): Observable>; - public getResourcesCountForAll(observe?: 'events', reportProgress?: boolean): Observable>; - public getResourcesCountForAll(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/resourcesManager/getResourcesCount/all`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns number of VO resources - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourcesCountForVo(vo: number, observe?: 'body', reportProgress?: boolean): Observable; - public getResourcesCountForVo(vo: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getResourcesCountForVo(vo: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getResourcesCountForVo(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getResourcesCountForVo.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/resourcesManager/getResourcesCount/vo`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns list of Resources for specified VO, where the user is an Administrator. - * @param vo id of Vo - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourcesFromVoWhereUserIsAdmin(vo: number, user: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getResourcesFromVoWhereUserIsAdmin(vo: number, user: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getResourcesFromVoWhereUserIsAdmin(vo: number, user: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getResourcesFromVoWhereUserIsAdmin(vo: number, user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getResourcesFromVoWhereUserIsAdmin.'); - } - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getResourcesFromVoWhereUserIsAdmin.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getResourcesWhereUserIsAdmin/fromVo`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns list of Resources for specified VO and Facility, where the group is an Administrator. - * @param facility id of Facility - * @param vo id of Vo - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourcesWhereGroupIsAdmin(facility: number, vo: number, group: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getResourcesWhereGroupIsAdmin(facility: number, vo: number, group: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getResourcesWhereGroupIsAdmin(facility: number, vo: number, group: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getResourcesWhereGroupIsAdmin(facility: number, vo: number, group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getResourcesWhereGroupIsAdmin.'); - } - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getResourcesWhereGroupIsAdmin.'); - } - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getResourcesWhereGroupIsAdmin.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getResourcesWhereUserIsAdmin/group`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns list of Resources for specified VO and Facility, where the user is a direct Administrator or a VALID member of an administrator group. - * @param facility id of Facility - * @param vo id of Vo - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getResourcesWhereUserIsAdmin(facility: number, vo: number, user: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getResourcesWhereUserIsAdmin(facility: number, vo: number, user: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getResourcesWhereUserIsAdmin(facility: number, vo: number, user: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getResourcesWhereUserIsAdmin(facility: number, vo: number, user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getResourcesWhereUserIsAdmin.'); - } - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getResourcesWhereUserIsAdmin.'); - } - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getResourcesWhereUserIsAdmin.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getResourcesWhereUserIsAdmin`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get list of all richUser administrators for the resource and supported role with specific attributes. If some group is administrator of the given group, all VALID members are included in the list. Supported roles: ResourceAdmin, VOAdmin If \"onlyDirectAdmins\" is true, return only direct admins of the resource for supported role with specific attributes. If \"allUserAttributes\" is true, do not specify attributes through list and return them all in objects richUser. Ignoring list of specific attributes. - * @param resource id of Resource - * @param specificAttributes list of specified attributes which are needed in object richUser - * @param allUserAttributes if == true, get all possible user attributes and ignore list of specificAttributes (if false, get only specific attributes) - * @param onlyDirectAdmins if == true, get only direct resource administrators (if false, get both direct and indirect) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRichAdmins(resource: number, specificAttributes: Array, allUserAttributes: boolean, onlyDirectAdmins: boolean, observe?: 'body', reportProgress?: boolean): Observable>; - public getRichAdmins(resource: number, specificAttributes: Array, allUserAttributes: boolean, onlyDirectAdmins: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; - public getRichAdmins(resource: number, specificAttributes: Array, allUserAttributes: boolean, onlyDirectAdmins: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; - public getRichAdmins(resource: number, specificAttributes: Array, allUserAttributes: boolean, onlyDirectAdmins: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getRichAdmins.'); - } - if (specificAttributes === null || specificAttributes === undefined) { - throw new Error('Required parameter specificAttributes was null or undefined when calling getRichAdmins.'); - } - if (allUserAttributes === null || allUserAttributes === undefined) { - throw new Error('Required parameter allUserAttributes was null or undefined when calling getRichAdmins.'); - } - if (onlyDirectAdmins === null || onlyDirectAdmins === undefined) { - throw new Error('Required parameter onlyDirectAdmins was null or undefined when calling getRichAdmins.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (specificAttributes) { - specificAttributes.forEach((element) => { - queryParameters = queryParameters.append('specificAttributes', element); - }) - } - if (allUserAttributes !== undefined && allUserAttributes !== null) { - queryParameters = queryParameters.set('allUserAttributes', allUserAttributes); - } - if (onlyDirectAdmins !== undefined && onlyDirectAdmins !== null) { - queryParameters = queryParameters.set('onlyDirectAdmins', onlyDirectAdmins); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getRichAdmins`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns RichResource by id (also containing facility and VO inside). - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRichResourceById(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public getRichResourceById(id: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getRichResourceById(id: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getRichResourceById(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getRichResourceById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/resourcesManager/getRichResourceById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all VO rich resources. - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRichResources(vo: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getRichResources(vo: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getRichResources(vo: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getRichResources(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getRichResources.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getRichResources`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns list of RichResources by their ids. - * @param ids list of ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRichResourcesByIds(ids: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getRichResourcesByIds(ids: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getRichResourcesByIds(ids: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getRichResourcesByIds(ids: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (ids === null || ids === undefined) { - throw new Error('Required parameter ids was null or undefined when calling getRichResourcesByIds.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (ids) { - ids.forEach((element) => { - queryParameters = queryParameters.append('ids[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/resourcesManager/getRichResourcesByIds`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns Vo which is tied to a specific resource. - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVo(resource: number, observe?: 'body', reportProgress?: boolean): Observable; - public getVo(resource: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getVo(resource: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getVo(resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getVo.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/resourcesManager/getVo`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Removes all resources tags from a resource. - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeAllResourceTagsFromResource(resource: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeAllResourceTagsFromResource(resource: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeAllResourceTagsFromResource(resource: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeAllResourceTagsFromResource(resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling removeAllResourceTagsFromResource.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/removeAllResourcesTagFromResource`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove specific ban by memberId and resourceId. - * @param member id of Member - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeBanByMemberAndResource(member: number, resource: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeBanByMemberAndResource(member: number, resource: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeBanByMemberAndResource(member: number, resource: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeBanByMemberAndResource(member: number, resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling removeBanByMemberAndResource.'); - } - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling removeBanByMemberAndResource.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/removeBan/member-resource-id`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Removes a group administrator of the Resource. - * @param resource id of Resource - * @param authorizedGroup Group id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeGroupAdminResource(resource: number, authorizedGroup: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeGroupAdminResource(resource: number, authorizedGroup: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeGroupAdminResource(resource: number, authorizedGroup: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeGroupAdminResource(resource: number, authorizedGroup: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling removeGroupAdminResource.'); - } - if (authorizedGroup === null || authorizedGroup === undefined) { - throw new Error('Required parameter authorizedGroup was null or undefined when calling removeGroupAdminResource.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (authorizedGroup !== undefined && authorizedGroup !== null) { - queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/removeAdmin/r-g`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove a group from a resource. After removing, check attributes and fix them if it is needed. - * @param group id of Group - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeGroupFromResource(group: number, resource: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeGroupFromResource(group: number, resource: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeGroupFromResource(group: number, resource: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeGroupFromResource(group: number, resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling removeGroupFromResource.'); - } - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling removeGroupFromResource.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/removeGroupFromResource`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove a group from resource. After removing, check attributes and fix them if it is needed. - * @param group id of Group - * @param resources list of Resource ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeGroupFromResources(group: number, resources: Array, observe?: 'body', reportProgress?: boolean): Observable; - public removeGroupFromResources(group: number, resources: Array, observe?: 'response', reportProgress?: boolean): Observable>; - public removeGroupFromResources(group: number, resources: Array, observe?: 'events', reportProgress?: boolean): Observable>; - public removeGroupFromResources(group: number, resources: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling removeGroupFromResources.'); - } - if (resources === null || resources === undefined) { - throw new Error('Required parameter resources was null or undefined when calling removeGroupFromResources.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (resources) { - resources.forEach((element) => { - queryParameters = queryParameters.append('resources[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/removeGroupFromResources`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove groups from a resource. After removing, check attributes and fix them if it is needed. - * @param groups list of Group ids List<Integer> - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeGroupsFromResource(groups: Array, resource: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeGroupsFromResource(groups: Array, resource: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeGroupsFromResource(groups: Array, resource: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeGroupsFromResource(groups: Array, resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (groups === null || groups === undefined) { - throw new Error('Required parameter groups was null or undefined when calling removeGroupsFromResource.'); - } - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling removeGroupsFromResource.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (groups) { - groups.forEach((element) => { - queryParameters = queryParameters.append('groups[]', element); - }) - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/removeGroupsFromResource`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove specific ban by it\'s id. - * @param banId BanOnResource id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeResourceBanById(banId: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeResourceBanById(banId: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeResourceBanById(banId: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeResourceBanById(banId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (banId === null || banId === undefined) { - throw new Error('Required parameter banId was null or undefined when calling removeResourceBanById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (banId !== undefined && banId !== null) { - queryParameters = queryParameters.set('banId', banId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/removeBan/id`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Unset ResourceSelfService role to given group for given resource. - * @param resource id of Resource - * @param group id of Group - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeResourceSelfServiceGroup(resource: number, group: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeResourceSelfServiceGroup(resource: number, group: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeResourceSelfServiceGroup(resource: number, group: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeResourceSelfServiceGroup(resource: number, group: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling removeResourceSelfServiceGroup.'); - } - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling removeResourceSelfServiceGroup.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/removeResourceSelfServiceGroup`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Unset ResourceSelfService role to given user for given resource. - * @param resource id of Resource - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeResourceSelfServiceUser(resource: number, user: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeResourceSelfServiceUser(resource: number, user: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeResourceSelfServiceUser(resource: number, user: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeResourceSelfServiceUser(resource: number, user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling removeResourceSelfServiceUser.'); - } - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling removeResourceSelfServiceUser.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/removeResourceSelfServiceUser`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Removes ResourceRag from a resource. The ResourceTag must contain its id, voId and tagName. - * @param inputRemoveResourceTagFromResource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeResourceTagFromResource(inputRemoveResourceTagFromResource: InputRemoveResourceTagFromResource, observe?: 'body', reportProgress?: boolean): Observable; - public removeResourceTagFromResource(inputRemoveResourceTagFromResource: InputRemoveResourceTagFromResource, observe?: 'response', reportProgress?: boolean): Observable>; - public removeResourceTagFromResource(inputRemoveResourceTagFromResource: InputRemoveResourceTagFromResource, observe?: 'events', reportProgress?: boolean): Observable>; - public removeResourceTagFromResource(inputRemoveResourceTagFromResource: InputRemoveResourceTagFromResource, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputRemoveResourceTagFromResource === null || inputRemoveResourceTagFromResource === undefined) { - throw new Error('Required parameter inputRemoveResourceTagFromResource was null or undefined when calling removeResourceTagFromResource.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/resourcesManager/removeResourceTagFromResource`, - inputRemoveResourceTagFromResource, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Removes a service from a resource. - * @param resource id of Resource - * @param service id of Service - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeService(resource: number, service: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeService(resource: number, service: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeService(resource: number, service: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeService(resource: number, service: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling removeService.'); - } - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling removeService.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/removeService`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Removes services from a resource. - * @param resource id of Resource - * @param services list of Service ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeServices(resource: number, services: Array, observe?: 'body', reportProgress?: boolean): Observable; - public removeServices(resource: number, services: Array, observe?: 'response', reportProgress?: boolean): Observable>; - public removeServices(resource: number, services: Array, observe?: 'events', reportProgress?: boolean): Observable>; - public removeServices(resource: number, services: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling removeServices.'); - } - if (services === null || services === undefined) { - throw new Error('Required parameter services was null or undefined when calling removeServices.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (services) { - services.forEach((element) => { - queryParameters = queryParameters.append('services[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/removeServices`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove from resource all services from services package. - * @param resource id of Resource - * @param servicesPackage id of ServicesPackage - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeServicesPackage(resource: number, servicesPackage: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeServicesPackage(resource: number, servicesPackage: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeServicesPackage(resource: number, servicesPackage: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeServicesPackage(resource: number, servicesPackage: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling removeServicesPackage.'); - } - if (servicesPackage === null || servicesPackage === undefined) { - throw new Error('Required parameter servicesPackage was null or undefined when calling removeServicesPackage.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (servicesPackage !== undefined && servicesPackage !== null) { - queryParameters = queryParameters.set('servicesPackage', servicesPackage); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/removeServicesPackage`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Removes a Resource admin. - * @param resource id of Resource - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeUserAdminResource(resource: number, user: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeUserAdminResource(resource: number, user: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeUserAdminResource(resource: number, user: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeUserAdminResource(resource: number, user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling removeUserAdminResource.'); - } - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling removeUserAdminResource.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/removeAdmin/r-u`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Set ban for member on resource. - * @param inputSetBan - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setResourceBan(inputSetBan: InputSetBan, observe?: 'body', reportProgress?: boolean): Observable; - public setResourceBan(inputSetBan: InputSetBan, observe?: 'response', reportProgress?: boolean): Observable>; - public setResourceBan(inputSetBan: InputSetBan, observe?: 'events', reportProgress?: boolean): Observable>; - public setResourceBan(inputSetBan: InputSetBan, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetBan === null || inputSetBan === undefined) { - throw new Error('Required parameter inputSetBan was null or undefined when calling setResourceBan.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/resourcesManager/setBan`, - inputSetBan, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Unassigns given groups from the given resources. - * @param groups list of Group ids List<Integer> - * @param resources list of Resource ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public unallowGroupsFromResources(groups: Array, resources: Array, observe?: 'body', reportProgress?: boolean): Observable; - public unallowGroupsFromResources(groups: Array, resources: Array, observe?: 'response', reportProgress?: boolean): Observable>; - public unallowGroupsFromResources(groups: Array, resources: Array, observe?: 'events', reportProgress?: boolean): Observable>; - public unallowGroupsFromResources(groups: Array, resources: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (groups === null || groups === undefined) { - throw new Error('Required parameter groups was null or undefined when calling unallowGroupsFromResources.'); - } - if (resources === null || resources === undefined) { - throw new Error('Required parameter resources was null or undefined when calling unallowGroupsFromResources.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (groups) { - groups.forEach((element) => { - queryParameters = queryParameters.append('groups[]', element); - }) - } - if (resources) { - resources.forEach((element) => { - queryParameters = queryParameters.append('resources[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/resourcesManager/unallowGroupsFromResources`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Updates a resource. - * @param inputUpdateResource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateResource(inputUpdateResource: InputUpdateResource, observe?: 'body', reportProgress?: boolean): Observable; - public updateResource(inputUpdateResource: InputUpdateResource, observe?: 'response', reportProgress?: boolean): Observable>; - public updateResource(inputUpdateResource: InputUpdateResource, observe?: 'events', reportProgress?: boolean): Observable>; - public updateResource(inputUpdateResource: InputUpdateResource, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputUpdateResource === null || inputUpdateResource === undefined) { - throw new Error('Required parameter inputUpdateResource was null or undefined when calling updateResource.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/resourcesManager/updateResource`, - inputUpdateResource, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Update existing ban (description, validation timestamp) - * @param inputUpdateBan - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateResourceBan(inputUpdateBan: InputUpdateBan, observe?: 'body', reportProgress?: boolean): Observable; - public updateResourceBan(inputUpdateBan: InputUpdateBan, observe?: 'response', reportProgress?: boolean): Observable>; - public updateResourceBan(inputUpdateBan: InputUpdateBan, observe?: 'events', reportProgress?: boolean): Observable>; - public updateResourceBan(inputUpdateBan: InputUpdateBan, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputUpdateBan === null || inputUpdateBan === undefined) { - throw new Error('Required parameter inputUpdateBan was null or undefined when calling updateResourceBan.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/resourcesManager/updateBan`, - inputUpdateBan, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Update resource tag name by it\'s id and VO_ID - * @param inputUpdateResourceTag - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateResourceTag(inputUpdateResourceTag: InputUpdateResourceTag, observe?: 'body', reportProgress?: boolean): Observable; - public updateResourceTag(inputUpdateResourceTag: InputUpdateResourceTag, observe?: 'response', reportProgress?: boolean): Observable>; - public updateResourceTag(inputUpdateResourceTag: InputUpdateResourceTag, observe?: 'events', reportProgress?: boolean): Observable>; - public updateResourceTag(inputUpdateResourceTag: InputUpdateResourceTag, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputUpdateResourceTag === null || inputUpdateResourceTag === undefined) { - throw new Error('Required parameter inputUpdateResourceTag was null or undefined when calling updateResourceTag.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/resourcesManager/updateResourceTag`, - inputUpdateResourceTag, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); } + return this.httpClient.post( + `${this.configuration.basePath}/json/resourcesManager/updateResourceTag`, + inputUpdateResourceTag, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } } diff --git a/libs/perun/openapi/src/lib/api/servicesManager.service.ts b/libs/perun/openapi/src/lib/api/servicesManager.service.ts index 4caf2dc82..377029e03 100644 --- a/libs/perun/openapi/src/lib/api/servicesManager.service.ts +++ b/libs/perun/openapi/src/lib/api/servicesManager.service.ts @@ -11,11 +11,17 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { Destination } from '../model/destination'; import { DestinationPropagationType } from '../model/destinationPropagationType'; @@ -35,4200 +41,5817 @@ import { ServiceAttributes } from '../model/serviceAttributes'; import { ServiceForGUI } from '../model/serviceForGUI'; import { ServicesPackage } from '../model/servicesPackage'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - - +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class ServicesManagerService { + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string, + @Optional() configuration: Configuration + ) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + /** + * Adds an destination for a facility and service. If destination doesn\'t exist it will be created. + * InvalidDestinationException is thrown when destination value is invalid in given destination type. + * @param service id of Service + * @param facility id of Facility + * @param destination Destination\'s destination, usually a DNS name + * @param type Destination\'s type + * @param propagationType Destination\'s propagationType + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addDestination( + service: number, + facility: number, + destination: string, + type: DestinationType, + propagationType?: DestinationPropagationType, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public addDestination( + service: number, + facility: number, + destination: string, + type: DestinationType, + propagationType?: DestinationPropagationType, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public addDestination( + service: number, + facility: number, + destination: string, + type: DestinationType, + propagationType?: DestinationPropagationType, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public addDestination( + service: number, + facility: number, + destination: string, + type: DestinationType, + propagationType?: DestinationPropagationType, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling addDestination.' + ); + } + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling addDestination.' + ); + } + if (destination === null || destination === undefined) { + throw new Error( + 'Required parameter destination was null or undefined when calling addDestination.' + ); + } + if (type === null || type === undefined) { + throw new Error('Required parameter type was null or undefined when calling addDestination.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (destination !== undefined && destination !== null) { + queryParameters = queryParameters.set('destination', destination); + } + if (type !== undefined && type !== null) { + queryParameters = queryParameters.set('type', type); + } + if (propagationType !== undefined && propagationType !== null) { + queryParameters = queryParameters.set('propagationType', propagationType); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/servicesManager/addDestination`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Adds an destination for a facility and list of services. If destination doesn\'t exist it will be created. InvalidDestinationException is thrown when destination value is invalid in given destination type. + * @param inputAddDestinationToMultipleServices + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addDestinationToMultipleServices( + inputAddDestinationToMultipleServices: InputAddDestinationToMultipleServices, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public addDestinationToMultipleServices( + inputAddDestinationToMultipleServices: InputAddDestinationToMultipleServices, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public addDestinationToMultipleServices( + inputAddDestinationToMultipleServices: InputAddDestinationToMultipleServices, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public addDestinationToMultipleServices( + inputAddDestinationToMultipleServices: InputAddDestinationToMultipleServices, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if ( + inputAddDestinationToMultipleServices === null || + inputAddDestinationToMultipleServices === undefined + ) { + throw new Error( + 'Required parameter inputAddDestinationToMultipleServices was null or undefined when calling addDestinationToMultipleServices.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/servicesManager/addDestination`, + inputAddDestinationToMultipleServices, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Add services destinations for one service. Destinations names are taken from all facility\'s host hostnames. + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addDestinationsDefinedByHostsOnFacilityWithFacility( + facility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public addDestinationsDefinedByHostsOnFacilityWithFacility( + facility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public addDestinationsDefinedByHostsOnFacilityWithFacility( + facility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public addDestinationsDefinedByHostsOnFacilityWithFacility( + facility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling addDestinationsDefinedByHostsOnFacilityWithFacility.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post>( + `${this.configuration.basePath}/urlinjsonout/servicesManager/addDestinationsDefinedByHostsOnFacility/f`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Add services destinations for list of services. Destinations names are taken from all facility\'s host hostnames. + * @param inputAddDestinationsDefinedByHostsOnFacility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addDestinationsDefinedByHostsOnFacilityWithListOfServiceAndFacility( + inputAddDestinationsDefinedByHostsOnFacility: InputAddDestinationsDefinedByHostsOnFacility, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public addDestinationsDefinedByHostsOnFacilityWithListOfServiceAndFacility( + inputAddDestinationsDefinedByHostsOnFacility: InputAddDestinationsDefinedByHostsOnFacility, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public addDestinationsDefinedByHostsOnFacilityWithListOfServiceAndFacility( + inputAddDestinationsDefinedByHostsOnFacility: InputAddDestinationsDefinedByHostsOnFacility, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public addDestinationsDefinedByHostsOnFacilityWithListOfServiceAndFacility( + inputAddDestinationsDefinedByHostsOnFacility: InputAddDestinationsDefinedByHostsOnFacility, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if ( + inputAddDestinationsDefinedByHostsOnFacility === null || + inputAddDestinationsDefinedByHostsOnFacility === undefined + ) { + throw new Error( + 'Required parameter inputAddDestinationsDefinedByHostsOnFacility was null or undefined when calling addDestinationsDefinedByHostsOnFacilityWithListOfServiceAndFacility.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post>( + `${this.configuration.basePath}/json/servicesManager/addDestinationsDefinedByHostsOnFacility/lists-f`, + inputAddDestinationsDefinedByHostsOnFacility, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Add services destinations for all services currently available on facility (assigned to all facility\'s resources). Destinations names are taken from all facility\'s host hostnames. + * @param service id of Service + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addDestinationsDefinedByHostsOnFacilityWithServiceAndFacility( + service: number, + facility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public addDestinationsDefinedByHostsOnFacilityWithServiceAndFacility( + service: number, + facility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public addDestinationsDefinedByHostsOnFacilityWithServiceAndFacility( + service: number, + facility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public addDestinationsDefinedByHostsOnFacilityWithServiceAndFacility( + service: number, + facility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling addDestinationsDefinedByHostsOnFacilityWithServiceAndFacility.' + ); + } + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling addDestinationsDefinedByHostsOnFacilityWithServiceAndFacility.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post>( + `${this.configuration.basePath}/urlinjsonout/servicesManager/addDestinationsDefinedByHostsOnFacility/s-f`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Adds destination for all services defined on the facility. + * InvalidDestinationException is thrown when destination value is invalid in given destination type. + * @param facility id of Facility + * @param destination string name of destination + * @param type Destination type (host,user@host,user@host:port,url,mail,service-specific) + * @param propagationType propagation type (PARALLEL, DUMMY - doesn\'t send data) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addDestinationsForAllServicesOnFacility( + facility: number, + destination: string, + type: DestinationType, + propagationType?: DestinationPropagationType, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public addDestinationsForAllServicesOnFacility( + facility: number, + destination: string, + type: DestinationType, + propagationType?: DestinationPropagationType, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public addDestinationsForAllServicesOnFacility( + facility: number, + destination: string, + type: DestinationType, + propagationType?: DestinationPropagationType, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public addDestinationsForAllServicesOnFacility( + facility: number, + destination: string, + type: DestinationType, + propagationType?: DestinationPropagationType, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling addDestinationsForAllServicesOnFacility.' + ); + } + if (destination === null || destination === undefined) { + throw new Error( + 'Required parameter destination was null or undefined when calling addDestinationsForAllServicesOnFacility.' + ); + } + if (type === null || type === undefined) { + throw new Error( + 'Required parameter type was null or undefined when calling addDestinationsForAllServicesOnFacility.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (destination !== undefined && destination !== null) { + queryParameters = queryParameters.set('destination', destination); + } + if (type !== undefined && type !== null) { + queryParameters = queryParameters.set('type', type); + } + if (propagationType !== undefined && propagationType !== null) { + queryParameters = queryParameters.set('propagationType', propagationType); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post>( + `${this.configuration.basePath}/urlinjsonout/servicesManager/addDestinationsForAllServicesOnFacility`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Mark the attribute as required for the service. Required attributes are requisite for Service to run. If you add attribute which has a default attribute then this default attribute will be automatically add too. + * @param service id of Service + * @param attributeId id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addRequiredAttribute( + service: number, + attributeId: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public addRequiredAttribute( + service: number, + attributeId: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public addRequiredAttribute( + service: number, + attributeId: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public addRequiredAttribute( + service: number, + attributeId: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling addRequiredAttribute.' + ); + } + if (attributeId === null || attributeId === undefined) { + throw new Error( + 'Required parameter attributeId was null or undefined when calling addRequiredAttribute.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (attributeId !== undefined && attributeId !== null) { + queryParameters = queryParameters.set('attributeId', attributeId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/servicesManager/addRequiredAttribute`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Batch version of addRequiredAttribute. + * @param service id of Service + * @param attributes list of attribute ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addRequiredAttributes( + service: number, + attributes: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public addRequiredAttributes( + service: number, + attributes: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public addRequiredAttributes( + service: number, + attributes: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public addRequiredAttributes( + service: number, + attributes: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling addRequiredAttributes.' + ); + } + if (attributes === null || attributes === undefined) { + throw new Error( + 'Required parameter attributes was null or undefined when calling addRequiredAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/servicesManager/addRequiredAttributes`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Adds a Service to a Services Package. + * @param servicesPackage id of ServicesPackage + * @param service id of Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addServiceToServicesPackage( + servicesPackage: number, + service: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public addServiceToServicesPackage( + servicesPackage: number, + service: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public addServiceToServicesPackage( + servicesPackage: number, + service: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public addServiceToServicesPackage( + servicesPackage: number, + service: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (servicesPackage === null || servicesPackage === undefined) { + throw new Error( + 'Required parameter servicesPackage was null or undefined when calling addServiceToServicesPackage.' + ); + } + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling addServiceToServicesPackage.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (servicesPackage !== undefined && servicesPackage !== null) { + queryParameters = queryParameters.set('servicesPackage', servicesPackage); + } + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/servicesManager/addServiceToServicesPackage`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Block all services currently assigned on this destination. Newly assigned services are still allowed for propagation. + * @param destination id of Destination + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public blockAllServicesOnDestinationById( + destination: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public blockAllServicesOnDestinationById( + destination: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public blockAllServicesOnDestinationById( + destination: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public blockAllServicesOnDestinationById( + destination: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (destination === null || destination === undefined) { + throw new Error( + 'Required parameter destination was null or undefined when calling blockAllServicesOnDestinationById.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (destination !== undefined && destination !== null) { + queryParameters = queryParameters.set('destination', destination); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/servicesManager/blockAllServicesOnDestination/d`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Block all services currently assigned on this destination. Newly assigned services are still allowed for propagation. + * @param destination string name of destination + * @param destinationType Destination type (like host, user@host, user@host:port, email, service-specific, ...) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public blockAllServicesOnDestinationByName( + destination: string, + destinationType: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public blockAllServicesOnDestinationByName( + destination: string, + destinationType: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public blockAllServicesOnDestinationByName( + destination: string, + destinationType: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public blockAllServicesOnDestinationByName( + destination: string, + destinationType: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (destination === null || destination === undefined) { + throw new Error( + 'Required parameter destination was null or undefined when calling blockAllServicesOnDestinationByName.' + ); + } + if (destinationType === null || destinationType === undefined) { + throw new Error( + 'Required parameter destinationType was null or undefined when calling blockAllServicesOnDestinationByName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (destination !== undefined && destination !== null) { + queryParameters = queryParameters.set('destination', destination); + } + if (destinationType !== undefined && destinationType !== null) { + queryParameters = queryParameters.set('destinationType', destinationType); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/servicesManager/blockAllServicesOnDestination/dname-dtype`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Block all services currently assigned on this facility. Newly assigned services are still allowed for propagation. + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public blockAllServicesOnFacility( + facility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public blockAllServicesOnFacility( + facility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public blockAllServicesOnFacility( + facility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public blockAllServicesOnFacility( + facility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling blockAllServicesOnFacility.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/servicesManager/blockAllServicesOnFacility`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Bans Service on a destination. + * @param service id of Service + * @param destination id of Destination + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public blockServiceOnDestination( + service: number, + destination: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public blockServiceOnDestination( + service: number, + destination: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public blockServiceOnDestination( + service: number, + destination: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public blockServiceOnDestination( + service: number, + destination: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling blockServiceOnDestination.' + ); + } + if (destination === null || destination === undefined) { + throw new Error( + 'Required parameter destination was null or undefined when calling blockServiceOnDestination.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (destination !== undefined && destination !== null) { + queryParameters = queryParameters.set('destination', destination); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/servicesManager/blockServiceOnDestination/s-d`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Bans Service on a destination. + * @param service id of Service + * @param destination string name of destination + * @param destinationType Destination type (like host, user@host, user@host:port, email, service-specific, ...) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public blockServiceOnDestinationWithNameAndType( + service: number, + destination: string, + destinationType: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public blockServiceOnDestinationWithNameAndType( + service: number, + destination: string, + destinationType: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public blockServiceOnDestinationWithNameAndType( + service: number, + destination: string, + destinationType: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public blockServiceOnDestinationWithNameAndType( + service: number, + destination: string, + destinationType: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling blockServiceOnDestinationWithNameAndType.' + ); + } + if (destination === null || destination === undefined) { + throw new Error( + 'Required parameter destination was null or undefined when calling blockServiceOnDestinationWithNameAndType.' + ); + } + if (destinationType === null || destinationType === undefined) { + throw new Error( + 'Required parameter destinationType was null or undefined when calling blockServiceOnDestinationWithNameAndType.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (destination !== undefined && destination !== null) { + queryParameters = queryParameters.set('destination', destination); + } + if (destinationType !== undefined && destinationType !== null) { + queryParameters = queryParameters.set('destinationType', destinationType); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/servicesManager/blockServiceOnDestination/s-dname-dtype`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Bans service on a facility. + * @param service id of Service + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public blockServiceOnFacility( + service: number, + facility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public blockServiceOnFacility( + service: number, + facility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public blockServiceOnFacility( + service: number, + facility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public blockServiceOnFacility( + service: number, + facility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling blockServiceOnFacility.' + ); + } + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling blockServiceOnFacility.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/servicesManager/blockServiceOnFacility`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Creates a new service. + * @param name name + * @param description description + * @param script script which should be constructed like ./service_name (where anything else than [a-z,A-Z] is converted to _) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createService( + name: string, + description: string, + script: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public createService( + name: string, + description: string, + script: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public createService( + name: string, + description: string, + script: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public createService( + name: string, + description: string, + script: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling createService.'); + } + if (description === null || description === undefined) { + throw new Error( + 'Required parameter description was null or undefined when calling createService.' + ); + } + if (script === null || script === undefined) { + throw new Error( + 'Required parameter script was null or undefined when calling createService.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (name !== undefined && name !== null) { + queryParameters = queryParameters.set('name', name); + } + if (description !== undefined && description !== null) { + queryParameters = queryParameters.set('description', description); + } + if (script !== undefined && script !== null) { + queryParameters = queryParameters.set('script', script); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/servicesManager/createService`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Creates a new service. Service object must contain name. Parameters desctiption, script, delay, recurrence, enabled are optional. Other parameters ignored. + * @param inputCreateService + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createServiceWithService( + inputCreateService: InputCreateService, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public createServiceWithService( + inputCreateService: InputCreateService, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public createServiceWithService( + inputCreateService: InputCreateService, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public createServiceWithService( + inputCreateService: InputCreateService, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputCreateService === null || inputCreateService === undefined) { + throw new Error( + 'Required parameter inputCreateService was null or undefined when calling createServiceWithService.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/servicesManager/createService`, + inputCreateService, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Creates a new services package. + * @param inputCreateServicesPackage + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createServicesPackage( + inputCreateServicesPackage: InputCreateServicesPackage, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public createServicesPackage( + inputCreateServicesPackage: InputCreateServicesPackage, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public createServicesPackage( + inputCreateServicesPackage: InputCreateServicesPackage, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public createServicesPackage( + inputCreateServicesPackage: InputCreateServicesPackage, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputCreateServicesPackage === null || inputCreateServicesPackage === undefined) { + throw new Error( + 'Required parameter inputCreateServicesPackage was null or undefined when calling createServicesPackage.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/servicesManager/createServicesPackage`, + inputCreateServicesPackage, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Creates a new services package. + * @param name name + * @param description description + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createServicesPackageByNameAndDescription( + name: string, + description: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public createServicesPackageByNameAndDescription( + name: string, + description: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public createServicesPackageByNameAndDescription( + name: string, + description: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public createServicesPackageByNameAndDescription( + name: string, + description: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (name === null || name === undefined) { + throw new Error( + 'Required parameter name was null or undefined when calling createServicesPackageByNameAndDescription.' + ); + } + if (description === null || description === undefined) { + throw new Error( + 'Required parameter description was null or undefined when calling createServicesPackageByNameAndDescription.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (name !== undefined && name !== null) { + queryParameters = queryParameters.set('name', name); + } + if (description !== undefined && description !== null) { + queryParameters = queryParameters.set('description', description); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/servicesManager/createServicesPackage`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Deletes a service. + * @param service id of Service + * @param force If true, delete entity forcefully. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteService( + service: number, + force?: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public deleteService( + service: number, + force?: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public deleteService( + service: number, + force?: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public deleteService( + service: number, + force?: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling deleteService.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (force !== undefined && force !== null) { + queryParameters = queryParameters.set('force', force); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/servicesManager/deleteService`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Deletes a services package. + * @param servicesPackage id of ServicesPackage + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteServicesPackage( + servicesPackage: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public deleteServicesPackage( + servicesPackage: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public deleteServicesPackage( + servicesPackage: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public deleteServicesPackage( + servicesPackage: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (servicesPackage === null || servicesPackage === undefined) { + throw new Error( + 'Required parameter servicesPackage was null or undefined when calling deleteServicesPackage.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (servicesPackage !== undefined && servicesPackage !== null) { + queryParameters = queryParameters.set('servicesPackage', servicesPackage); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/servicesManager/deleteServicesPackage`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Forces service propagation on defined facility. Return int 1 = true if it is possible, 0 = false if not + * @param service id of Service + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public forceServicePropagation( + service: number, + facility?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public forceServicePropagation( + service: number, + facility?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public forceServicePropagation( + service: number, + facility?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public forceServicePropagation( + service: number, + facility?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling forceServicePropagation.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/servicesManager/forceServicePropagation`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get list of all destinations. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllDestinations( + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAllDestinations( + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllDestinations( + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAllDestinations( + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/servicesManager/getDestinations/all`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns list of all rich destinations defined for the facility. + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllRichDestinationsForFacility( + facility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAllRichDestinationsForFacility( + facility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllRichDestinationsForFacility( + facility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAllRichDestinationsForFacility( + facility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getAllRichDestinationsForFacility.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/servicesManager/getAllRichDestinations/f`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns list of all rich destinations defined for the service. + * @param service id of Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllRichDestinationsForService( + service: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAllRichDestinationsForService( + service: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllRichDestinationsForService( + service: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAllRichDestinationsForService( + service: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling getAllRichDestinationsForService.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/servicesManager/getAllRichDestinations/s`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Lists resources assigned to service. + * @param service id of Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedResources( + service: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAssignedResources( + service: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAssignedResources( + service: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAssignedResources( + service: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling getAssignedResources.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/servicesManager/getAssignedResourcesForService`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * List all services associated with the facility (via resource). + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedServices( + facility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAssignedServices( + facility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAssignedServices( + facility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAssignedServices( + facility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getAssignedServices.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/servicesManager/getAssignedServices`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Generates the list of attributes per each member associated with the resources and groups. + * @param service id of Service + * @param facility id of Facility + * @param filterExpiredMembers if true the method does not take members expired in groups into account + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDataWithGroups( + service: number, + facility: number, + filterExpiredMembers?: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getDataWithGroups( + service: number, + facility: number, + filterExpiredMembers?: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getDataWithGroups( + service: number, + facility: number, + filterExpiredMembers?: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getDataWithGroups( + service: number, + facility: number, + filterExpiredMembers?: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling getDataWithGroups.' + ); + } + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getDataWithGroups.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (filterExpiredMembers !== undefined && filterExpiredMembers !== null) { + queryParameters = queryParameters.set('filterExpiredMembers', filterExpiredMembers); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/servicesManager/getDataWithGroups`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Generates the list of attributes per each member associated with the resources and groups in vos. + * @param service id of Service + * @param facility id of Facility + * @param filterExpiredMembers if true the method does not take members expired in groups into account + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDataWithVos( + service: number, + facility: number, + filterExpiredMembers?: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getDataWithVos( + service: number, + facility: number, + filterExpiredMembers?: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getDataWithVos( + service: number, + facility: number, + filterExpiredMembers?: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getDataWithVos( + service: number, + facility: number, + filterExpiredMembers?: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling getDataWithVos.' + ); + } + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getDataWithVos.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (filterExpiredMembers !== undefined && filterExpiredMembers !== null) { + queryParameters = queryParameters.set('filterExpiredMembers', filterExpiredMembers); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/servicesManager/getDataWithVos`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns a destination by its id. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDestinationById( + id: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getDestinationById( + id: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getDestinationById( + id: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getDestinationById( + id: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (id === null || id === undefined) { + throw new Error( + 'Required parameter id was null or undefined when calling getDestinationById.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/servicesManager/getDestinationById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns list of all destinations defined for the service and facility. + * @param service id of Service + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDestinations( + service: number, + facility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getDestinations( + service: number, + facility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getDestinations( + service: number, + facility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getDestinations( + service: number, + facility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling getDestinations.' + ); + } + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getDestinations.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/servicesManager/getDestinations/s-f`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets count of all destinations. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDestinationsCount(observe?: 'body', reportProgress?: boolean): Observable; + public getDestinationsCount( + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getDestinationsCount( + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getDestinationsCount( + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/servicesManager/getDestinationsCount`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * List all destinations for all facilities which are joined by resources to the VO. + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilitiesDestinations( + vo: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getFacilitiesDestinations( + vo: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getFacilitiesDestinations( + vo: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getFacilitiesDestinations( + vo: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling getFacilitiesDestinations.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/servicesManager/getFacilitiesDestinations`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Return list of ServiceForGUI assigned on facility, (Service with \"allowedOnFacility\" property filled). 1 - allowed / 0 - service is service is denied. + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityAssignedServicesForGUI( + facility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getFacilityAssignedServicesForGUI( + facility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getFacilityAssignedServicesForGUI( + facility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getFacilityAssignedServicesForGUI( + facility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getFacilityAssignedServicesForGUI.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/servicesManager/getFacilityAssignedServicesForGUI`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Generates the list of attributes per each user and per each resource. Never return member or member-resource attribute. + * @param service id of Service + * @param facility id of Facility + * @param filterExpiredMembers if true the method does not take members expired in groups into account + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFlatData( + service: number, + facility: number, + filterExpiredMembers?: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getFlatData( + service: number, + facility: number, + filterExpiredMembers?: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getFlatData( + service: number, + facility: number, + filterExpiredMembers?: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getFlatData( + service: number, + facility: number, + filterExpiredMembers?: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling getFlatData.'); + } + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getFlatData.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (filterExpiredMembers !== undefined && filterExpiredMembers !== null) { + queryParameters = queryParameters.set('filterExpiredMembers', filterExpiredMembers); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/servicesManager/getFlatData`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Generates hashed group structure data for given service and facility. + * @param service id of Service + * @param facility id of Facility + * @param filterExpiredMembers if true the method does not take members expired in groups into account + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getHashedDataWithGroups( + service: number, + facility: number, + filterExpiredMembers?: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getHashedDataWithGroups( + service: number, + facility: number, + filterExpiredMembers?: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getHashedDataWithGroups( + service: number, + facility: number, + filterExpiredMembers?: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getHashedDataWithGroups( + service: number, + facility: number, + filterExpiredMembers?: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling getHashedDataWithGroups.' + ); + } + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getHashedDataWithGroups.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (filterExpiredMembers !== undefined && filterExpiredMembers !== null) { + queryParameters = queryParameters.set('filterExpiredMembers', filterExpiredMembers); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/servicesManager/getHashedDataWithGroups`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Generates hashed hierarchical data structure for given service and facility. + * @param service id of Service + * @param facility id of Facility + * @param filterExpiredMembers if true the method does not take members expired in groups into account + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getHashedHierarchicalData( + service: number, + facility: number, + filterExpiredMembers?: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getHashedHierarchicalData( + service: number, + facility: number, + filterExpiredMembers?: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getHashedHierarchicalData( + service: number, + facility: number, + filterExpiredMembers?: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getHashedHierarchicalData( + service: number, + facility: number, + filterExpiredMembers?: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling getHashedHierarchicalData.' + ); + } + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getHashedHierarchicalData.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (filterExpiredMembers !== undefined && filterExpiredMembers !== null) { + queryParameters = queryParameters.set('filterExpiredMembers', filterExpiredMembers); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/servicesManager/getHashedHierarchicalData`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Generates the list of attributes per each member associated with the resource. + * @param service id of Service + * @param facility id of Facility + * @param filterExpiredMembers if true the method does not take members expired in groups into account + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getHierarchicalData( + service: number, + facility: number, + filterExpiredMembers?: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getHierarchicalData( + service: number, + facility: number, + filterExpiredMembers?: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getHierarchicalData( + service: number, + facility: number, + filterExpiredMembers?: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getHierarchicalData( + service: number, + facility: number, + filterExpiredMembers?: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling getHierarchicalData.' + ); + } + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getHierarchicalData.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (filterExpiredMembers !== undefined && filterExpiredMembers !== null) { + queryParameters = queryParameters.set('filterExpiredMembers', filterExpiredMembers); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/servicesManager/getHierarchicalData`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns list of all rich destinations defined for the service and facility. + * @param service id of Service + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRichDestinations( + service: number, + facility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getRichDestinations( + service: number, + facility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getRichDestinations( + service: number, + facility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getRichDestinations( + service: number, + facility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling getRichDestinations.' + ); + } + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getRichDestinations.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/servicesManager/getRichDestinations`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns a service by its id. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getServiceById( + id: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getServiceById( + id: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getServiceById( + id: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getServiceById( + id: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getServiceById.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/servicesManager/getServiceById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns a service by its name. + * @param name name of entity + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getServiceByName( + name: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getServiceByName( + name: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getServiceByName( + name: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getServiceByName( + name: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (name === null || name === undefined) { + throw new Error( + 'Required parameter name was null or undefined when calling getServiceByName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (name !== undefined && name !== null) { + queryParameters = queryParameters.set('name', name); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/servicesManager/getServiceByName`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns all services. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getServices(observe?: 'body', reportProgress?: boolean): Observable>; + public getServices( + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getServices( + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getServices(observe: any = 'body', reportProgress: boolean = false): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/servicesManager/getServices`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns list of denials for a destination. + * @param destination id of Destination + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getServicesBlockedOnDestination( + destination: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getServicesBlockedOnDestination( + destination: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getServicesBlockedOnDestination( + destination: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getServicesBlockedOnDestination( + destination: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (destination === null || destination === undefined) { + throw new Error( + 'Required parameter destination was null or undefined when calling getServicesBlockedOnDestination.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (destination !== undefined && destination !== null) { + queryParameters = queryParameters.set('destination', destination); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/servicesManager/getServicesBlockedOnDestination`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns list of denials for a facility. + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getServicesBlockedOnFacility( + facility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getServicesBlockedOnFacility( + facility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getServicesBlockedOnFacility( + facility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getServicesBlockedOnFacility( + facility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getServicesBlockedOnFacility.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/servicesManager/getServicesBlockedOnFacility`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all services with given attribute. + * @param attributeDefinition id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getServicesByAttributeDefinition( + attributeDefinition: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getServicesByAttributeDefinition( + attributeDefinition: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getServicesByAttributeDefinition( + attributeDefinition: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getServicesByAttributeDefinition( + attributeDefinition: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (attributeDefinition === null || attributeDefinition === undefined) { + throw new Error( + 'Required parameter attributeDefinition was null or undefined when calling getServicesByAttributeDefinition.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (attributeDefinition !== undefined && attributeDefinition !== null) { + queryParameters = queryParameters.set('attributeDefinition', attributeDefinition); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/servicesManager/getServicesByAttributeDefinition`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Lists services stored in a package. + * @param servicesPackage id of ServicesPackage + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getServicesFromServicesPackage( + servicesPackage: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getServicesFromServicesPackage( + servicesPackage: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getServicesFromServicesPackage( + servicesPackage: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getServicesFromServicesPackage( + servicesPackage: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (servicesPackage === null || servicesPackage === undefined) { + throw new Error( + 'Required parameter servicesPackage was null or undefined when calling getServicesFromServicesPackage.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (servicesPackage !== undefined && servicesPackage !== null) { + queryParameters = queryParameters.set('servicesPackage', servicesPackage); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/servicesManager/getServicesFromServicesPackage`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets package by id. + * @param servicesPackage id of ServicesPackage + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getServicesPackageById( + servicesPackage: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getServicesPackageById( + servicesPackage: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getServicesPackageById( + servicesPackage: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getServicesPackageById( + servicesPackage: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (servicesPackage === null || servicesPackage === undefined) { + throw new Error( + 'Required parameter servicesPackage was null or undefined when calling getServicesPackageById.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (servicesPackage !== undefined && servicesPackage !== null) { + queryParameters = queryParameters.set('servicesPackage', servicesPackage); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/servicesManager/getServicesPackageById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets package by name. + * @param name ServicesPackage name + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getServicesPackageByName( + name: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getServicesPackageByName( + name: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getServicesPackageByName( + name: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getServicesPackageByName( + name: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (name === null || name === undefined) { + throw new Error( + 'Required parameter name was null or undefined when calling getServicesPackageByName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (name !== undefined && name !== null) { + queryParameters = queryParameters.set('name', name); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/servicesManager/getServicesPackageByName`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns packages. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getServicesPackages( + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getServicesPackages( + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getServicesPackages( + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getServicesPackages( + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/servicesManager/getServicesPackages`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Is this Service denied on the destination? Return int 1 = true - the Service is denied on the destination, 0 = false - the Service is NOT denied on the destination + * @param service id of Service + * @param destination id of Destination + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public isServiceBlockedOnDestination( + service: number, + destination: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public isServiceBlockedOnDestination( + service: number, + destination: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public isServiceBlockedOnDestination( + service: number, + destination: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public isServiceBlockedOnDestination( + service: number, + destination: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling isServiceBlockedOnDestination.' + ); + } + if (destination === null || destination === undefined) { + throw new Error( + 'Required parameter destination was null or undefined when calling isServiceBlockedOnDestination.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (destination !== undefined && destination !== null) { + queryParameters = queryParameters.set('destination', destination); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/servicesManager/isServiceBlockedOnDestination`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Is this Service denied on the facility? Return int 1 = true - the Service is denied on the facility, 0 = false - the Service is NOT denied on the facility + * @param service id of Service + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public isServiceBlockedOnFacility( + service: number, + facility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public isServiceBlockedOnFacility( + service: number, + facility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public isServiceBlockedOnFacility( + service: number, + facility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public isServiceBlockedOnFacility( + service: number, + facility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling isServiceBlockedOnFacility.' + ); + } + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling isServiceBlockedOnFacility.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/servicesManager/isServiceBlockedOnFacility`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Plans service propagation on defined facility. Return int 1 = true if it is possible, 0 = false if not + * @param service id of Service + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public planServicePropagation( + service: number, + facility?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public planServicePropagation( + service: number, + facility?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public planServicePropagation( + service: number, + facility?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public planServicePropagation( + service: number, + facility?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling planServicePropagation.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/servicesManager/planServicePropagation`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Removes all destinations from a facility and service. + * @param service id of Service + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeAllDestinations( + service: number, + facility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeAllDestinations( + service: number, + facility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeAllDestinations( + service: number, + facility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeAllDestinations( + service: number, + facility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling removeAllDestinations.' + ); + } + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling removeAllDestinations.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/servicesManager/removeAllDestinations`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove all required attributes from service. + * @param service id of Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeAllRequiredAttributes( + service: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeAllRequiredAttributes( + service: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeAllRequiredAttributes( + service: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeAllRequiredAttributes( + service: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling removeAllRequiredAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/servicesManager/removeAllRequiredAttributes`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Removes the specified destination from the facility and service. + * @param service id of Service + * @param facility id of Facility + * @param destination Destination\'s destination + * @param type Destination\'s type + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeDestination( + service: number, + facility: number, + destination: string, + type: DestinationType, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeDestination( + service: number, + facility: number, + destination: string, + type: DestinationType, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeDestination( + service: number, + facility: number, + destination: string, + type: DestinationType, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeDestination( + service: number, + facility: number, + destination: string, + type: DestinationType, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling removeDestination.' + ); + } + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling removeDestination.' + ); + } + if (destination === null || destination === undefined) { + throw new Error( + 'Required parameter destination was null or undefined when calling removeDestination.' + ); + } + if (type === null || type === undefined) { + throw new Error( + 'Required parameter type was null or undefined when calling removeDestination.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + if (destination !== undefined && destination !== null) { + queryParameters = queryParameters.set('destination', destination); + } + if (type !== undefined && type !== null) { + queryParameters = queryParameters.set('type', type); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/servicesManager/removeDestination`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove required attribute from service. + * @param service id of Service + * @param attributeId id of AttributeDefinition + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeRequiredAttribute( + service: number, + attributeId: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeRequiredAttribute( + service: number, + attributeId: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeRequiredAttribute( + service: number, + attributeId: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeRequiredAttribute( + service: number, + attributeId: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling removeRequiredAttribute.' + ); + } + if (attributeId === null || attributeId === undefined) { + throw new Error( + 'Required parameter attributeId was null or undefined when calling removeRequiredAttribute.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (attributeId !== undefined && attributeId !== null) { + queryParameters = queryParameters.set('attributeId', attributeId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/servicesManager/removeRequiredAttribute`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove required attributes from service. + * @param service id of Service + * @param attributes list of attribute ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeRequiredAttributes( + service: number, + attributes: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeRequiredAttributes( + service: number, + attributes: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeRequiredAttributes( + service: number, + attributes: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeRequiredAttributes( + service: number, + attributes: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling removeRequiredAttributes.' + ); + } + if (attributes === null || attributes === undefined) { + throw new Error( + 'Required parameter attributes was null or undefined when calling removeRequiredAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (attributes) { + attributes.forEach((element) => { + queryParameters = queryParameters.append('attributes[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/servicesManager/removeRequiredAttributes`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Removes a Service from a Services Package. + * @param servicesPackage id of ServicesPackage + * @param service id of Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeServiceFromServicesPackage( + servicesPackage: number, + service: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeServiceFromServicesPackage( + servicesPackage: number, + service: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeServiceFromServicesPackage( + servicesPackage: number, + service: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeServiceFromServicesPackage( + servicesPackage: number, + service: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (servicesPackage === null || servicesPackage === undefined) { + throw new Error( + 'Required parameter servicesPackage was null or undefined when calling removeServiceFromServicesPackage.' + ); + } + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling removeServiceFromServicesPackage.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (servicesPackage !== undefined && servicesPackage !== null) { + queryParameters = queryParameters.set('servicesPackage', servicesPackage); + } + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/servicesManager/removeServiceFromServicesPackage`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Erase all the possible denials on this destination. + * @param destination id of Destination + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public unblockAllServicesOnDestinationById( + destination: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public unblockAllServicesOnDestinationById( + destination: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public unblockAllServicesOnDestinationById( + destination: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public unblockAllServicesOnDestinationById( + destination: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (destination === null || destination === undefined) { + throw new Error( + 'Required parameter destination was null or undefined when calling unblockAllServicesOnDestinationById.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (destination !== undefined && destination !== null) { + queryParameters = queryParameters.set('destination', destination); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/servicesManager/unblockAllServicesOnDestination/d`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Erase all the possible denials on this destination. + * @param destination string name of destination + * @param destinationType Destination type (like host, user@host, user@host:port, email, service-specific, ...) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public unblockAllServicesOnDestinationByName( + destination: string, + destinationType: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public unblockAllServicesOnDestinationByName( + destination: string, + destinationType: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public unblockAllServicesOnDestinationByName( + destination: string, + destinationType: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public unblockAllServicesOnDestinationByName( + destination: string, + destinationType: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (destination === null || destination === undefined) { + throw new Error( + 'Required parameter destination was null or undefined when calling unblockAllServicesOnDestinationByName.' + ); + } + if (destinationType === null || destinationType === undefined) { + throw new Error( + 'Required parameter destinationType was null or undefined when calling unblockAllServicesOnDestinationByName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (destination !== undefined && destination !== null) { + queryParameters = queryParameters.set('destination', destination); + } + if (destinationType !== undefined && destinationType !== null) { + queryParameters = queryParameters.set('destinationType', destinationType); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/servicesManager/unblockAllServicesOnDestination/dname-dtype`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Erase all the possible denials on this facility. + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public unblockAllServicesOnFacility( + facility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public unblockAllServicesOnFacility( + facility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public unblockAllServicesOnFacility( + facility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public unblockAllServicesOnFacility( + facility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling unblockAllServicesOnFacility.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/servicesManager/unblockAllServicesOnFacility`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Free the denial of the Service on this destination. If the Service was banned on this destination, it will be freed. In case the Service was not banned on this destination, nothing will happen. + * @param service id of Service + * @param destination id of Destination + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public unblockServiceOnDestinationById( + service: number, + destination: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public unblockServiceOnDestinationById( + service: number, + destination: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public unblockServiceOnDestinationById( + service: number, + destination: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public unblockServiceOnDestinationById( + service: number, + destination: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling unblockServiceOnDestinationById.' + ); + } + if (destination === null || destination === undefined) { + throw new Error( + 'Required parameter destination was null or undefined when calling unblockServiceOnDestinationById.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (destination !== undefined && destination !== null) { + queryParameters = queryParameters.set('destination', destination); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/servicesManager/unblockServiceOnDestination/s-d`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Free the denial of the Service on this destination. If the Service was banned on this destination, it will be freed. In case the Service was not banned on this destination, nothing will happen. + * @param service id of Service + * @param destination string name of destination + * @param destinationType Destination type (like host, user@host, user@host:port, email, service-specific, ...) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public unblockServiceOnDestinationByName( + service: number, + destination: string, + destinationType: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public unblockServiceOnDestinationByName( + service: number, + destination: string, + destinationType: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public unblockServiceOnDestinationByName( + service: number, + destination: string, + destinationType: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public unblockServiceOnDestinationByName( + service: number, + destination: string, + destinationType: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling unblockServiceOnDestinationByName.' + ); + } + if (destination === null || destination === undefined) { + throw new Error( + 'Required parameter destination was null or undefined when calling unblockServiceOnDestinationByName.' + ); + } + if (destinationType === null || destinationType === undefined) { + throw new Error( + 'Required parameter destinationType was null or undefined when calling unblockServiceOnDestinationByName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (destination !== undefined && destination !== null) { + queryParameters = queryParameters.set('destination', destination); + } + if (destinationType !== undefined && destinationType !== null) { + queryParameters = queryParameters.set('destinationType', destinationType); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/servicesManager/unblockServiceOnDestination/s-dname-dtype`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Free the denial of the Service on this facility. If the Service was banned on this facility, it will be freed. In case the Service was not banned on this facility, nothing will happen. + * @param service id of Service + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public unblockServiceOnFacility( + service: number, + facility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public unblockServiceOnFacility( + service: number, + facility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public unblockServiceOnFacility( + service: number, + facility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public unblockServiceOnFacility( + service: number, + facility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling unblockServiceOnFacility.' + ); + } + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling unblockServiceOnFacility.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/servicesManager/unblockServiceOnFacility`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Updates a service. + * @param inputUpdateService + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateService( + inputUpdateService: InputUpdateService, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public updateService( + inputUpdateService: InputUpdateService, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public updateService( + inputUpdateService: InputUpdateService, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public updateService( + inputUpdateService: InputUpdateService, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputUpdateService === null || inputUpdateService === undefined) { + throw new Error( + 'Required parameter inputUpdateService was null or undefined when calling updateService.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/servicesManager/updateService`, + inputUpdateService, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Updates a service package. + * @param inputUpdateServicesPackage + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateServicesPackage( + inputUpdateServicesPackage: InputUpdateServicesPackage, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public updateServicesPackage( + inputUpdateServicesPackage: InputUpdateServicesPackage, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public updateServicesPackage( + inputUpdateServicesPackage: InputUpdateServicesPackage, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public updateServicesPackage( + inputUpdateServicesPackage: InputUpdateServicesPackage, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputUpdateServicesPackage === null || inputUpdateServicesPackage === undefined) { + throw new Error( + 'Required parameter inputUpdateServicesPackage was null or undefined when calling updateServicesPackage.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - - - /** - * Adds an destination for a facility and service. If destination doesn\'t exist it will be created. - * InvalidDestinationException is thrown when destination value is invalid in given destination type. - * @param service id of Service - * @param facility id of Facility - * @param destination Destination\'s destination, usually a DNS name - * @param type Destination\'s type - * @param propagationType Destination\'s propagationType - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addDestination(service: number, facility: number, destination: string, type: DestinationType, propagationType?: DestinationPropagationType, observe?: 'body', reportProgress?: boolean): Observable; - public addDestination(service: number, facility: number, destination: string, type: DestinationType, propagationType?: DestinationPropagationType, observe?: 'response', reportProgress?: boolean): Observable>; - public addDestination(service: number, facility: number, destination: string, type: DestinationType, propagationType?: DestinationPropagationType, observe?: 'events', reportProgress?: boolean): Observable>; - public addDestination(service: number, facility: number, destination: string, type: DestinationType, propagationType?: DestinationPropagationType, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling addDestination.'); - } - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling addDestination.'); - } - if (destination === null || destination === undefined) { - throw new Error('Required parameter destination was null or undefined when calling addDestination.'); - } - if (type === null || type === undefined) { - throw new Error('Required parameter type was null or undefined when calling addDestination.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (destination !== undefined && destination !== null) { - queryParameters = queryParameters.set('destination', destination); - } - if (type !== undefined && type !== null) { - queryParameters = queryParameters.set('type', type); - } - if (propagationType !== undefined && propagationType !== null) { - queryParameters = queryParameters.set('propagationType', propagationType); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/addDestination`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Adds an destination for a facility and list of services. If destination doesn\'t exist it will be created. InvalidDestinationException is thrown when destination value is invalid in given destination type. - * @param inputAddDestinationToMultipleServices - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addDestinationToMultipleServices(inputAddDestinationToMultipleServices: InputAddDestinationToMultipleServices, observe?: 'body', reportProgress?: boolean): Observable; - public addDestinationToMultipleServices(inputAddDestinationToMultipleServices: InputAddDestinationToMultipleServices, observe?: 'response', reportProgress?: boolean): Observable>; - public addDestinationToMultipleServices(inputAddDestinationToMultipleServices: InputAddDestinationToMultipleServices, observe?: 'events', reportProgress?: boolean): Observable>; - public addDestinationToMultipleServices(inputAddDestinationToMultipleServices: InputAddDestinationToMultipleServices, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputAddDestinationToMultipleServices === null || inputAddDestinationToMultipleServices === undefined) { - throw new Error('Required parameter inputAddDestinationToMultipleServices was null or undefined when calling addDestinationToMultipleServices.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/servicesManager/addDestination`, - inputAddDestinationToMultipleServices, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Add services destinations for one service. Destinations names are taken from all facility\'s host hostnames. - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addDestinationsDefinedByHostsOnFacilityWithFacility(facility: number, observe?: 'body', reportProgress?: boolean): Observable>; - public addDestinationsDefinedByHostsOnFacilityWithFacility(facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public addDestinationsDefinedByHostsOnFacilityWithFacility(facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public addDestinationsDefinedByHostsOnFacilityWithFacility(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling addDestinationsDefinedByHostsOnFacilityWithFacility.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post>(`${this.configuration.basePath}/urlinjsonout/servicesManager/addDestinationsDefinedByHostsOnFacility/f`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Add services destinations for list of services. Destinations names are taken from all facility\'s host hostnames. - * @param inputAddDestinationsDefinedByHostsOnFacility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addDestinationsDefinedByHostsOnFacilityWithListOfServiceAndFacility(inputAddDestinationsDefinedByHostsOnFacility: InputAddDestinationsDefinedByHostsOnFacility, observe?: 'body', reportProgress?: boolean): Observable>; - public addDestinationsDefinedByHostsOnFacilityWithListOfServiceAndFacility(inputAddDestinationsDefinedByHostsOnFacility: InputAddDestinationsDefinedByHostsOnFacility, observe?: 'response', reportProgress?: boolean): Observable>>; - public addDestinationsDefinedByHostsOnFacilityWithListOfServiceAndFacility(inputAddDestinationsDefinedByHostsOnFacility: InputAddDestinationsDefinedByHostsOnFacility, observe?: 'events', reportProgress?: boolean): Observable>>; - public addDestinationsDefinedByHostsOnFacilityWithListOfServiceAndFacility(inputAddDestinationsDefinedByHostsOnFacility: InputAddDestinationsDefinedByHostsOnFacility, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputAddDestinationsDefinedByHostsOnFacility === null || inputAddDestinationsDefinedByHostsOnFacility === undefined) { - throw new Error('Required parameter inputAddDestinationsDefinedByHostsOnFacility was null or undefined when calling addDestinationsDefinedByHostsOnFacilityWithListOfServiceAndFacility.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post>(`${this.configuration.basePath}/json/servicesManager/addDestinationsDefinedByHostsOnFacility/lists-f`, - inputAddDestinationsDefinedByHostsOnFacility, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Add services destinations for all services currently available on facility (assigned to all facility\'s resources). Destinations names are taken from all facility\'s host hostnames. - * @param service id of Service - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addDestinationsDefinedByHostsOnFacilityWithServiceAndFacility(service: number, facility: number, observe?: 'body', reportProgress?: boolean): Observable>; - public addDestinationsDefinedByHostsOnFacilityWithServiceAndFacility(service: number, facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public addDestinationsDefinedByHostsOnFacilityWithServiceAndFacility(service: number, facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public addDestinationsDefinedByHostsOnFacilityWithServiceAndFacility(service: number, facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling addDestinationsDefinedByHostsOnFacilityWithServiceAndFacility.'); - } - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling addDestinationsDefinedByHostsOnFacilityWithServiceAndFacility.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post>(`${this.configuration.basePath}/urlinjsonout/servicesManager/addDestinationsDefinedByHostsOnFacility/s-f`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Adds destination for all services defined on the facility. - * InvalidDestinationException is thrown when destination value is invalid in given destination type. - * @param facility id of Facility - * @param destination string name of destination - * @param type Destination type (host,user@host,user@host:port,url,mail,service-specific) - * @param propagationType propagation type (PARALLEL, DUMMY - doesn\'t send data) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addDestinationsForAllServicesOnFacility(facility: number, destination: string, type: DestinationType, propagationType?: DestinationPropagationType, observe?: 'body', reportProgress?: boolean): Observable>; - public addDestinationsForAllServicesOnFacility(facility: number, destination: string, type: DestinationType, propagationType?: DestinationPropagationType, observe?: 'response', reportProgress?: boolean): Observable>>; - public addDestinationsForAllServicesOnFacility(facility: number, destination: string, type: DestinationType, propagationType?: DestinationPropagationType, observe?: 'events', reportProgress?: boolean): Observable>>; - public addDestinationsForAllServicesOnFacility(facility: number, destination: string, type: DestinationType, propagationType?: DestinationPropagationType, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling addDestinationsForAllServicesOnFacility.'); - } - if (destination === null || destination === undefined) { - throw new Error('Required parameter destination was null or undefined when calling addDestinationsForAllServicesOnFacility.'); - } - if (type === null || type === undefined) { - throw new Error('Required parameter type was null or undefined when calling addDestinationsForAllServicesOnFacility.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (destination !== undefined && destination !== null) { - queryParameters = queryParameters.set('destination', destination); - } - if (type !== undefined && type !== null) { - queryParameters = queryParameters.set('type', type); - } - if (propagationType !== undefined && propagationType !== null) { - queryParameters = queryParameters.set('propagationType', propagationType); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post>(`${this.configuration.basePath}/urlinjsonout/servicesManager/addDestinationsForAllServicesOnFacility`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Mark the attribute as required for the service. Required attributes are requisite for Service to run. If you add attribute which has a default attribute then this default attribute will be automatically add too. - * @param service id of Service - * @param attributeId id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addRequiredAttribute(service: number, attributeId: number, observe?: 'body', reportProgress?: boolean): Observable; - public addRequiredAttribute(service: number, attributeId: number, observe?: 'response', reportProgress?: boolean): Observable>; - public addRequiredAttribute(service: number, attributeId: number, observe?: 'events', reportProgress?: boolean): Observable>; - public addRequiredAttribute(service: number, attributeId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling addRequiredAttribute.'); - } - if (attributeId === null || attributeId === undefined) { - throw new Error('Required parameter attributeId was null or undefined when calling addRequiredAttribute.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (attributeId !== undefined && attributeId !== null) { - queryParameters = queryParameters.set('attributeId', attributeId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/addRequiredAttribute`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Batch version of addRequiredAttribute. - * @param service id of Service - * @param attributes list of attribute ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addRequiredAttributes(service: number, attributes: Array, observe?: 'body', reportProgress?: boolean): Observable; - public addRequiredAttributes(service: number, attributes: Array, observe?: 'response', reportProgress?: boolean): Observable>; - public addRequiredAttributes(service: number, attributes: Array, observe?: 'events', reportProgress?: boolean): Observable>; - public addRequiredAttributes(service: number, attributes: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling addRequiredAttributes.'); - } - if (attributes === null || attributes === undefined) { - throw new Error('Required parameter attributes was null or undefined when calling addRequiredAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/addRequiredAttributes`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Adds a Service to a Services Package. - * @param servicesPackage id of ServicesPackage - * @param service id of Service - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addServiceToServicesPackage(servicesPackage: number, service: number, observe?: 'body', reportProgress?: boolean): Observable; - public addServiceToServicesPackage(servicesPackage: number, service: number, observe?: 'response', reportProgress?: boolean): Observable>; - public addServiceToServicesPackage(servicesPackage: number, service: number, observe?: 'events', reportProgress?: boolean): Observable>; - public addServiceToServicesPackage(servicesPackage: number, service: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (servicesPackage === null || servicesPackage === undefined) { - throw new Error('Required parameter servicesPackage was null or undefined when calling addServiceToServicesPackage.'); - } - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling addServiceToServicesPackage.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (servicesPackage !== undefined && servicesPackage !== null) { - queryParameters = queryParameters.set('servicesPackage', servicesPackage); - } - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/addServiceToServicesPackage`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Block all services currently assigned on this destination. Newly assigned services are still allowed for propagation. - * @param destination id of Destination - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public blockAllServicesOnDestinationById(destination: number, observe?: 'body', reportProgress?: boolean): Observable; - public blockAllServicesOnDestinationById(destination: number, observe?: 'response', reportProgress?: boolean): Observable>; - public blockAllServicesOnDestinationById(destination: number, observe?: 'events', reportProgress?: boolean): Observable>; - public blockAllServicesOnDestinationById(destination: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (destination === null || destination === undefined) { - throw new Error('Required parameter destination was null or undefined when calling blockAllServicesOnDestinationById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (destination !== undefined && destination !== null) { - queryParameters = queryParameters.set('destination', destination); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/blockAllServicesOnDestination/d`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Block all services currently assigned on this destination. Newly assigned services are still allowed for propagation. - * @param destination string name of destination - * @param destinationType Destination type (like host, user@host, user@host:port, email, service-specific, ...) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public blockAllServicesOnDestinationByName(destination: string, destinationType: string, observe?: 'body', reportProgress?: boolean): Observable; - public blockAllServicesOnDestinationByName(destination: string, destinationType: string, observe?: 'response', reportProgress?: boolean): Observable>; - public blockAllServicesOnDestinationByName(destination: string, destinationType: string, observe?: 'events', reportProgress?: boolean): Observable>; - public blockAllServicesOnDestinationByName(destination: string, destinationType: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (destination === null || destination === undefined) { - throw new Error('Required parameter destination was null or undefined when calling blockAllServicesOnDestinationByName.'); - } - if (destinationType === null || destinationType === undefined) { - throw new Error('Required parameter destinationType was null or undefined when calling blockAllServicesOnDestinationByName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (destination !== undefined && destination !== null) { - queryParameters = queryParameters.set('destination', destination); - } - if (destinationType !== undefined && destinationType !== null) { - queryParameters = queryParameters.set('destinationType', destinationType); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/blockAllServicesOnDestination/dname-dtype`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Block all services currently assigned on this facility. Newly assigned services are still allowed for propagation. - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public blockAllServicesOnFacility(facility: number, observe?: 'body', reportProgress?: boolean): Observable; - public blockAllServicesOnFacility(facility: number, observe?: 'response', reportProgress?: boolean): Observable>; - public blockAllServicesOnFacility(facility: number, observe?: 'events', reportProgress?: boolean): Observable>; - public blockAllServicesOnFacility(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling blockAllServicesOnFacility.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/blockAllServicesOnFacility`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Bans Service on a destination. - * @param service id of Service - * @param destination id of Destination - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public blockServiceOnDestination(service: number, destination: number, observe?: 'body', reportProgress?: boolean): Observable; - public blockServiceOnDestination(service: number, destination: number, observe?: 'response', reportProgress?: boolean): Observable>; - public blockServiceOnDestination(service: number, destination: number, observe?: 'events', reportProgress?: boolean): Observable>; - public blockServiceOnDestination(service: number, destination: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling blockServiceOnDestination.'); - } - if (destination === null || destination === undefined) { - throw new Error('Required parameter destination was null or undefined when calling blockServiceOnDestination.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (destination !== undefined && destination !== null) { - queryParameters = queryParameters.set('destination', destination); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/blockServiceOnDestination/s-d`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Bans Service on a destination. - * @param service id of Service - * @param destination string name of destination - * @param destinationType Destination type (like host, user@host, user@host:port, email, service-specific, ...) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public blockServiceOnDestinationWithNameAndType(service: number, destination: string, destinationType: string, observe?: 'body', reportProgress?: boolean): Observable; - public blockServiceOnDestinationWithNameAndType(service: number, destination: string, destinationType: string, observe?: 'response', reportProgress?: boolean): Observable>; - public blockServiceOnDestinationWithNameAndType(service: number, destination: string, destinationType: string, observe?: 'events', reportProgress?: boolean): Observable>; - public blockServiceOnDestinationWithNameAndType(service: number, destination: string, destinationType: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling blockServiceOnDestinationWithNameAndType.'); - } - if (destination === null || destination === undefined) { - throw new Error('Required parameter destination was null or undefined when calling blockServiceOnDestinationWithNameAndType.'); - } - if (destinationType === null || destinationType === undefined) { - throw new Error('Required parameter destinationType was null or undefined when calling blockServiceOnDestinationWithNameAndType.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (destination !== undefined && destination !== null) { - queryParameters = queryParameters.set('destination', destination); - } - if (destinationType !== undefined && destinationType !== null) { - queryParameters = queryParameters.set('destinationType', destinationType); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/blockServiceOnDestination/s-dname-dtype`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Bans service on a facility. - * @param service id of Service - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public blockServiceOnFacility(service: number, facility: number, observe?: 'body', reportProgress?: boolean): Observable; - public blockServiceOnFacility(service: number, facility: number, observe?: 'response', reportProgress?: boolean): Observable>; - public blockServiceOnFacility(service: number, facility: number, observe?: 'events', reportProgress?: boolean): Observable>; - public blockServiceOnFacility(service: number, facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling blockServiceOnFacility.'); - } - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling blockServiceOnFacility.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/blockServiceOnFacility`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Creates a new service. - * @param name name - * @param description description - * @param script script which should be constructed like ./service_name (where anything else than [a-z,A-Z] is converted to _) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createService(name: string, description: string, script: string, observe?: 'body', reportProgress?: boolean): Observable; - public createService(name: string, description: string, script: string, observe?: 'response', reportProgress?: boolean): Observable>; - public createService(name: string, description: string, script: string, observe?: 'events', reportProgress?: boolean): Observable>; - public createService(name: string, description: string, script: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling createService.'); - } - if (description === null || description === undefined) { - throw new Error('Required parameter description was null or undefined when calling createService.'); - } - if (script === null || script === undefined) { - throw new Error('Required parameter script was null or undefined when calling createService.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (name !== undefined && name !== null) { - queryParameters = queryParameters.set('name', name); - } - if (description !== undefined && description !== null) { - queryParameters = queryParameters.set('description', description); - } - if (script !== undefined && script !== null) { - queryParameters = queryParameters.set('script', script); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/createService`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Creates a new service. Service object must contain name. Parameters desctiption, script, delay, recurrence, enabled are optional. Other parameters ignored. - * @param inputCreateService - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createServiceWithService(inputCreateService: InputCreateService, observe?: 'body', reportProgress?: boolean): Observable; - public createServiceWithService(inputCreateService: InputCreateService, observe?: 'response', reportProgress?: boolean): Observable>; - public createServiceWithService(inputCreateService: InputCreateService, observe?: 'events', reportProgress?: boolean): Observable>; - public createServiceWithService(inputCreateService: InputCreateService, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputCreateService === null || inputCreateService === undefined) { - throw new Error('Required parameter inputCreateService was null or undefined when calling createServiceWithService.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/servicesManager/createService`, - inputCreateService, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Creates a new services package. - * @param inputCreateServicesPackage - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createServicesPackage(inputCreateServicesPackage: InputCreateServicesPackage, observe?: 'body', reportProgress?: boolean): Observable; - public createServicesPackage(inputCreateServicesPackage: InputCreateServicesPackage, observe?: 'response', reportProgress?: boolean): Observable>; - public createServicesPackage(inputCreateServicesPackage: InputCreateServicesPackage, observe?: 'events', reportProgress?: boolean): Observable>; - public createServicesPackage(inputCreateServicesPackage: InputCreateServicesPackage, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputCreateServicesPackage === null || inputCreateServicesPackage === undefined) { - throw new Error('Required parameter inputCreateServicesPackage was null or undefined when calling createServicesPackage.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/servicesManager/createServicesPackage`, - inputCreateServicesPackage, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Creates a new services package. - * @param name name - * @param description description - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createServicesPackageByNameAndDescription(name: string, description: string, observe?: 'body', reportProgress?: boolean): Observable; - public createServicesPackageByNameAndDescription(name: string, description: string, observe?: 'response', reportProgress?: boolean): Observable>; - public createServicesPackageByNameAndDescription(name: string, description: string, observe?: 'events', reportProgress?: boolean): Observable>; - public createServicesPackageByNameAndDescription(name: string, description: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling createServicesPackageByNameAndDescription.'); - } - if (description === null || description === undefined) { - throw new Error('Required parameter description was null or undefined when calling createServicesPackageByNameAndDescription.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (name !== undefined && name !== null) { - queryParameters = queryParameters.set('name', name); - } - if (description !== undefined && description !== null) { - queryParameters = queryParameters.set('description', description); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/createServicesPackage`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Deletes a service. - * @param service id of Service - * @param force If true, delete entity forcefully. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteService(service: number, force?: boolean, observe?: 'body', reportProgress?: boolean): Observable; - public deleteService(service: number, force?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteService(service: number, force?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteService(service: number, force?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling deleteService.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (force !== undefined && force !== null) { - queryParameters = queryParameters.set('force', force); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/deleteService`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Deletes a services package. - * @param servicesPackage id of ServicesPackage - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteServicesPackage(servicesPackage: number, observe?: 'body', reportProgress?: boolean): Observable; - public deleteServicesPackage(servicesPackage: number, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteServicesPackage(servicesPackage: number, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteServicesPackage(servicesPackage: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (servicesPackage === null || servicesPackage === undefined) { - throw new Error('Required parameter servicesPackage was null or undefined when calling deleteServicesPackage.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (servicesPackage !== undefined && servicesPackage !== null) { - queryParameters = queryParameters.set('servicesPackage', servicesPackage); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/deleteServicesPackage`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Forces service propagation on defined facility. Return int 1 = true if it is possible, 0 = false if not - * @param service id of Service - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public forceServicePropagation(service: number, facility?: number, observe?: 'body', reportProgress?: boolean): Observable; - public forceServicePropagation(service: number, facility?: number, observe?: 'response', reportProgress?: boolean): Observable>; - public forceServicePropagation(service: number, facility?: number, observe?: 'events', reportProgress?: boolean): Observable>; - public forceServicePropagation(service: number, facility?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling forceServicePropagation.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/forceServicePropagation`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get list of all destinations. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllDestinations(observe?: 'body', reportProgress?: boolean): Observable>; - public getAllDestinations(observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllDestinations(observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllDestinations(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/servicesManager/getDestinations/all`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns list of all rich destinations defined for the facility. - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllRichDestinationsForFacility(facility: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAllRichDestinationsForFacility(facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllRichDestinationsForFacility(facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllRichDestinationsForFacility(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getAllRichDestinationsForFacility.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/servicesManager/getAllRichDestinations/f`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns list of all rich destinations defined for the service. - * @param service id of Service - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllRichDestinationsForService(service: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAllRichDestinationsForService(service: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllRichDestinationsForService(service: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllRichDestinationsForService(service: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling getAllRichDestinationsForService.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/servicesManager/getAllRichDestinations/s`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Lists resources assigned to service. - * @param service id of Service - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedResources(service: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAssignedResources(service: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAssignedResources(service: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAssignedResources(service: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling getAssignedResources.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/servicesManager/getAssignedResourcesForService`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * List all services associated with the facility (via resource). - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedServices(facility: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAssignedServices(facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAssignedServices(facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAssignedServices(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getAssignedServices.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/servicesManager/getAssignedServices`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Generates the list of attributes per each member associated with the resources and groups. - * @param service id of Service - * @param facility id of Facility - * @param filterExpiredMembers if true the method does not take members expired in groups into account - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDataWithGroups(service: number, facility: number, filterExpiredMembers?: boolean, observe?: 'body', reportProgress?: boolean): Observable; - public getDataWithGroups(service: number, facility: number, filterExpiredMembers?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; - public getDataWithGroups(service: number, facility: number, filterExpiredMembers?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; - public getDataWithGroups(service: number, facility: number, filterExpiredMembers?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling getDataWithGroups.'); - } - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getDataWithGroups.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (filterExpiredMembers !== undefined && filterExpiredMembers !== null) { - queryParameters = queryParameters.set('filterExpiredMembers', filterExpiredMembers); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/servicesManager/getDataWithGroups`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Generates the list of attributes per each member associated with the resources and groups in vos. - * @param service id of Service - * @param facility id of Facility - * @param filterExpiredMembers if true the method does not take members expired in groups into account - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDataWithVos(service: number, facility: number, filterExpiredMembers?: boolean, observe?: 'body', reportProgress?: boolean): Observable; - public getDataWithVos(service: number, facility: number, filterExpiredMembers?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; - public getDataWithVos(service: number, facility: number, filterExpiredMembers?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; - public getDataWithVos(service: number, facility: number, filterExpiredMembers?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling getDataWithVos.'); - } - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getDataWithVos.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (filterExpiredMembers !== undefined && filterExpiredMembers !== null) { - queryParameters = queryParameters.set('filterExpiredMembers', filterExpiredMembers); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/servicesManager/getDataWithVos`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns a destination by its id. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDestinationById(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public getDestinationById(id: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getDestinationById(id: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getDestinationById(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getDestinationById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/servicesManager/getDestinationById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns list of all destinations defined for the service and facility. - * @param service id of Service - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDestinations(service: number, facility: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getDestinations(service: number, facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getDestinations(service: number, facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getDestinations(service: number, facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling getDestinations.'); - } - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getDestinations.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/servicesManager/getDestinations/s-f`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Gets count of all destinations. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDestinationsCount(observe?: 'body', reportProgress?: boolean): Observable; - public getDestinationsCount(observe?: 'response', reportProgress?: boolean): Observable>; - public getDestinationsCount(observe?: 'events', reportProgress?: boolean): Observable>; - public getDestinationsCount(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/servicesManager/getDestinationsCount`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * List all destinations for all facilities which are joined by resources to the VO. - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilitiesDestinations(vo: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getFacilitiesDestinations(vo: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getFacilitiesDestinations(vo: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getFacilitiesDestinations(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getFacilitiesDestinations.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/servicesManager/getFacilitiesDestinations`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Return list of ServiceForGUI assigned on facility, (Service with \"allowedOnFacility\" property filled). 1 - allowed / 0 - service is service is denied. - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityAssignedServicesForGUI(facility: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getFacilityAssignedServicesForGUI(facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getFacilityAssignedServicesForGUI(facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getFacilityAssignedServicesForGUI(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getFacilityAssignedServicesForGUI.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/servicesManager/getFacilityAssignedServicesForGUI`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Generates the list of attributes per each user and per each resource. Never return member or member-resource attribute. - * @param service id of Service - * @param facility id of Facility - * @param filterExpiredMembers if true the method does not take members expired in groups into account - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFlatData(service: number, facility: number, filterExpiredMembers?: boolean, observe?: 'body', reportProgress?: boolean): Observable; - public getFlatData(service: number, facility: number, filterExpiredMembers?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; - public getFlatData(service: number, facility: number, filterExpiredMembers?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; - public getFlatData(service: number, facility: number, filterExpiredMembers?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling getFlatData.'); - } - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getFlatData.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (filterExpiredMembers !== undefined && filterExpiredMembers !== null) { - queryParameters = queryParameters.set('filterExpiredMembers', filterExpiredMembers); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/servicesManager/getFlatData`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Generates hashed group structure data for given service and facility. - * @param service id of Service - * @param facility id of Facility - * @param filterExpiredMembers if true the method does not take members expired in groups into account - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getHashedDataWithGroups(service: number, facility: number, filterExpiredMembers?: boolean, observe?: 'body', reportProgress?: boolean): Observable; - public getHashedDataWithGroups(service: number, facility: number, filterExpiredMembers?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; - public getHashedDataWithGroups(service: number, facility: number, filterExpiredMembers?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; - public getHashedDataWithGroups(service: number, facility: number, filterExpiredMembers?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling getHashedDataWithGroups.'); - } - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getHashedDataWithGroups.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (filterExpiredMembers !== undefined && filterExpiredMembers !== null) { - queryParameters = queryParameters.set('filterExpiredMembers', filterExpiredMembers); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/servicesManager/getHashedDataWithGroups`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Generates hashed hierarchical data structure for given service and facility. - * @param service id of Service - * @param facility id of Facility - * @param filterExpiredMembers if true the method does not take members expired in groups into account - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getHashedHierarchicalData(service: number, facility: number, filterExpiredMembers?: boolean, observe?: 'body', reportProgress?: boolean): Observable; - public getHashedHierarchicalData(service: number, facility: number, filterExpiredMembers?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; - public getHashedHierarchicalData(service: number, facility: number, filterExpiredMembers?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; - public getHashedHierarchicalData(service: number, facility: number, filterExpiredMembers?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling getHashedHierarchicalData.'); - } - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getHashedHierarchicalData.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (filterExpiredMembers !== undefined && filterExpiredMembers !== null) { - queryParameters = queryParameters.set('filterExpiredMembers', filterExpiredMembers); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/servicesManager/getHashedHierarchicalData`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Generates the list of attributes per each member associated with the resource. - * @param service id of Service - * @param facility id of Facility - * @param filterExpiredMembers if true the method does not take members expired in groups into account - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getHierarchicalData(service: number, facility: number, filterExpiredMembers?: boolean, observe?: 'body', reportProgress?: boolean): Observable; - public getHierarchicalData(service: number, facility: number, filterExpiredMembers?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; - public getHierarchicalData(service: number, facility: number, filterExpiredMembers?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; - public getHierarchicalData(service: number, facility: number, filterExpiredMembers?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling getHierarchicalData.'); - } - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getHierarchicalData.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (filterExpiredMembers !== undefined && filterExpiredMembers !== null) { - queryParameters = queryParameters.set('filterExpiredMembers', filterExpiredMembers); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/servicesManager/getHierarchicalData`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns list of all rich destinations defined for the service and facility. - * @param service id of Service - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRichDestinations(service: number, facility: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getRichDestinations(service: number, facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getRichDestinations(service: number, facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getRichDestinations(service: number, facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling getRichDestinations.'); - } - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getRichDestinations.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/servicesManager/getRichDestinations`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns a service by its id. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getServiceById(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public getServiceById(id: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getServiceById(id: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getServiceById(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getServiceById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/servicesManager/getServiceById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns a service by its name. - * @param name name of entity - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getServiceByName(name: string, observe?: 'body', reportProgress?: boolean): Observable; - public getServiceByName(name: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getServiceByName(name: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getServiceByName(name: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling getServiceByName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (name !== undefined && name !== null) { - queryParameters = queryParameters.set('name', name); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/servicesManager/getServiceByName`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns all services. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getServices(observe?: 'body', reportProgress?: boolean): Observable>; - public getServices(observe?: 'response', reportProgress?: boolean): Observable>>; - public getServices(observe?: 'events', reportProgress?: boolean): Observable>>; - public getServices(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/servicesManager/getServices`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns list of denials for a destination. - * @param destination id of Destination - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getServicesBlockedOnDestination(destination: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getServicesBlockedOnDestination(destination: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getServicesBlockedOnDestination(destination: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getServicesBlockedOnDestination(destination: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (destination === null || destination === undefined) { - throw new Error('Required parameter destination was null or undefined when calling getServicesBlockedOnDestination.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (destination !== undefined && destination !== null) { - queryParameters = queryParameters.set('destination', destination); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/servicesManager/getServicesBlockedOnDestination`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns list of denials for a facility. - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getServicesBlockedOnFacility(facility: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getServicesBlockedOnFacility(facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getServicesBlockedOnFacility(facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getServicesBlockedOnFacility(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getServicesBlockedOnFacility.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/servicesManager/getServicesBlockedOnFacility`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all services with given attribute. - * @param attributeDefinition id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getServicesByAttributeDefinition(attributeDefinition: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getServicesByAttributeDefinition(attributeDefinition: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getServicesByAttributeDefinition(attributeDefinition: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getServicesByAttributeDefinition(attributeDefinition: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (attributeDefinition === null || attributeDefinition === undefined) { - throw new Error('Required parameter attributeDefinition was null or undefined when calling getServicesByAttributeDefinition.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (attributeDefinition !== undefined && attributeDefinition !== null) { - queryParameters = queryParameters.set('attributeDefinition', attributeDefinition); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/servicesManager/getServicesByAttributeDefinition`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Lists services stored in a package. - * @param servicesPackage id of ServicesPackage - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getServicesFromServicesPackage(servicesPackage: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getServicesFromServicesPackage(servicesPackage: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getServicesFromServicesPackage(servicesPackage: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getServicesFromServicesPackage(servicesPackage: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (servicesPackage === null || servicesPackage === undefined) { - throw new Error('Required parameter servicesPackage was null or undefined when calling getServicesFromServicesPackage.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (servicesPackage !== undefined && servicesPackage !== null) { - queryParameters = queryParameters.set('servicesPackage', servicesPackage); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/servicesManager/getServicesFromServicesPackage`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Gets package by id. - * @param servicesPackage id of ServicesPackage - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getServicesPackageById(servicesPackage: number, observe?: 'body', reportProgress?: boolean): Observable; - public getServicesPackageById(servicesPackage: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getServicesPackageById(servicesPackage: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getServicesPackageById(servicesPackage: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (servicesPackage === null || servicesPackage === undefined) { - throw new Error('Required parameter servicesPackage was null or undefined when calling getServicesPackageById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (servicesPackage !== undefined && servicesPackage !== null) { - queryParameters = queryParameters.set('servicesPackage', servicesPackage); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/servicesManager/getServicesPackageById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Gets package by name. - * @param name ServicesPackage name - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getServicesPackageByName(name: string, observe?: 'body', reportProgress?: boolean): Observable; - public getServicesPackageByName(name: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getServicesPackageByName(name: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getServicesPackageByName(name: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling getServicesPackageByName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (name !== undefined && name !== null) { - queryParameters = queryParameters.set('name', name); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/servicesManager/getServicesPackageByName`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns packages. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getServicesPackages(observe?: 'body', reportProgress?: boolean): Observable>; - public getServicesPackages(observe?: 'response', reportProgress?: boolean): Observable>>; - public getServicesPackages(observe?: 'events', reportProgress?: boolean): Observable>>; - public getServicesPackages(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/servicesManager/getServicesPackages`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Is this Service denied on the destination? Return int 1 = true - the Service is denied on the destination, 0 = false - the Service is NOT denied on the destination - * @param service id of Service - * @param destination id of Destination - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public isServiceBlockedOnDestination(service: number, destination: number, observe?: 'body', reportProgress?: boolean): Observable; - public isServiceBlockedOnDestination(service: number, destination: number, observe?: 'response', reportProgress?: boolean): Observable>; - public isServiceBlockedOnDestination(service: number, destination: number, observe?: 'events', reportProgress?: boolean): Observable>; - public isServiceBlockedOnDestination(service: number, destination: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling isServiceBlockedOnDestination.'); - } - if (destination === null || destination === undefined) { - throw new Error('Required parameter destination was null or undefined when calling isServiceBlockedOnDestination.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (destination !== undefined && destination !== null) { - queryParameters = queryParameters.set('destination', destination); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/servicesManager/isServiceBlockedOnDestination`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Is this Service denied on the facility? Return int 1 = true - the Service is denied on the facility, 0 = false - the Service is NOT denied on the facility - * @param service id of Service - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public isServiceBlockedOnFacility(service: number, facility: number, observe?: 'body', reportProgress?: boolean): Observable; - public isServiceBlockedOnFacility(service: number, facility: number, observe?: 'response', reportProgress?: boolean): Observable>; - public isServiceBlockedOnFacility(service: number, facility: number, observe?: 'events', reportProgress?: boolean): Observable>; - public isServiceBlockedOnFacility(service: number, facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling isServiceBlockedOnFacility.'); - } - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling isServiceBlockedOnFacility.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/servicesManager/isServiceBlockedOnFacility`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Plans service propagation on defined facility. Return int 1 = true if it is possible, 0 = false if not - * @param service id of Service - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public planServicePropagation(service: number, facility?: number, observe?: 'body', reportProgress?: boolean): Observable; - public planServicePropagation(service: number, facility?: number, observe?: 'response', reportProgress?: boolean): Observable>; - public planServicePropagation(service: number, facility?: number, observe?: 'events', reportProgress?: boolean): Observable>; - public planServicePropagation(service: number, facility?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling planServicePropagation.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/planServicePropagation`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Removes all destinations from a facility and service. - * @param service id of Service - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeAllDestinations(service: number, facility: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeAllDestinations(service: number, facility: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeAllDestinations(service: number, facility: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeAllDestinations(service: number, facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling removeAllDestinations.'); - } - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling removeAllDestinations.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/removeAllDestinations`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove all required attributes from service. - * @param service id of Service - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeAllRequiredAttributes(service: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeAllRequiredAttributes(service: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeAllRequiredAttributes(service: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeAllRequiredAttributes(service: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling removeAllRequiredAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/removeAllRequiredAttributes`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Removes the specified destination from the facility and service. - * @param service id of Service - * @param facility id of Facility - * @param destination Destination\'s destination - * @param type Destination\'s type - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeDestination(service: number, facility: number, destination: string, type: DestinationType, observe?: 'body', reportProgress?: boolean): Observable; - public removeDestination(service: number, facility: number, destination: string, type: DestinationType, observe?: 'response', reportProgress?: boolean): Observable>; - public removeDestination(service: number, facility: number, destination: string, type: DestinationType, observe?: 'events', reportProgress?: boolean): Observable>; - public removeDestination(service: number, facility: number, destination: string, type: DestinationType, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling removeDestination.'); - } - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling removeDestination.'); - } - if (destination === null || destination === undefined) { - throw new Error('Required parameter destination was null or undefined when calling removeDestination.'); - } - if (type === null || type === undefined) { - throw new Error('Required parameter type was null or undefined when calling removeDestination.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - if (destination !== undefined && destination !== null) { - queryParameters = queryParameters.set('destination', destination); - } - if (type !== undefined && type !== null) { - queryParameters = queryParameters.set('type', type); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/removeDestination`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove required attribute from service. - * @param service id of Service - * @param attributeId id of AttributeDefinition - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeRequiredAttribute(service: number, attributeId: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeRequiredAttribute(service: number, attributeId: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeRequiredAttribute(service: number, attributeId: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeRequiredAttribute(service: number, attributeId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling removeRequiredAttribute.'); - } - if (attributeId === null || attributeId === undefined) { - throw new Error('Required parameter attributeId was null or undefined when calling removeRequiredAttribute.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (attributeId !== undefined && attributeId !== null) { - queryParameters = queryParameters.set('attributeId', attributeId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/removeRequiredAttribute`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove required attributes from service. - * @param service id of Service - * @param attributes list of attribute ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeRequiredAttributes(service: number, attributes: Array, observe?: 'body', reportProgress?: boolean): Observable; - public removeRequiredAttributes(service: number, attributes: Array, observe?: 'response', reportProgress?: boolean): Observable>; - public removeRequiredAttributes(service: number, attributes: Array, observe?: 'events', reportProgress?: boolean): Observable>; - public removeRequiredAttributes(service: number, attributes: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling removeRequiredAttributes.'); - } - if (attributes === null || attributes === undefined) { - throw new Error('Required parameter attributes was null or undefined when calling removeRequiredAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (attributes) { - attributes.forEach((element) => { - queryParameters = queryParameters.append('attributes[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/removeRequiredAttributes`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Removes a Service from a Services Package. - * @param servicesPackage id of ServicesPackage - * @param service id of Service - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeServiceFromServicesPackage(servicesPackage: number, service: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeServiceFromServicesPackage(servicesPackage: number, service: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeServiceFromServicesPackage(servicesPackage: number, service: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeServiceFromServicesPackage(servicesPackage: number, service: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (servicesPackage === null || servicesPackage === undefined) { - throw new Error('Required parameter servicesPackage was null or undefined when calling removeServiceFromServicesPackage.'); - } - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling removeServiceFromServicesPackage.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (servicesPackage !== undefined && servicesPackage !== null) { - queryParameters = queryParameters.set('servicesPackage', servicesPackage); - } - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/removeServiceFromServicesPackage`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Erase all the possible denials on this destination. - * @param destination id of Destination - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public unblockAllServicesOnDestinationById(destination: number, observe?: 'body', reportProgress?: boolean): Observable; - public unblockAllServicesOnDestinationById(destination: number, observe?: 'response', reportProgress?: boolean): Observable>; - public unblockAllServicesOnDestinationById(destination: number, observe?: 'events', reportProgress?: boolean): Observable>; - public unblockAllServicesOnDestinationById(destination: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (destination === null || destination === undefined) { - throw new Error('Required parameter destination was null or undefined when calling unblockAllServicesOnDestinationById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (destination !== undefined && destination !== null) { - queryParameters = queryParameters.set('destination', destination); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/unblockAllServicesOnDestination/d`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Erase all the possible denials on this destination. - * @param destination string name of destination - * @param destinationType Destination type (like host, user@host, user@host:port, email, service-specific, ...) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public unblockAllServicesOnDestinationByName(destination: string, destinationType: string, observe?: 'body', reportProgress?: boolean): Observable; - public unblockAllServicesOnDestinationByName(destination: string, destinationType: string, observe?: 'response', reportProgress?: boolean): Observable>; - public unblockAllServicesOnDestinationByName(destination: string, destinationType: string, observe?: 'events', reportProgress?: boolean): Observable>; - public unblockAllServicesOnDestinationByName(destination: string, destinationType: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (destination === null || destination === undefined) { - throw new Error('Required parameter destination was null or undefined when calling unblockAllServicesOnDestinationByName.'); - } - if (destinationType === null || destinationType === undefined) { - throw new Error('Required parameter destinationType was null or undefined when calling unblockAllServicesOnDestinationByName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (destination !== undefined && destination !== null) { - queryParameters = queryParameters.set('destination', destination); - } - if (destinationType !== undefined && destinationType !== null) { - queryParameters = queryParameters.set('destinationType', destinationType); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/unblockAllServicesOnDestination/dname-dtype`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Erase all the possible denials on this facility. - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public unblockAllServicesOnFacility(facility: number, observe?: 'body', reportProgress?: boolean): Observable; - public unblockAllServicesOnFacility(facility: number, observe?: 'response', reportProgress?: boolean): Observable>; - public unblockAllServicesOnFacility(facility: number, observe?: 'events', reportProgress?: boolean): Observable>; - public unblockAllServicesOnFacility(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling unblockAllServicesOnFacility.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/unblockAllServicesOnFacility`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Free the denial of the Service on this destination. If the Service was banned on this destination, it will be freed. In case the Service was not banned on this destination, nothing will happen. - * @param service id of Service - * @param destination id of Destination - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public unblockServiceOnDestinationById(service: number, destination: number, observe?: 'body', reportProgress?: boolean): Observable; - public unblockServiceOnDestinationById(service: number, destination: number, observe?: 'response', reportProgress?: boolean): Observable>; - public unblockServiceOnDestinationById(service: number, destination: number, observe?: 'events', reportProgress?: boolean): Observable>; - public unblockServiceOnDestinationById(service: number, destination: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling unblockServiceOnDestinationById.'); - } - if (destination === null || destination === undefined) { - throw new Error('Required parameter destination was null or undefined when calling unblockServiceOnDestinationById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (destination !== undefined && destination !== null) { - queryParameters = queryParameters.set('destination', destination); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/unblockServiceOnDestination/s-d`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Free the denial of the Service on this destination. If the Service was banned on this destination, it will be freed. In case the Service was not banned on this destination, nothing will happen. - * @param service id of Service - * @param destination string name of destination - * @param destinationType Destination type (like host, user@host, user@host:port, email, service-specific, ...) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public unblockServiceOnDestinationByName(service: number, destination: string, destinationType: string, observe?: 'body', reportProgress?: boolean): Observable; - public unblockServiceOnDestinationByName(service: number, destination: string, destinationType: string, observe?: 'response', reportProgress?: boolean): Observable>; - public unblockServiceOnDestinationByName(service: number, destination: string, destinationType: string, observe?: 'events', reportProgress?: boolean): Observable>; - public unblockServiceOnDestinationByName(service: number, destination: string, destinationType: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling unblockServiceOnDestinationByName.'); - } - if (destination === null || destination === undefined) { - throw new Error('Required parameter destination was null or undefined when calling unblockServiceOnDestinationByName.'); - } - if (destinationType === null || destinationType === undefined) { - throw new Error('Required parameter destinationType was null or undefined when calling unblockServiceOnDestinationByName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (destination !== undefined && destination !== null) { - queryParameters = queryParameters.set('destination', destination); - } - if (destinationType !== undefined && destinationType !== null) { - queryParameters = queryParameters.set('destinationType', destinationType); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/unblockServiceOnDestination/s-dname-dtype`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Free the denial of the Service on this facility. If the Service was banned on this facility, it will be freed. In case the Service was not banned on this facility, nothing will happen. - * @param service id of Service - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public unblockServiceOnFacility(service: number, facility: number, observe?: 'body', reportProgress?: boolean): Observable; - public unblockServiceOnFacility(service: number, facility: number, observe?: 'response', reportProgress?: boolean): Observable>; - public unblockServiceOnFacility(service: number, facility: number, observe?: 'events', reportProgress?: boolean): Observable>; - public unblockServiceOnFacility(service: number, facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling unblockServiceOnFacility.'); - } - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling unblockServiceOnFacility.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/servicesManager/unblockServiceOnFacility`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Updates a service. - * @param inputUpdateService - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateService(inputUpdateService: InputUpdateService, observe?: 'body', reportProgress?: boolean): Observable; - public updateService(inputUpdateService: InputUpdateService, observe?: 'response', reportProgress?: boolean): Observable>; - public updateService(inputUpdateService: InputUpdateService, observe?: 'events', reportProgress?: boolean): Observable>; - public updateService(inputUpdateService: InputUpdateService, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputUpdateService === null || inputUpdateService === undefined) { - throw new Error('Required parameter inputUpdateService was null or undefined when calling updateService.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/servicesManager/updateService`, - inputUpdateService, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Updates a service package. - * @param inputUpdateServicesPackage - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateServicesPackage(inputUpdateServicesPackage: InputUpdateServicesPackage, observe?: 'body', reportProgress?: boolean): Observable; - public updateServicesPackage(inputUpdateServicesPackage: InputUpdateServicesPackage, observe?: 'response', reportProgress?: boolean): Observable>; - public updateServicesPackage(inputUpdateServicesPackage: InputUpdateServicesPackage, observe?: 'events', reportProgress?: boolean): Observable>; - public updateServicesPackage(inputUpdateServicesPackage: InputUpdateServicesPackage, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputUpdateServicesPackage === null || inputUpdateServicesPackage === undefined) { - throw new Error('Required parameter inputUpdateServicesPackage was null or undefined when calling updateServicesPackage.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/servicesManager/updateServicesPackage`, - inputUpdateServicesPackage, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); } + return this.httpClient.post( + `${this.configuration.basePath}/json/servicesManager/updateServicesPackage`, + inputUpdateServicesPackage, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } } diff --git a/libs/perun/openapi/src/lib/api/tasksManager.service.ts b/libs/perun/openapi/src/lib/api/tasksManager.service.ts index a34ed6ae5..65c8c89d2 100644 --- a/libs/perun/openapi/src/lib/api/tasksManager.service.ts +++ b/libs/perun/openapi/src/lib/api/tasksManager.service.ts @@ -11,11 +11,17 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { FacilityState } from '../model/facilityState'; import { PerunException } from '../model/perunException'; @@ -28,1317 +34,1733 @@ import { TaskIdObject } from '../model/taskIdObject'; import { TaskResult } from '../model/taskResult'; import { TaskResultIdObject } from '../model/taskResultIdObject'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - - +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class TasksManagerService { + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string, + @Optional() configuration: Configuration + ) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + /** + * Returns the count of all tasks. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public countTasks(observe?: 'body', reportProgress?: boolean): Observable; + public countTasks( + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public countTasks(observe?: 'events', reportProgress?: boolean): Observable>; + public countTasks(observe: any = 'body', reportProgress: boolean = false): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/tasksManager/countTasks`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Delete Task and TaskResults. + * @param taskIdObject + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteTask( + taskIdObject: TaskIdObject, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public deleteTask( + taskIdObject: TaskIdObject, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public deleteTask( + taskIdObject: TaskIdObject, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public deleteTask( + taskIdObject: TaskIdObject, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (taskIdObject === null || taskIdObject === undefined) { + throw new Error( + 'Required parameter taskIdObject was null or undefined when calling deleteTask.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/tasksManager/deleteTask`, + taskIdObject, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Delete TaskResult by its ID. + * @param taskResultIdObject + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteTaskResultById( + taskResultIdObject: TaskResultIdObject, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public deleteTaskResultById( + taskResultIdObject: TaskResultIdObject, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public deleteTaskResultById( + taskResultIdObject: TaskResultIdObject, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public deleteTaskResultById( + taskResultIdObject: TaskResultIdObject, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (taskResultIdObject === null || taskResultIdObject === undefined) { + throw new Error( + 'Required parameter taskResultIdObject was null or undefined when calling deleteTaskResultById.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/tasksManager/deleteTaskResultById`, + taskResultIdObject, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Delete all TaskResults for specified Task and Destination. + * @param taskAndDestinationIdObject + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteTaskResultsIds( + taskAndDestinationIdObject: TaskAndDestinationIdObject, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public deleteTaskResultsIds( + taskAndDestinationIdObject: TaskAndDestinationIdObject, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public deleteTaskResultsIds( + taskAndDestinationIdObject: TaskAndDestinationIdObject, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public deleteTaskResultsIds( + taskAndDestinationIdObject: TaskAndDestinationIdObject, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (taskAndDestinationIdObject === null || taskAndDestinationIdObject === undefined) { + throw new Error( + 'Required parameter taskAndDestinationIdObject was null or undefined when calling deleteTaskResultsIds.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/tasksManager/deleteTaskResults/id`, + taskAndDestinationIdObject, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Delete all TaskResults for specified Task and Destination. + * @param taskAndDestinationNameObject + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteTaskResultsNames( + taskAndDestinationNameObject: TaskAndDestinationNameObject, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public deleteTaskResultsNames( + taskAndDestinationNameObject: TaskAndDestinationNameObject, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public deleteTaskResultsNames( + taskAndDestinationNameObject: TaskAndDestinationNameObject, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public deleteTaskResultsNames( + taskAndDestinationNameObject: TaskAndDestinationNameObject, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (taskAndDestinationNameObject === null || taskAndDestinationNameObject === undefined) { + throw new Error( + 'Required parameter taskAndDestinationNameObject was null or undefined when calling deleteTaskResultsNames.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/tasksManager/deleteTaskResults/name`, + taskAndDestinationNameObject, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Return propagation status of all facilities in Perun/Vo. + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllFacilitiesStates( + vo?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAllFacilitiesStates( + vo?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllFacilitiesStates( + vo?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAllFacilitiesStates( + vo?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/tasksManager/getAllFacilitiesStates`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Return propagation status of all resources related to VO. + * @param voId VO id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllResourcesState( + voId: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAllResourcesState( + voId: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllResourcesState( + voId: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAllResourcesState( + voId: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (voId === null || voId === undefined) { + throw new Error( + 'Required parameter voId was null or undefined when calling getAllResourcesState.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (voId !== undefined && voId !== null) { + queryParameters = queryParameters.set('voId', voId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/tasksManager/getAllResourcesState`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns service states for defined facility. + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityServicesState( + facility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getFacilityServicesState( + facility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getFacilityServicesState( + facility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getFacilityServicesState( + facility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getFacilityServicesState.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/tasksManager/getFacilityServicesState`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Return propagation status of facility. + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFacilityState( + facility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getFacilityState( + facility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getFacilityState( + facility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getFacilityState( + facility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getFacilityState.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/tasksManager/getFacilityState`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns a task. + * @param service id of Service + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getTask( + service: number, + facility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getTask( + service: number, + facility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getTask( + service: number, + facility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getTask( + service: number, + facility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error('Required parameter service was null or undefined when calling getTask.'); + } + if (facility === null || facility === undefined) { + throw new Error('Required parameter facility was null or undefined when calling getTask.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get(`${this.configuration.basePath}/json/tasksManager/getTask`, { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + }); + } + + /** + * Returns Task by its id + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getTaskById(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public getTaskById( + id: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getTaskById( + id: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getTaskById( + id: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getTaskById.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/tasksManager/getTaskById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns TaskResult by its id. + * @param taskResult TaskResult id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getTaskResultById( + taskResult: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getTaskResultById( + taskResult: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getTaskResultById( + taskResult: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getTaskResultById( + taskResult: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (taskResult === null || taskResult === undefined) { + throw new Error( + 'Required parameter taskResult was null or undefined when calling getTaskResultById.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (taskResult !== undefined && taskResult !== null) { + queryParameters = queryParameters.set('taskResult', taskResult); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/tasksManager/getTaskResultById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns all task results. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getTaskResults(observe?: 'body', reportProgress?: boolean): Observable>; + public getTaskResults( + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getTaskResults( + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getTaskResults(observe: any = 'body', reportProgress: boolean = false): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/tasksManager/getTaskResults`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Return list of TaskResults by a Task. + * @param task Task id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getTaskResultsByTask( + task: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getTaskResultsByTask( + task: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getTaskResultsByTask( + task: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getTaskResultsByTask( + task: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (task === null || task === undefined) { + throw new Error( + 'Required parameter task was null or undefined when calling getTaskResultsByTask.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (task !== undefined && task !== null) { + queryParameters = queryParameters.set('task', task); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/tasksManager/getTaskResultsByTask`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns task results for defined destinations. + * @param destinations List<String> Destinations + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getTaskResultsForDestinations( + destinations: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getTaskResultsForDestinations( + destinations: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getTaskResultsForDestinations( + destinations: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getTaskResultsForDestinations( + destinations: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (destinations === null || destinations === undefined) { + throw new Error( + 'Required parameter destinations was null or undefined when calling getTaskResultsForDestinations.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (destinations) { + destinations.forEach((element) => { + queryParameters = queryParameters.append('destinations[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/tasksManager/getTaskResultsForDestinations`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Return list of TaskResults by a Task for GUI. + * @param task Task id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getTaskResultsForGUIByTask( + task: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getTaskResultsForGUIByTask( + task: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getTaskResultsForGUIByTask( + task: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getTaskResultsForGUIByTask( + task: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (task === null || task === undefined) { + throw new Error( + 'Required parameter task was null or undefined when calling getTaskResultsForGUIByTask.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (task !== undefined && task !== null) { + queryParameters = queryParameters.set('task', task); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/tasksManager/getTaskResultsForGUIByTask`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Return list of TaskResults by a Task and destination for GUI. + * @param task Task id + * @param destination id of Destination + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getTaskResultsForGUIByTaskAndDestination( + task: number, + destination: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getTaskResultsForGUIByTaskAndDestination( + task: number, + destination: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getTaskResultsForGUIByTaskAndDestination( + task: number, + destination: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getTaskResultsForGUIByTaskAndDestination( + task: number, + destination: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (task === null || task === undefined) { + throw new Error( + 'Required parameter task was null or undefined when calling getTaskResultsForGUIByTaskAndDestination.' + ); + } + if (destination === null || destination === undefined) { + throw new Error( + 'Required parameter destination was null or undefined when calling getTaskResultsForGUIByTaskAndDestination.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (task !== undefined && task !== null) { + queryParameters = queryParameters.set('task', task); + } + if (destination !== undefined && destination !== null) { + queryParameters = queryParameters.set('destination', destination); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/tasksManager/getTaskResultsForGUIByTaskAndDestination`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Return list of only newest TaskResults by a Task for GUI. + * @param task Task id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getTaskResultsForGUIByTaskOnlyNewest( + task: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getTaskResultsForGUIByTaskOnlyNewest( + task: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getTaskResultsForGUIByTaskOnlyNewest( + task: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getTaskResultsForGUIByTaskOnlyNewest( + task: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (task === null || task === undefined) { + throw new Error( + 'Required parameter task was null or undefined when calling getTaskResultsForGUIByTaskOnlyNewest.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (task !== undefined && task !== null) { + queryParameters = queryParameters.set('task', task); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/tasksManager/getTaskResultsForGUIByTaskOnlyNewest`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Whether task exists. + * @param service id of Service + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public isThereSuchTask( + service: number, + facility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public isThereSuchTask( + service: number, + facility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public isThereSuchTask( + service: number, + facility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public isThereSuchTask( + service: number, + facility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (service === null || service === undefined) { + throw new Error( + 'Required parameter service was null or undefined when calling isThereSuchTask.' + ); + } + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling isThereSuchTask.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (service !== undefined && service !== null) { + queryParameters = queryParameters.set('service', service); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/tasksManager/isThereSuchTask`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns all tasks. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public listAllTasks(observe?: 'body', reportProgress?: boolean): Observable>; + public listAllTasks( + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public listAllTasks( + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public listAllTasks(observe: any = 'body', reportProgress: boolean = false): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - - - /** - * Returns the count of all tasks. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public countTasks(observe?: 'body', reportProgress?: boolean): Observable; - public countTasks(observe?: 'response', reportProgress?: boolean): Observable>; - public countTasks(observe?: 'events', reportProgress?: boolean): Observable>; - public countTasks(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/tasksManager/countTasks`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Delete Task and TaskResults. - * @param taskIdObject - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteTask(taskIdObject: TaskIdObject, observe?: 'body', reportProgress?: boolean): Observable; - public deleteTask(taskIdObject: TaskIdObject, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteTask(taskIdObject: TaskIdObject, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteTask(taskIdObject: TaskIdObject, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (taskIdObject === null || taskIdObject === undefined) { - throw new Error('Required parameter taskIdObject was null or undefined when calling deleteTask.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/tasksManager/deleteTask`, - taskIdObject, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Delete TaskResult by its ID. - * @param taskResultIdObject - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteTaskResultById(taskResultIdObject: TaskResultIdObject, observe?: 'body', reportProgress?: boolean): Observable; - public deleteTaskResultById(taskResultIdObject: TaskResultIdObject, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteTaskResultById(taskResultIdObject: TaskResultIdObject, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteTaskResultById(taskResultIdObject: TaskResultIdObject, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (taskResultIdObject === null || taskResultIdObject === undefined) { - throw new Error('Required parameter taskResultIdObject was null or undefined when calling deleteTaskResultById.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/tasksManager/deleteTaskResultById`, - taskResultIdObject, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Delete all TaskResults for specified Task and Destination. - * @param taskAndDestinationIdObject - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteTaskResultsIds(taskAndDestinationIdObject: TaskAndDestinationIdObject, observe?: 'body', reportProgress?: boolean): Observable; - public deleteTaskResultsIds(taskAndDestinationIdObject: TaskAndDestinationIdObject, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteTaskResultsIds(taskAndDestinationIdObject: TaskAndDestinationIdObject, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteTaskResultsIds(taskAndDestinationIdObject: TaskAndDestinationIdObject, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (taskAndDestinationIdObject === null || taskAndDestinationIdObject === undefined) { - throw new Error('Required parameter taskAndDestinationIdObject was null or undefined when calling deleteTaskResultsIds.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/tasksManager/deleteTaskResults/id`, - taskAndDestinationIdObject, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Delete all TaskResults for specified Task and Destination. - * @param taskAndDestinationNameObject - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteTaskResultsNames(taskAndDestinationNameObject: TaskAndDestinationNameObject, observe?: 'body', reportProgress?: boolean): Observable; - public deleteTaskResultsNames(taskAndDestinationNameObject: TaskAndDestinationNameObject, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteTaskResultsNames(taskAndDestinationNameObject: TaskAndDestinationNameObject, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteTaskResultsNames(taskAndDestinationNameObject: TaskAndDestinationNameObject, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (taskAndDestinationNameObject === null || taskAndDestinationNameObject === undefined) { - throw new Error('Required parameter taskAndDestinationNameObject was null or undefined when calling deleteTaskResultsNames.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/tasksManager/deleteTaskResults/name`, - taskAndDestinationNameObject, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Return propagation status of all facilities in Perun/Vo. - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllFacilitiesStates(vo?: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAllFacilitiesStates(vo?: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllFacilitiesStates(vo?: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllFacilitiesStates(vo?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/tasksManager/getAllFacilitiesStates`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Return propagation status of all resources related to VO. - * @param voId VO id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllResourcesState(voId: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAllResourcesState(voId: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllResourcesState(voId: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllResourcesState(voId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (voId === null || voId === undefined) { - throw new Error('Required parameter voId was null or undefined when calling getAllResourcesState.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (voId !== undefined && voId !== null) { - queryParameters = queryParameters.set('voId', voId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/tasksManager/getAllResourcesState`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns service states for defined facility. - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityServicesState(facility: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getFacilityServicesState(facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getFacilityServicesState(facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getFacilityServicesState(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getFacilityServicesState.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/tasksManager/getFacilityServicesState`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Return propagation status of facility. - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFacilityState(facility: number, observe?: 'body', reportProgress?: boolean): Observable; - public getFacilityState(facility: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getFacilityState(facility: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getFacilityState(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getFacilityState.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/tasksManager/getFacilityState`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns a task. - * @param service id of Service - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getTask(service: number, facility: number, observe?: 'body', reportProgress?: boolean): Observable; - public getTask(service: number, facility: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getTask(service: number, facility: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getTask(service: number, facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling getTask.'); - } - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getTask.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/tasksManager/getTask`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns Task by its id - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getTaskById(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public getTaskById(id: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getTaskById(id: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getTaskById(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getTaskById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/tasksManager/getTaskById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns TaskResult by its id. - * @param taskResult TaskResult id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getTaskResultById(taskResult: number, observe?: 'body', reportProgress?: boolean): Observable; - public getTaskResultById(taskResult: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getTaskResultById(taskResult: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getTaskResultById(taskResult: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (taskResult === null || taskResult === undefined) { - throw new Error('Required parameter taskResult was null or undefined when calling getTaskResultById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (taskResult !== undefined && taskResult !== null) { - queryParameters = queryParameters.set('taskResult', taskResult); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/tasksManager/getTaskResultById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns all task results. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getTaskResults(observe?: 'body', reportProgress?: boolean): Observable>; - public getTaskResults(observe?: 'response', reportProgress?: boolean): Observable>>; - public getTaskResults(observe?: 'events', reportProgress?: boolean): Observable>>; - public getTaskResults(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/tasksManager/getTaskResults`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Return list of TaskResults by a Task. - * @param task Task id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getTaskResultsByTask(task: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getTaskResultsByTask(task: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getTaskResultsByTask(task: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getTaskResultsByTask(task: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (task === null || task === undefined) { - throw new Error('Required parameter task was null or undefined when calling getTaskResultsByTask.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (task !== undefined && task !== null) { - queryParameters = queryParameters.set('task', task); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/tasksManager/getTaskResultsByTask`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns task results for defined destinations. - * @param destinations List<String> Destinations - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getTaskResultsForDestinations(destinations: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getTaskResultsForDestinations(destinations: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getTaskResultsForDestinations(destinations: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getTaskResultsForDestinations(destinations: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (destinations === null || destinations === undefined) { - throw new Error('Required parameter destinations was null or undefined when calling getTaskResultsForDestinations.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (destinations) { - destinations.forEach((element) => { - queryParameters = queryParameters.append('destinations[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/tasksManager/getTaskResultsForDestinations`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Return list of TaskResults by a Task for GUI. - * @param task Task id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getTaskResultsForGUIByTask(task: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getTaskResultsForGUIByTask(task: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getTaskResultsForGUIByTask(task: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getTaskResultsForGUIByTask(task: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (task === null || task === undefined) { - throw new Error('Required parameter task was null or undefined when calling getTaskResultsForGUIByTask.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (task !== undefined && task !== null) { - queryParameters = queryParameters.set('task', task); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/tasksManager/getTaskResultsForGUIByTask`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Return list of TaskResults by a Task and destination for GUI. - * @param task Task id - * @param destination id of Destination - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getTaskResultsForGUIByTaskAndDestination(task: number, destination: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getTaskResultsForGUIByTaskAndDestination(task: number, destination: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getTaskResultsForGUIByTaskAndDestination(task: number, destination: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getTaskResultsForGUIByTaskAndDestination(task: number, destination: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (task === null || task === undefined) { - throw new Error('Required parameter task was null or undefined when calling getTaskResultsForGUIByTaskAndDestination.'); - } - if (destination === null || destination === undefined) { - throw new Error('Required parameter destination was null or undefined when calling getTaskResultsForGUIByTaskAndDestination.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (task !== undefined && task !== null) { - queryParameters = queryParameters.set('task', task); - } - if (destination !== undefined && destination !== null) { - queryParameters = queryParameters.set('destination', destination); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/tasksManager/getTaskResultsForGUIByTaskAndDestination`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Return list of only newest TaskResults by a Task for GUI. - * @param task Task id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getTaskResultsForGUIByTaskOnlyNewest(task: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getTaskResultsForGUIByTaskOnlyNewest(task: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getTaskResultsForGUIByTaskOnlyNewest(task: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getTaskResultsForGUIByTaskOnlyNewest(task: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (task === null || task === undefined) { - throw new Error('Required parameter task was null or undefined when calling getTaskResultsForGUIByTaskOnlyNewest.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (task !== undefined && task !== null) { - queryParameters = queryParameters.set('task', task); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/tasksManager/getTaskResultsForGUIByTaskOnlyNewest`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Whether task exists. - * @param service id of Service - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public isThereSuchTask(service: number, facility: number, observe?: 'body', reportProgress?: boolean): Observable; - public isThereSuchTask(service: number, facility: number, observe?: 'response', reportProgress?: boolean): Observable>; - public isThereSuchTask(service: number, facility: number, observe?: 'events', reportProgress?: boolean): Observable>; - public isThereSuchTask(service: number, facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (service === null || service === undefined) { - throw new Error('Required parameter service was null or undefined when calling isThereSuchTask.'); - } - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling isThereSuchTask.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (service !== undefined && service !== null) { - queryParameters = queryParameters.set('service', service); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/tasksManager/isThereSuchTask`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns all tasks. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public listAllTasks(observe?: 'body', reportProgress?: boolean): Observable>; - public listAllTasks(observe?: 'response', reportProgress?: boolean): Observable>>; - public listAllTasks(observe?: 'events', reportProgress?: boolean): Observable>>; - public listAllTasks(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/tasksManager/listAllTasks`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns all tasks associated with selected facility. - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public listAllTasksForFacility(facility: number, observe?: 'body', reportProgress?: boolean): Observable>; - public listAllTasksForFacility(facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public listAllTasksForFacility(facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public listAllTasksForFacility(facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling listAllTasksForFacility.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/tasksManager/listAllTasksForFacility`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Suspends waiting tasks propagation to the engine. Does not affect already propagated tasks. - * @param suspend if true stops propagating waiting tasks to the engine, if false resumes propagation - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public suspendTasksPropagation(suspend: boolean, observe?: 'body', reportProgress?: boolean): Observable; - public suspendTasksPropagation(suspend: boolean, observe?: 'response', reportProgress?: boolean): Observable>; - public suspendTasksPropagation(suspend: boolean, observe?: 'events', reportProgress?: boolean): Observable>; - public suspendTasksPropagation(suspend: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (suspend === null || suspend === undefined) { - throw new Error('Required parameter suspend was null or undefined when calling suspendTasksPropagation.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (suspend !== undefined && suspend !== null) { - queryParameters = queryParameters.set('suspend', suspend); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/json/tasksManager/suspendTasksPropagation`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/tasksManager/listAllTasks`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns all tasks associated with selected facility. + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public listAllTasksForFacility( + facility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public listAllTasksForFacility( + facility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public listAllTasksForFacility( + facility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public listAllTasksForFacility( + facility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling listAllTasksForFacility.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/tasksManager/listAllTasksForFacility`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Suspends waiting tasks propagation to the engine. Does not affect already propagated tasks. + * @param suspend if true stops propagating waiting tasks to the engine, if false resumes propagation + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public suspendTasksPropagation( + suspend: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public suspendTasksPropagation( + suspend: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public suspendTasksPropagation( + suspend: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public suspendTasksPropagation( + suspend: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (suspend === null || suspend === undefined) { + throw new Error( + 'Required parameter suspend was null or undefined when calling suspendTasksPropagation.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (suspend !== undefined && suspend !== null) { + queryParameters = queryParameters.set('suspend', suspend); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); } + return this.httpClient.post( + `${this.configuration.basePath}/json/tasksManager/suspendTasksPropagation`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } } diff --git a/libs/perun/openapi/src/lib/api/usersManager.service.ts b/libs/perun/openapi/src/lib/api/usersManager.service.ts index 94eefd767..96009ff26 100644 --- a/libs/perun/openapi/src/lib/api/usersManager.service.ts +++ b/libs/perun/openapi/src/lib/api/usersManager.service.ts @@ -11,11 +11,17 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { AddUserExtSourceInput } from '../model/addUserExtSourceInput'; import { Group } from '../model/group'; @@ -32,3755 +38,5200 @@ import { User } from '../model/user'; import { UserExtSource } from '../model/userExtSource'; import { Vo } from '../model/vo'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - - +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class UsersManagerService { + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string, + @Optional() configuration: Configuration + ) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + /** + * Add specific user owner. + * @param user id of User + * @param specificUser id of specific User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addSpecificUserOwner( + user: number, + specificUser: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public addSpecificUserOwner( + user: number, + specificUser: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public addSpecificUserOwner( + user: number, + specificUser: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public addSpecificUserOwner( + user: number, + specificUser: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling addSpecificUserOwner.' + ); + } + if (specificUser === null || specificUser === undefined) { + throw new Error( + 'Required parameter specificUser was null or undefined when calling addSpecificUserOwner.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (specificUser !== undefined && specificUser !== null) { + queryParameters = queryParameters.set('specificUser', specificUser); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/usersManager/addSpecificUserOwner`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Adds user\'s external sources. + * @param addUserExtSourceInput + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addUserExtSource( + addUserExtSourceInput: AddUserExtSourceInput, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public addUserExtSource( + addUserExtSourceInput: AddUserExtSourceInput, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public addUserExtSource( + addUserExtSourceInput: AddUserExtSourceInput, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public addUserExtSource( + addUserExtSourceInput: AddUserExtSourceInput, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (addUserExtSourceInput === null || addUserExtSourceInput === undefined) { + throw new Error( + 'Required parameter addUserExtSourceInput was null or undefined when calling addUserExtSource.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/usersManager/addUserExtSource`, + addUserExtSourceInput, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Anonymizes user - according to configuration, each of user\'s attributes is either anonymized, kept untouched or deleted. Also deletes other user\'s related data, e.g. authorships of users publications, mail change and password reset requests, bans... + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public anonymizeUser(user: number, observe?: 'body', reportProgress?: boolean): Observable; + public anonymizeUser( + user: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public anonymizeUser( + user: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public anonymizeUser( + user: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling anonymizeUser.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/usersManager/anonymizeUser`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Changes user password in defined login-namespace based on token parameter. + * This method throws PasswordResetLinkExpiredException when the password reset request expired. This method throws PasswordResetLinkNotValidException when the password reset request was already used or has never existed. + * @param token token for the password reset request + * @param password password + * @param lang language to get notifications in (optional) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public changeNonAuthzPasswordByToken( + token: string, + password: string, + lang?: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public changeNonAuthzPasswordByToken( + token: string, + password: string, + lang?: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public changeNonAuthzPasswordByToken( + token: string, + password: string, + lang?: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public changeNonAuthzPasswordByToken( + token: string, + password: string, + lang?: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (token === null || token === undefined) { + throw new Error( + 'Required parameter token was null or undefined when calling changeNonAuthzPasswordByToken.' + ); + } + if (password === null || password === undefined) { + throw new Error( + 'Required parameter password was null or undefined when calling changeNonAuthzPasswordByToken.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (token !== undefined && token !== null) { + queryParameters = queryParameters.set('token', token); + } + if (password !== undefined && password !== null) { + queryParameters = queryParameters.set('password', password); + } + if (lang !== undefined && lang !== null) { + queryParameters = queryParameters.set('lang', lang); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/usersManager/changeNonAuthzPassword/token`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Changes password for a user in specified login-namespace. + * @param login login + * @param namespace namespace + * @param newPassword + * @param oldPassword + * @param checkOldPassword True if the oldPassword has to be checked. When omitted it defaults to false. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public changePasswordForLogin( + login: string, + namespace: string, + newPassword: string, + oldPassword?: string, + checkOldPassword?: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public changePasswordForLogin( + login: string, + namespace: string, + newPassword: string, + oldPassword?: string, + checkOldPassword?: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public changePasswordForLogin( + login: string, + namespace: string, + newPassword: string, + oldPassword?: string, + checkOldPassword?: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public changePasswordForLogin( + login: string, + namespace: string, + newPassword: string, + oldPassword?: string, + checkOldPassword?: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (login === null || login === undefined) { + throw new Error( + 'Required parameter login was null or undefined when calling changePasswordForLogin.' + ); + } + if (namespace === null || namespace === undefined) { + throw new Error( + 'Required parameter namespace was null or undefined when calling changePasswordForLogin.' + ); + } + if (newPassword === null || newPassword === undefined) { + throw new Error( + 'Required parameter newPassword was null or undefined when calling changePasswordForLogin.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (login !== undefined && login !== null) { + queryParameters = queryParameters.set('login', login); + } + if (namespace !== undefined && namespace !== null) { + queryParameters = queryParameters.set('namespace', namespace); + } + if (newPassword !== undefined && newPassword !== null) { + queryParameters = queryParameters.set('newPassword', newPassword); + } + if (oldPassword !== undefined && oldPassword !== null) { + queryParameters = queryParameters.set('oldPassword', oldPassword); + } + if (checkOldPassword !== undefined && checkOldPassword !== null) { + queryParameters = queryParameters.set('checkOldPassword', checkOldPassword); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/usersManager/changePassword/login`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Changes password for a user in specified login-namespace. + * @param user id of User + * @param namespace namespace + * @param newPassword + * @param oldPassword + * @param checkOldPassword True if the oldPassword has to be checked. When omitted it defaults to false. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public changePasswordForUser( + user: number, + namespace: string, + newPassword: string, + oldPassword?: string, + checkOldPassword?: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public changePasswordForUser( + user: number, + namespace: string, + newPassword: string, + oldPassword?: string, + checkOldPassword?: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public changePasswordForUser( + user: number, + namespace: string, + newPassword: string, + oldPassword?: string, + checkOldPassword?: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public changePasswordForUser( + user: number, + namespace: string, + newPassword: string, + oldPassword?: string, + checkOldPassword?: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling changePasswordForUser.' + ); + } + if (namespace === null || namespace === undefined) { + throw new Error( + 'Required parameter namespace was null or undefined when calling changePasswordForUser.' + ); + } + if (newPassword === null || newPassword === undefined) { + throw new Error( + 'Required parameter newPassword was null or undefined when calling changePasswordForUser.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (namespace !== undefined && namespace !== null) { + queryParameters = queryParameters.set('namespace', namespace); + } + if (newPassword !== undefined && newPassword !== null) { + queryParameters = queryParameters.set('newPassword', newPassword); + } + if (oldPassword !== undefined && oldPassword !== null) { + queryParameters = queryParameters.set('oldPassword', oldPassword); + } + if (checkOldPassword !== undefined && checkOldPassword !== null) { + queryParameters = queryParameters.set('checkOldPassword', checkOldPassword); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/usersManager/changePassword/user`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Checks if the password reset request is valid. + * This method throws PasswordResetLinkExpiredException when the password reset request expired. This method throws PasswordResetLinkNotValidException when the password reset request was already used or has never existed. + * @param token token for the password reset request + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public checkPasswordResetRequestByTokenIsValid( + token: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public checkPasswordResetRequestByTokenIsValid( + token: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public checkPasswordResetRequestByTokenIsValid( + token: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public checkPasswordResetRequestByTokenIsValid( + token: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (token === null || token === undefined) { + throw new Error( + 'Required parameter token was null or undefined when calling checkPasswordResetRequestByTokenIsValid.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (token !== undefined && token !== null) { + queryParameters = queryParameters.set('token', token); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/usersManager/checkPasswordResetRequestIsValid/token`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Check password strength for the given namespace. + * If the check fails, the PasswordStrengthException error is returned. + * @param password password + * @param namespace namespace + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public checkPasswordStrength( + password: string, + namespace: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public checkPasswordStrength( + password: string, + namespace: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public checkPasswordStrength( + password: string, + namespace: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public checkPasswordStrength( + password: string, + namespace: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (password === null || password === undefined) { + throw new Error( + 'Required parameter password was null or undefined when calling checkPasswordStrength.' + ); + } + if (namespace === null || namespace === undefined) { + throw new Error( + 'Required parameter namespace was null or undefined when calling checkPasswordStrength.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (password !== undefined && password !== null) { + queryParameters = queryParameters.set('password', password); + } + if (namespace !== undefined && namespace !== null) { + queryParameters = queryParameters.set('namespace', namespace); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/usersManager/checkPasswordStrength`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Creates alternative password in external system. + * @param user id of User + * @param description + * @param loginNamespace + * @param password + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createAlternativePassword( + user: number, + description: string, + loginNamespace: string, + password: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public createAlternativePassword( + user: number, + description: string, + loginNamespace: string, + password: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public createAlternativePassword( + user: number, + description: string, + loginNamespace: string, + password: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public createAlternativePassword( + user: number, + description: string, + loginNamespace: string, + password: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling createAlternativePassword.' + ); + } + if (description === null || description === undefined) { + throw new Error( + 'Required parameter description was null or undefined when calling createAlternativePassword.' + ); + } + if (loginNamespace === null || loginNamespace === undefined) { + throw new Error( + 'Required parameter loginNamespace was null or undefined when calling createAlternativePassword.' + ); + } + if (password === null || password === undefined) { + throw new Error( + 'Required parameter password was null or undefined when calling createAlternativePassword.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (description !== undefined && description !== null) { + queryParameters = queryParameters.set('description', description); + } + if (loginNamespace !== undefined && loginNamespace !== null) { + queryParameters = queryParameters.set('loginNamespace', loginNamespace); + } + if (password !== undefined && password !== null) { + queryParameters = queryParameters.set('password', password); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/usersManager/createAlternativePassword`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * From given candidate, creates a service user and assign given owners to him. + * This method also checks if some of given userExtSources do exist. If so, this method throws a UserExtSourceExistsException. This method can also set only user-def and user-opt attributes for the given candidate. + * @param inputCreateServiceUser + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createServiceUser( + inputCreateServiceUser: InputCreateServiceUser, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public createServiceUser( + inputCreateServiceUser: InputCreateServiceUser, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public createServiceUser( + inputCreateServiceUser: InputCreateServiceUser, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public createServiceUser( + inputCreateServiceUser: InputCreateServiceUser, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputCreateServiceUser === null || inputCreateServiceUser === undefined) { + throw new Error( + 'Required parameter inputCreateServiceUser was null or undefined when calling createServiceUser.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/usersManager/createServiceUser`, + inputCreateServiceUser, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Deletes alternative password in external system. + * @param user id of User + * @param loginNamespace + * @param passwordId + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteAlternativePassword( + user: number, + loginNamespace: string, + passwordId: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public deleteAlternativePassword( + user: number, + loginNamespace: string, + passwordId: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public deleteAlternativePassword( + user: number, + loginNamespace: string, + passwordId: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public deleteAlternativePassword( + user: number, + loginNamespace: string, + passwordId: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling deleteAlternativePassword.' + ); + } + if (loginNamespace === null || loginNamespace === undefined) { + throw new Error( + 'Required parameter loginNamespace was null or undefined when calling deleteAlternativePassword.' + ); + } + if (passwordId === null || passwordId === undefined) { + throw new Error( + 'Required parameter passwordId was null or undefined when calling deleteAlternativePassword.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (loginNamespace !== undefined && loginNamespace !== null) { + queryParameters = queryParameters.set('loginNamespace', loginNamespace); + } + if (passwordId !== undefined && passwordId !== null) { + queryParameters = queryParameters.set('passwordId', passwordId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/usersManager/deleteAlternativePassword`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Delete password for a user in specified login-namespace. + * @param login login + * @param namespace namespace + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deletePasswordForLogin( + login: string, + namespace: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public deletePasswordForLogin( + login: string, + namespace: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public deletePasswordForLogin( + login: string, + namespace: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public deletePasswordForLogin( + login: string, + namespace: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (login === null || login === undefined) { + throw new Error( + 'Required parameter login was null or undefined when calling deletePasswordForLogin.' + ); + } + if (namespace === null || namespace === undefined) { + throw new Error( + 'Required parameter namespace was null or undefined when calling deletePasswordForLogin.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (login !== undefined && login !== null) { + queryParameters = queryParameters.set('login', login); + } + if (namespace !== undefined && namespace !== null) { + queryParameters = queryParameters.set('namespace', namespace); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/usersManager/deletePassword/login`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Delete password for a user in specified login-namespace. + * @param user id of User + * @param namespace namespace + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deletePasswordForUser( + user: number, + namespace: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public deletePasswordForUser( + user: number, + namespace: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public deletePasswordForUser( + user: number, + namespace: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public deletePasswordForUser( + user: number, + namespace: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling deletePasswordForUser.' + ); + } + if (namespace === null || namespace === undefined) { + throw new Error( + 'Required parameter namespace was null or undefined when calling deletePasswordForUser.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (namespace !== undefined && namespace !== null) { + queryParameters = queryParameters.set('namespace', namespace); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/usersManager/deletePassword/user`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Deletes a user. + * @param user id of User + * @param force If true, delete entity forcefully. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteUser( + user: number, + force?: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public deleteUser( + user: number, + force?: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public deleteUser( + user: number, + force?: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public deleteUser( + user: number, + force?: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling deleteUser.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (force !== undefined && force !== null) { + queryParameters = queryParameters.set('force', force); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/usersManager/deleteUser`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns list of RichUsers with attributes who matches the searchString, searching name, email, logins. + * @param searchString Text to search by + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findRichUsers( + searchString: string, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public findRichUsers( + searchString: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public findRichUsers( + searchString: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public findRichUsers( + searchString: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (searchString === null || searchString === undefined) { + throw new Error( + 'Required parameter searchString was null or undefined when calling findRichUsers.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (searchString !== undefined && searchString !== null) { + queryParameters = queryParameters.set('searchString', searchString); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/usersManager/findRichUsers`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns list of RichUsers with attributes who matches the searchString. + * @param searchString Text to search by + * @param attrsNames list of attribute names List<String> or null + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findRichUsersWithAttributes( + searchString: string, + attrsNames?: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public findRichUsersWithAttributes( + searchString: string, + attrsNames?: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public findRichUsersWithAttributes( + searchString: string, + attrsNames?: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public findRichUsersWithAttributes( + searchString: string, + attrsNames?: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (searchString === null || searchString === undefined) { + throw new Error( + 'Required parameter searchString was null or undefined when calling findRichUsersWithAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (searchString !== undefined && searchString !== null) { + queryParameters = queryParameters.set('searchString', searchString); + } + if (attrsNames) { + attrsNames.forEach((element) => { + queryParameters = queryParameters.append('attrsNames[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/usersManager/findRichUsersWithAttributes`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns list of Users with attributes who matches the searchString, searching name, email, logins. + * @param searchString Text to search by + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findUsers( + searchString: string, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public findUsers( + searchString: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public findUsers( + searchString: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public findUsers( + searchString: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (searchString === null || searchString === undefined) { + throw new Error( + 'Required parameter searchString was null or undefined when calling findUsers.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (searchString !== undefined && searchString !== null) { + queryParameters = queryParameters.set('searchString', searchString); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/usersManager/findUsers`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Generates user account in a backend system associated with login-namespace in Perun. Parameters are implementation-dependent for each login-namespace. Returns map with 1) key=login-namespace attribute urn, value=generated login 2) rest of opt response attributes. + * @param namespace namespace + * @param name + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public generateAccountForName( + namespace: string, + name?: string, + observe?: 'body', + reportProgress?: boolean + ): Observable<{ [key: string]: string }>; + public generateAccountForName( + namespace: string, + name?: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public generateAccountForName( + namespace: string, + name?: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public generateAccountForName( + namespace: string, + name?: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (namespace === null || namespace === undefined) { + throw new Error( + 'Required parameter namespace was null or undefined when calling generateAccountForName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (namespace !== undefined && namespace !== null) { + queryParameters = queryParameters.set('namespace', namespace); + } + if (name !== undefined && name !== null) { + queryParameters = queryParameters.set('name', name); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post<{ [key: string]: string }>( + `${this.configuration.basePath}/urlinjsonout/usersManager/generateAccount/name`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns users with attributes + * Returns list of objects representing the User with attributes + * @param includedSpecificUsers if you want to or don\'t want to get specificUsers too + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllRichUsersWithAttributes( + includedSpecificUsers: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAllRichUsersWithAttributes( + includedSpecificUsers: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllRichUsersWithAttributes( + includedSpecificUsers: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAllRichUsersWithAttributes( + includedSpecificUsers: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (includedSpecificUsers === null || includedSpecificUsers === undefined) { + throw new Error( + 'Required parameter includedSpecificUsers was null or undefined when calling getAllRichUsersWithAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (includedSpecificUsers !== undefined && includedSpecificUsers !== null) { + queryParameters = queryParameters.set('includedSpecificUsers', includedSpecificUsers); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - - - /** - * Add specific user owner. - * @param user id of User - * @param specificUser id of specific User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addSpecificUserOwner(user: number, specificUser: number, observe?: 'body', reportProgress?: boolean): Observable; - public addSpecificUserOwner(user: number, specificUser: number, observe?: 'response', reportProgress?: boolean): Observable>; - public addSpecificUserOwner(user: number, specificUser: number, observe?: 'events', reportProgress?: boolean): Observable>; - public addSpecificUserOwner(user: number, specificUser: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling addSpecificUserOwner.'); - } - if (specificUser === null || specificUser === undefined) { - throw new Error('Required parameter specificUser was null or undefined when calling addSpecificUserOwner.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (specificUser !== undefined && specificUser !== null) { - queryParameters = queryParameters.set('specificUser', specificUser); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/addSpecificUserOwner`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Adds user\'s external sources. - * @param addUserExtSourceInput - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addUserExtSource(addUserExtSourceInput: AddUserExtSourceInput, observe?: 'body', reportProgress?: boolean): Observable; - public addUserExtSource(addUserExtSourceInput: AddUserExtSourceInput, observe?: 'response', reportProgress?: boolean): Observable>; - public addUserExtSource(addUserExtSourceInput: AddUserExtSourceInput, observe?: 'events', reportProgress?: boolean): Observable>; - public addUserExtSource(addUserExtSourceInput: AddUserExtSourceInput, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (addUserExtSourceInput === null || addUserExtSourceInput === undefined) { - throw new Error('Required parameter addUserExtSourceInput was null or undefined when calling addUserExtSource.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/usersManager/addUserExtSource`, - addUserExtSourceInput, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Anonymizes user - according to configuration, each of user\'s attributes is either anonymized, kept untouched or deleted. Also deletes other user\'s related data, e.g. authorships of users publications, mail change and password reset requests, bans... - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public anonymizeUser(user: number, observe?: 'body', reportProgress?: boolean): Observable; - public anonymizeUser(user: number, observe?: 'response', reportProgress?: boolean): Observable>; - public anonymizeUser(user: number, observe?: 'events', reportProgress?: boolean): Observable>; - public anonymizeUser(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling anonymizeUser.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/anonymizeUser`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Changes user password in defined login-namespace based on token parameter. - * This method throws PasswordResetLinkExpiredException when the password reset request expired. This method throws PasswordResetLinkNotValidException when the password reset request was already used or has never existed. - * @param token token for the password reset request - * @param password password - * @param lang language to get notifications in (optional) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public changeNonAuthzPasswordByToken(token: string, password: string, lang?: string, observe?: 'body', reportProgress?: boolean): Observable; - public changeNonAuthzPasswordByToken(token: string, password: string, lang?: string, observe?: 'response', reportProgress?: boolean): Observable>; - public changeNonAuthzPasswordByToken(token: string, password: string, lang?: string, observe?: 'events', reportProgress?: boolean): Observable>; - public changeNonAuthzPasswordByToken(token: string, password: string, lang?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (token === null || token === undefined) { - throw new Error('Required parameter token was null or undefined when calling changeNonAuthzPasswordByToken.'); - } - if (password === null || password === undefined) { - throw new Error('Required parameter password was null or undefined when calling changeNonAuthzPasswordByToken.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (token !== undefined && token !== null) { - queryParameters = queryParameters.set('token', token); - } - if (password !== undefined && password !== null) { - queryParameters = queryParameters.set('password', password); - } - if (lang !== undefined && lang !== null) { - queryParameters = queryParameters.set('lang', lang); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/changeNonAuthzPassword/token`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Changes password for a user in specified login-namespace. - * @param login login - * @param namespace namespace - * @param newPassword - * @param oldPassword - * @param checkOldPassword True if the oldPassword has to be checked. When omitted it defaults to false. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public changePasswordForLogin(login: string, namespace: string, newPassword: string, oldPassword?: string, checkOldPassword?: boolean, observe?: 'body', reportProgress?: boolean): Observable; - public changePasswordForLogin(login: string, namespace: string, newPassword: string, oldPassword?: string, checkOldPassword?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; - public changePasswordForLogin(login: string, namespace: string, newPassword: string, oldPassword?: string, checkOldPassword?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; - public changePasswordForLogin(login: string, namespace: string, newPassword: string, oldPassword?: string, checkOldPassword?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (login === null || login === undefined) { - throw new Error('Required parameter login was null or undefined when calling changePasswordForLogin.'); - } - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling changePasswordForLogin.'); - } - if (newPassword === null || newPassword === undefined) { - throw new Error('Required parameter newPassword was null or undefined when calling changePasswordForLogin.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (login !== undefined && login !== null) { - queryParameters = queryParameters.set('login', login); - } - if (namespace !== undefined && namespace !== null) { - queryParameters = queryParameters.set('namespace', namespace); - } - if (newPassword !== undefined && newPassword !== null) { - queryParameters = queryParameters.set('newPassword', newPassword); - } - if (oldPassword !== undefined && oldPassword !== null) { - queryParameters = queryParameters.set('oldPassword', oldPassword); - } - if (checkOldPassword !== undefined && checkOldPassword !== null) { - queryParameters = queryParameters.set('checkOldPassword', checkOldPassword); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/changePassword/login`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Changes password for a user in specified login-namespace. - * @param user id of User - * @param namespace namespace - * @param newPassword - * @param oldPassword - * @param checkOldPassword True if the oldPassword has to be checked. When omitted it defaults to false. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public changePasswordForUser(user: number, namespace: string, newPassword: string, oldPassword?: string, checkOldPassword?: boolean, observe?: 'body', reportProgress?: boolean): Observable; - public changePasswordForUser(user: number, namespace: string, newPassword: string, oldPassword?: string, checkOldPassword?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; - public changePasswordForUser(user: number, namespace: string, newPassword: string, oldPassword?: string, checkOldPassword?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; - public changePasswordForUser(user: number, namespace: string, newPassword: string, oldPassword?: string, checkOldPassword?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling changePasswordForUser.'); - } - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling changePasswordForUser.'); - } - if (newPassword === null || newPassword === undefined) { - throw new Error('Required parameter newPassword was null or undefined when calling changePasswordForUser.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (namespace !== undefined && namespace !== null) { - queryParameters = queryParameters.set('namespace', namespace); - } - if (newPassword !== undefined && newPassword !== null) { - queryParameters = queryParameters.set('newPassword', newPassword); - } - if (oldPassword !== undefined && oldPassword !== null) { - queryParameters = queryParameters.set('oldPassword', oldPassword); - } - if (checkOldPassword !== undefined && checkOldPassword !== null) { - queryParameters = queryParameters.set('checkOldPassword', checkOldPassword); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/changePassword/user`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Checks if the password reset request is valid. - * This method throws PasswordResetLinkExpiredException when the password reset request expired. This method throws PasswordResetLinkNotValidException when the password reset request was already used or has never existed. - * @param token token for the password reset request - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public checkPasswordResetRequestByTokenIsValid(token: string, observe?: 'body', reportProgress?: boolean): Observable; - public checkPasswordResetRequestByTokenIsValid(token: string, observe?: 'response', reportProgress?: boolean): Observable>; - public checkPasswordResetRequestByTokenIsValid(token: string, observe?: 'events', reportProgress?: boolean): Observable>; - public checkPasswordResetRequestByTokenIsValid(token: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (token === null || token === undefined) { - throw new Error('Required parameter token was null or undefined when calling checkPasswordResetRequestByTokenIsValid.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (token !== undefined && token !== null) { - queryParameters = queryParameters.set('token', token); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/usersManager/checkPasswordResetRequestIsValid/token`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Check password strength for the given namespace. - * If the check fails, the PasswordStrengthException error is returned. - * @param password password - * @param namespace namespace - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public checkPasswordStrength(password: string, namespace: string, observe?: 'body', reportProgress?: boolean): Observable; - public checkPasswordStrength(password: string, namespace: string, observe?: 'response', reportProgress?: boolean): Observable>; - public checkPasswordStrength(password: string, namespace: string, observe?: 'events', reportProgress?: boolean): Observable>; - public checkPasswordStrength(password: string, namespace: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (password === null || password === undefined) { - throw new Error('Required parameter password was null or undefined when calling checkPasswordStrength.'); - } - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling checkPasswordStrength.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (password !== undefined && password !== null) { - queryParameters = queryParameters.set('password', password); - } - if (namespace !== undefined && namespace !== null) { - queryParameters = queryParameters.set('namespace', namespace); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/usersManager/checkPasswordStrength`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Creates alternative password in external system. - * @param user id of User - * @param description - * @param loginNamespace - * @param password - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createAlternativePassword(user: number, description: string, loginNamespace: string, password: string, observe?: 'body', reportProgress?: boolean): Observable; - public createAlternativePassword(user: number, description: string, loginNamespace: string, password: string, observe?: 'response', reportProgress?: boolean): Observable>; - public createAlternativePassword(user: number, description: string, loginNamespace: string, password: string, observe?: 'events', reportProgress?: boolean): Observable>; - public createAlternativePassword(user: number, description: string, loginNamespace: string, password: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling createAlternativePassword.'); - } - if (description === null || description === undefined) { - throw new Error('Required parameter description was null or undefined when calling createAlternativePassword.'); - } - if (loginNamespace === null || loginNamespace === undefined) { - throw new Error('Required parameter loginNamespace was null or undefined when calling createAlternativePassword.'); - } - if (password === null || password === undefined) { - throw new Error('Required parameter password was null or undefined when calling createAlternativePassword.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (description !== undefined && description !== null) { - queryParameters = queryParameters.set('description', description); - } - if (loginNamespace !== undefined && loginNamespace !== null) { - queryParameters = queryParameters.set('loginNamespace', loginNamespace); - } - if (password !== undefined && password !== null) { - queryParameters = queryParameters.set('password', password); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/createAlternativePassword`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * From given candidate, creates a service user and assign given owners to him. - * This method also checks if some of given userExtSources do exist. If so, this method throws a UserExtSourceExistsException. This method can also set only user-def and user-opt attributes for the given candidate. - * @param inputCreateServiceUser - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createServiceUser(inputCreateServiceUser: InputCreateServiceUser, observe?: 'body', reportProgress?: boolean): Observable; - public createServiceUser(inputCreateServiceUser: InputCreateServiceUser, observe?: 'response', reportProgress?: boolean): Observable>; - public createServiceUser(inputCreateServiceUser: InputCreateServiceUser, observe?: 'events', reportProgress?: boolean): Observable>; - public createServiceUser(inputCreateServiceUser: InputCreateServiceUser, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputCreateServiceUser === null || inputCreateServiceUser === undefined) { - throw new Error('Required parameter inputCreateServiceUser was null or undefined when calling createServiceUser.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/usersManager/createServiceUser`, - inputCreateServiceUser, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Deletes alternative password in external system. - * @param user id of User - * @param loginNamespace - * @param passwordId - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteAlternativePassword(user: number, loginNamespace: string, passwordId: string, observe?: 'body', reportProgress?: boolean): Observable; - public deleteAlternativePassword(user: number, loginNamespace: string, passwordId: string, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteAlternativePassword(user: number, loginNamespace: string, passwordId: string, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteAlternativePassword(user: number, loginNamespace: string, passwordId: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling deleteAlternativePassword.'); - } - if (loginNamespace === null || loginNamespace === undefined) { - throw new Error('Required parameter loginNamespace was null or undefined when calling deleteAlternativePassword.'); - } - if (passwordId === null || passwordId === undefined) { - throw new Error('Required parameter passwordId was null or undefined when calling deleteAlternativePassword.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (loginNamespace !== undefined && loginNamespace !== null) { - queryParameters = queryParameters.set('loginNamespace', loginNamespace); - } - if (passwordId !== undefined && passwordId !== null) { - queryParameters = queryParameters.set('passwordId', passwordId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/deleteAlternativePassword`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Delete password for a user in specified login-namespace. - * @param login login - * @param namespace namespace - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deletePasswordForLogin(login: string, namespace: string, observe?: 'body', reportProgress?: boolean): Observable; - public deletePasswordForLogin(login: string, namespace: string, observe?: 'response', reportProgress?: boolean): Observable>; - public deletePasswordForLogin(login: string, namespace: string, observe?: 'events', reportProgress?: boolean): Observable>; - public deletePasswordForLogin(login: string, namespace: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (login === null || login === undefined) { - throw new Error('Required parameter login was null or undefined when calling deletePasswordForLogin.'); - } - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deletePasswordForLogin.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (login !== undefined && login !== null) { - queryParameters = queryParameters.set('login', login); - } - if (namespace !== undefined && namespace !== null) { - queryParameters = queryParameters.set('namespace', namespace); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/deletePassword/login`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Delete password for a user in specified login-namespace. - * @param user id of User - * @param namespace namespace - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deletePasswordForUser(user: number, namespace: string, observe?: 'body', reportProgress?: boolean): Observable; - public deletePasswordForUser(user: number, namespace: string, observe?: 'response', reportProgress?: boolean): Observable>; - public deletePasswordForUser(user: number, namespace: string, observe?: 'events', reportProgress?: boolean): Observable>; - public deletePasswordForUser(user: number, namespace: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling deletePasswordForUser.'); - } - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deletePasswordForUser.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (namespace !== undefined && namespace !== null) { - queryParameters = queryParameters.set('namespace', namespace); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/deletePassword/user`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Deletes a user. - * @param user id of User - * @param force If true, delete entity forcefully. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteUser(user: number, force?: boolean, observe?: 'body', reportProgress?: boolean): Observable; - public deleteUser(user: number, force?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteUser(user: number, force?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteUser(user: number, force?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling deleteUser.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (force !== undefined && force !== null) { - queryParameters = queryParameters.set('force', force); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/deleteUser`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns list of RichUsers with attributes who matches the searchString, searching name, email, logins. - * @param searchString Text to search by - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findRichUsers(searchString: string, observe?: 'body', reportProgress?: boolean): Observable>; - public findRichUsers(searchString: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public findRichUsers(searchString: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public findRichUsers(searchString: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (searchString === null || searchString === undefined) { - throw new Error('Required parameter searchString was null or undefined when calling findRichUsers.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (searchString !== undefined && searchString !== null) { - queryParameters = queryParameters.set('searchString', searchString); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/findRichUsers`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns list of RichUsers with attributes who matches the searchString. - * @param searchString Text to search by - * @param attrsNames list of attribute names List<String> or null - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findRichUsersWithAttributes(searchString: string, attrsNames?: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public findRichUsersWithAttributes(searchString: string, attrsNames?: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public findRichUsersWithAttributes(searchString: string, attrsNames?: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public findRichUsersWithAttributes(searchString: string, attrsNames?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (searchString === null || searchString === undefined) { - throw new Error('Required parameter searchString was null or undefined when calling findRichUsersWithAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (searchString !== undefined && searchString !== null) { - queryParameters = queryParameters.set('searchString', searchString); - } - if (attrsNames) { - attrsNames.forEach((element) => { - queryParameters = queryParameters.append('attrsNames[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/findRichUsersWithAttributes`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns list of Users with attributes who matches the searchString, searching name, email, logins. - * @param searchString Text to search by - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findUsers(searchString: string, observe?: 'body', reportProgress?: boolean): Observable>; - public findUsers(searchString: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public findUsers(searchString: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public findUsers(searchString: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (searchString === null || searchString === undefined) { - throw new Error('Required parameter searchString was null or undefined when calling findUsers.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (searchString !== undefined && searchString !== null) { - queryParameters = queryParameters.set('searchString', searchString); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/findUsers`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Generates user account in a backend system associated with login-namespace in Perun. Parameters are implementation-dependent for each login-namespace. Returns map with 1) key=login-namespace attribute urn, value=generated login 2) rest of opt response attributes. - * @param namespace namespace - * @param name - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public generateAccountForName(namespace: string, name?: string, observe?: 'body', reportProgress?: boolean): Observable<{ [key: string]: string; }>; - public generateAccountForName(namespace: string, name?: string, observe?: 'response', reportProgress?: boolean): Observable>; - public generateAccountForName(namespace: string, name?: string, observe?: 'events', reportProgress?: boolean): Observable>; - public generateAccountForName(namespace: string, name?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling generateAccountForName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (namespace !== undefined && namespace !== null) { - queryParameters = queryParameters.set('namespace', namespace); - } - if (name !== undefined && name !== null) { - queryParameters = queryParameters.set('name', name); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post<{ [key: string]: string; }>(`${this.configuration.basePath}/urlinjsonout/usersManager/generateAccount/name`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns users with attributes - * Returns list of objects representing the User with attributes - * @param includedSpecificUsers if you want to or don\'t want to get specificUsers too - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllRichUsersWithAttributes(includedSpecificUsers: boolean, observe?: 'body', reportProgress?: boolean): Observable>; - public getAllRichUsersWithAttributes(includedSpecificUsers: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllRichUsersWithAttributes(includedSpecificUsers: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllRichUsersWithAttributes(includedSpecificUsers: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (includedSpecificUsers === null || includedSpecificUsers === undefined) { - throw new Error('Required parameter includedSpecificUsers was null or undefined when calling getAllRichUsersWithAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (includedSpecificUsers !== undefined && includedSpecificUsers !== null) { - queryParameters = queryParameters.set('includedSpecificUsers', includedSpecificUsers); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getAllRichUsersWithAttributes`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all rich resources which have the user assigned. - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAssignedRichResourcesForUser(user: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getAssignedRichResourcesForUser(user: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getAssignedRichResourcesForUser(user: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getAssignedRichResourcesForUser(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getAssignedRichResourcesForUser.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getAssignedRichResources`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get list of groups of user on specified facility where use is active. - * That means User is a VALID in the VO and the Group and groups are assigned to the facility. - * @param user id of User - * @param facility id of Facility - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupsForFacilityWhereUserIsActive(user: number, facility: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getGroupsForFacilityWhereUserIsActive(user: number, facility: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getGroupsForFacilityWhereUserIsActive(user: number, facility: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getGroupsForFacilityWhereUserIsActive(user: number, facility: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getGroupsForFacilityWhereUserIsActive.'); - } - if (facility === null || facility === undefined) { - throw new Error('Required parameter facility was null or undefined when calling getGroupsForFacilityWhereUserIsActive.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (facility !== undefined && facility !== null) { - queryParameters = queryParameters.set('facility', facility); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getGroupsWhereUserIsActive/facility`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get list of groups of user on specified resource where use is active. - * That means User is a VALID in the VO and the Group and groups are assigned to the resource. - * @param user id of User - * @param resource id of Resource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupsForResourceWhereUserIsActive(user: number, resource: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getGroupsForResourceWhereUserIsActive(user: number, resource: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getGroupsForResourceWhereUserIsActive(user: number, resource: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getGroupsForResourceWhereUserIsActive(user: number, resource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getGroupsForResourceWhereUserIsActive.'); - } - if (resource === null || resource === undefined) { - throw new Error('Required parameter resource was null or undefined when calling getGroupsForResourceWhereUserIsActive.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (resource !== undefined && resource !== null) { - queryParameters = queryParameters.set('resource', resource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getGroupsWhereUserIsActive/resource`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns list of Groups in selected Vo, where the User is a direct Administrator or he is a VALID member of any group which is Administrator of some of these Groups. - * @param user id of User - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupsInVoWhereUserIsAdmin(user: number, vo: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getGroupsInVoWhereUserIsAdmin(user: number, vo: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getGroupsInVoWhereUserIsAdmin(user: number, vo: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getGroupsInVoWhereUserIsAdmin(user: number, vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getGroupsInVoWhereUserIsAdmin.'); - } - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getGroupsInVoWhereUserIsAdmin.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getGroupsWhereUserIsAdmin/u-v`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns list of Groups in Perun, where the User is a direct Administrator or he is a VALID member of any group which is Administrator of some of these Groups. - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGroupsWhereUserIsAdmin(user: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getGroupsWhereUserIsAdmin(user: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getGroupsWhereUserIsAdmin(user: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getGroupsWhereUserIsAdmin(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getGroupsWhereUserIsAdmin.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getGroupsWhereUserIsAdmin/u`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Return list of email addresses of user, which are awaiting validation and are inside time window for validation. If there is no preferred email change request pending or requests are outside time window for validation, returns empty list. - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getPendingPreferredEmailChanges(user: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getPendingPreferredEmailChanges(user: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getPendingPreferredEmailChanges(user: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getPendingPreferredEmailChanges(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getPendingPreferredEmailChanges.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getPendingPreferredEmailChanges`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Gets list of all user\'s external sources with attributes. - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRichUserExtSources(user: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getRichUserExtSources(user: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getRichUserExtSources(user: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getRichUserExtSources(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getRichUserExtSources.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getRichUserExtSources/u`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns user with attributes - * Returns object representing the User with attributes - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRichUserWithAttributes(user: number, observe?: 'body', reportProgress?: boolean): Observable; - public getRichUserWithAttributes(user: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getRichUserWithAttributes(user: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getRichUserWithAttributes(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getRichUserWithAttributes.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/usersManager/getRichUserWithAttributes`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns rich users without attributes by their IDs. - * @param ids list of ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRichUsersByIds(ids: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getRichUsersByIds(ids: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getRichUsersByIds(ids: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getRichUsersByIds(ids: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (ids === null || ids === undefined) { - throw new Error('Required parameter ids was null or undefined when calling getRichUsersByIds.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (ids) { - ids.forEach((element) => { - queryParameters = queryParameters.append('ids[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getRichUsersByIds`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns rich users with attributes by their IDs. - * @param ids list of ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRichUsersWithAttributesByIds(ids: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getRichUsersWithAttributesByIds(ids: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getRichUsersWithAttributesByIds(ids: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getRichUsersWithAttributesByIds(ids: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (ids === null || ids === undefined) { - throw new Error('Required parameter ids was null or undefined when calling getRichUsersWithAttributesByIds.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (ids) { - ids.forEach((element) => { - queryParameters = queryParameters.append('ids[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getRichUsersWithAttributesByIds`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns list of RichUsers which are not members of any VO with attributes. - * @param attrsNames list of attribute names List<String> or null - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRichUsersWithoutVoWithAttributes(attrsNames?: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getRichUsersWithoutVoWithAttributes(attrsNames?: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getRichUsersWithoutVoWithAttributes(attrsNames?: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getRichUsersWithoutVoWithAttributes(attrsNames?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (attrsNames) { - attrsNames.forEach((element) => { - queryParameters = queryParameters.append('attrsNames[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getRichUsersWithoutVoWithAttributes`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get all specific users who are owned by the user. - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getSpecificUsersByUser(user: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getSpecificUsersByUser(user: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getSpecificUsersByUser(user: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getSpecificUsersByUser(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getSpecificUsersByUser.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getSpecificUsersByUser`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Gets sponsors for given member with optional attribute names. - * @param member id of Member - * @param attrNames list of attribute names List<String> or null - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getSponsorsForMember(member: number, attrNames?: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getSponsorsForMember(member: number, attrNames?: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getSponsorsForMember(member: number, attrNames?: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getSponsorsForMember(member: number, attrNames?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getSponsorsForMember.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getSponsorsForMember/member`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Gets sponsors for member specified by VO, extSourceName and extLogin with optional attribute names. - * @param vo id of Vo - * @param extSourceName external source name, e.g. IdP entityId - * @param extLogin external login of user, e.g. john - * @param attrNames list of attribute names List<String> or null - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getSponsorsForMemberByVoAndLogin(vo: number, extSourceName: string, extLogin: string, attrNames?: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getSponsorsForMemberByVoAndLogin(vo: number, extSourceName: string, extLogin: string, attrNames?: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getSponsorsForMemberByVoAndLogin(vo: number, extSourceName: string, extLogin: string, attrNames?: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getSponsorsForMemberByVoAndLogin(vo: number, extSourceName: string, extLogin: string, attrNames?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getSponsorsForMemberByVoAndLogin.'); - } - if (extSourceName === null || extSourceName === undefined) { - throw new Error('Required parameter extSourceName was null or undefined when calling getSponsorsForMemberByVoAndLogin.'); - } - if (extLogin === null || extLogin === undefined) { - throw new Error('Required parameter extLogin was null or undefined when calling getSponsorsForMemberByVoAndLogin.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (extSourceName !== undefined && extSourceName !== null) { - queryParameters = queryParameters.set('extSourceName', extSourceName); - } - if (extLogin !== undefined && extLogin !== null) { - queryParameters = queryParameters.set('extLogin', extLogin); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getSponsorsForMember/vo`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns user by its ExtSourceName and ExtLogin. - * Returns User found by its authentication data - * @param extLogin external login of user, e.g. john - * @param extSourceName external source name, e.g. IdP entityId - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserByExtSourceNameAndExtLogin(extLogin: string, extSourceName: string, observe?: 'body', reportProgress?: boolean): Observable; - public getUserByExtSourceNameAndExtLogin(extLogin: string, extSourceName: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getUserByExtSourceNameAndExtLogin(extLogin: string, extSourceName: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getUserByExtSourceNameAndExtLogin(extLogin: string, extSourceName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (extLogin === null || extLogin === undefined) { - throw new Error('Required parameter extLogin was null or undefined when calling getUserByExtSourceNameAndExtLogin.'); - } - if (extSourceName === null || extSourceName === undefined) { - throw new Error('Required parameter extSourceName was null or undefined when calling getUserByExtSourceNameAndExtLogin.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (extLogin !== undefined && extLogin !== null) { - queryParameters = queryParameters.set('extLogin', extLogin); - } - if (extSourceName !== undefined && extSourceName !== null) { - queryParameters = queryParameters.set('extSourceName', extSourceName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/usersManager/getUserByExtSourceNameAndExtLogin`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns user by its id - * Returns object representing the User - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserById(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public getUserById(id: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getUserById(id: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getUserById(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getUserById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/usersManager/getUserById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns user ext source by its id. - * @param userExtSource id of UserExtSource - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserExtSourceById(userExtSource: number, observe?: 'body', reportProgress?: boolean): Observable; - public getUserExtSourceById(userExtSource: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getUserExtSourceById(userExtSource: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getUserExtSourceById(userExtSource: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (userExtSource === null || userExtSource === undefined) { - throw new Error('Required parameter userExtSource was null or undefined when calling getUserExtSourceById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (userExtSource !== undefined && userExtSource !== null) { - queryParameters = queryParameters.set('userExtSource', userExtSource); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/usersManager/getUserExtSourceById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Return userExtSource for specific attribute definition (specified by id) and unique value. - * @param attributeId id of AttributeDefinition - * @param attributeValue string value of Attribute - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserExtSourceByUniqueAttributeValueAndAttributeId(attributeId: number, attributeValue: string, observe?: 'body', reportProgress?: boolean): Observable; - public getUserExtSourceByUniqueAttributeValueAndAttributeId(attributeId: number, attributeValue: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getUserExtSourceByUniqueAttributeValueAndAttributeId(attributeId: number, attributeValue: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getUserExtSourceByUniqueAttributeValueAndAttributeId(attributeId: number, attributeValue: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (attributeId === null || attributeId === undefined) { - throw new Error('Required parameter attributeId was null or undefined when calling getUserExtSourceByUniqueAttributeValueAndAttributeId.'); - } - if (attributeValue === null || attributeValue === undefined) { - throw new Error('Required parameter attributeValue was null or undefined when calling getUserExtSourceByUniqueAttributeValueAndAttributeId.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (attributeId !== undefined && attributeId !== null) { - queryParameters = queryParameters.set('attributeId', attributeId); - } - if (attributeValue !== undefined && attributeValue !== null) { - queryParameters = queryParameters.set('attributeValue', attributeValue); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/usersManager/getUserExtSourceByUniqueAttributeValue/id`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Return userExtSource for specific attribute definition (specified by name) and unique value. - * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) - * @param attributeValue string value of Attribute - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserExtSourceByUniqueAttributeValueAndAttributeName(attributeName: string, attributeValue: string, observe?: 'body', reportProgress?: boolean): Observable; - public getUserExtSourceByUniqueAttributeValueAndAttributeName(attributeName: string, attributeValue: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getUserExtSourceByUniqueAttributeValueAndAttributeName(attributeName: string, attributeValue: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getUserExtSourceByUniqueAttributeValueAndAttributeName(attributeName: string, attributeValue: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (attributeName === null || attributeName === undefined) { - throw new Error('Required parameter attributeName was null or undefined when calling getUserExtSourceByUniqueAttributeValueAndAttributeName.'); - } - if (attributeValue === null || attributeValue === undefined) { - throw new Error('Required parameter attributeValue was null or undefined when calling getUserExtSourceByUniqueAttributeValueAndAttributeName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (attributeName !== undefined && attributeName !== null) { - queryParameters = queryParameters.set('attributeName', attributeName); - } - if (attributeValue !== undefined && attributeValue !== null) { - queryParameters = queryParameters.set('attributeValue', attributeValue); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/usersManager/getUserExtSourceByUniqueAttributeValue/name`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Gets list of all user\'s external sources. - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserExtSources(user: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getUserExtSources(user: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getUserExtSources(user: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getUserExtSources(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getUserExtSources.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getUserExtSources`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns list of user ext sources by their ids. - * @param ids list of ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserExtSourcesByIds(ids: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getUserExtSourcesByIds(ids: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getUserExtSourcesByIds(ids: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getUserExtSourcesByIds(ids: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (ids === null || ids === undefined) { - throw new Error('Required parameter ids was null or undefined when calling getUserExtSourcesByIds.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (ids) { - ids.forEach((element) => { - queryParameters = queryParameters.append('ids[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getUserExtSourcesByIds`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns all users - * Returns list of objects representing the User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUsers(observe?: 'body', reportProgress?: boolean): Observable>; - public getUsers(observe?: 'response', reportProgress?: boolean): Observable>>; - public getUsers(observe?: 'events', reportProgress?: boolean): Observable>>; - public getUsers(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getUsers`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns list of Users by their ids. - * @param ids list of ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUsersByIds(ids: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getUsersByIds(ids: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getUsersByIds(ids: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getUsersByIds(ids: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (ids === null || ids === undefined) { - throw new Error('Required parameter ids was null or undefined when calling getUsersByIds.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (ids) { - ids.forEach((element) => { - queryParameters = queryParameters.append('ids[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getUsersByIds`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Return all users who owns the specific user. - * @param specificUser id of specific User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUsersBySpecificUser(specificUser: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getUsersBySpecificUser(specificUser: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getUsersBySpecificUser(specificUser: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getUsersBySpecificUser(specificUser: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (specificUser === null || specificUser === undefined) { - throw new Error('Required parameter specificUser was null or undefined when calling getUsersBySpecificUser.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (specificUser !== undefined && specificUser !== null) { - queryParameters = queryParameters.set('specificUser', specificUser); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getUsersBySpecificUser`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get page of users with the given attributes. - * @param inputGetPaginatedUsers - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUsersPage(inputGetPaginatedUsers: InputGetPaginatedUsers, observe?: 'body', reportProgress?: boolean): Observable; - public getUsersPage(inputGetPaginatedUsers: InputGetPaginatedUsers, observe?: 'response', reportProgress?: boolean): Observable>; - public getUsersPage(inputGetPaginatedUsers: InputGetPaginatedUsers, observe?: 'events', reportProgress?: boolean): Observable>; - public getUsersPage(inputGetPaginatedUsers: InputGetPaginatedUsers, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputGetPaginatedUsers === null || inputGetPaginatedUsers === undefined) { - throw new Error('Required parameter inputGetPaginatedUsers was null or undefined when calling getUsersPage.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/usersManager/getUsersPage`, - inputGetPaginatedUsers, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns list of VOs, where the user is an Administrator. If a group, of which the user is a valid member, is an administrator of a VO, include that VO as well. - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVosWhereUserIsAdmin(user: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getVosWhereUserIsAdmin(user: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getVosWhereUserIsAdmin(user: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getVosWhereUserIsAdmin(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getVosWhereUserIsAdmin.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getVosWhereUserIsAdmin`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns list of VOs, where the user is a Member. - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVosWhereUserIsMember(user: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getVosWhereUserIsMember(user: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getVosWhereUserIsMember(user: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getVosWhereUserIsMember(user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling getVosWhereUserIsMember.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/usersManager/getVosWhereUserIsMember`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Checks if the login is available in the namespace. Return 1 if yes, 0 if no. - * @param loginNamespace - * @param login login - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public isLoginAvailable(loginNamespace: string, login: string, observe?: 'body', reportProgress?: boolean): Observable; - public isLoginAvailable(loginNamespace: string, login: string, observe?: 'response', reportProgress?: boolean): Observable>; - public isLoginAvailable(loginNamespace: string, login: string, observe?: 'events', reportProgress?: boolean): Observable>; - public isLoginAvailable(loginNamespace: string, login: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (loginNamespace === null || loginNamespace === undefined) { - throw new Error('Required parameter loginNamespace was null or undefined when calling isLoginAvailable.'); - } - if (login === null || login === undefined) { - throw new Error('Required parameter login was null or undefined when calling isLoginAvailable.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (loginNamespace !== undefined && loginNamespace !== null) { - queryParameters = queryParameters.set('loginNamespace', loginNamespace); - } - if (login !== undefined && login !== null) { - queryParameters = queryParameters.set('login', login); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/isLoginAvailable`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Check wheter login exists in specified login-namespace. Only available for some namespaces. - * @param user id of User - * @param namespace namespace - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public loginExist(user: number, namespace: string, observe?: 'body', reportProgress?: boolean): Observable; - public loginExist(user: number, namespace: string, observe?: 'response', reportProgress?: boolean): Observable>; - public loginExist(user: number, namespace: string, observe?: 'events', reportProgress?: boolean): Observable>; - public loginExist(user: number, namespace: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling loginExist.'); - } - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling loginExist.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (namespace !== undefined && namespace !== null) { - queryParameters = queryParameters.set('namespace', namespace); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/loginExist`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove specific user owner. - * @param user id of User - * @param specificUser id of specific User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeSpecificUserOwner(user: number, specificUser: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeSpecificUserOwner(user: number, specificUser: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeSpecificUserOwner(user: number, specificUser: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeSpecificUserOwner(user: number, specificUser: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling removeSpecificUserOwner.'); - } - if (specificUser === null || specificUser === undefined) { - throw new Error('Required parameter specificUser was null or undefined when calling removeSpecificUserOwner.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (specificUser !== undefined && specificUser !== null) { - queryParameters = queryParameters.set('specificUser', specificUser); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/removeSpecificUserOwner`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove user\'s external source. Persistent UserExtSources are not removed unless force param is present and set to true. - * @param user id of User - * @param userExtSource id of UserExtSource - * @param force If true, delete entity forcefully. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeUserExtSource(user: number, userExtSource: number, force?: boolean, observe?: 'body', reportProgress?: boolean): Observable; - public removeUserExtSource(user: number, userExtSource: number, force?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; - public removeUserExtSource(user: number, userExtSource: number, force?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; - public removeUserExtSource(user: number, userExtSource: number, force?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling removeUserExtSource.'); - } - if (userExtSource === null || userExtSource === undefined) { - throw new Error('Required parameter userExtSource was null or undefined when calling removeUserExtSource.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (userExtSource !== undefined && userExtSource !== null) { - queryParameters = queryParameters.set('userExtSource', userExtSource); - } - if (force !== undefined && force !== null) { - queryParameters = queryParameters.set('force', force); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/removeUserExtSource`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Request to change preferred email address of user. Validation mail is sent on new address. Change is not saved until user validate new email address by calling validatePreferredEmailChange() method with proper set of parameters (sent in validation mail). Provide eiher linkPath (appended to referer) or whole custom url. Combination of linkPath and customUrl is not supported. - * @param user id of User - * @param email new email address to set - * @param lang language to get confirmation mail in (optional) - * @param linkPath path that is appended to the referer and creates the verification link (optional) - * @param customUrl url to verification link containing path (optional) - * @param idpFilter authentication method appended to query parameters of verification link (optional) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public requestPreferredEmailChange(user: number, email: string, lang?: string, linkPath?: string, customUrl?: string, idpFilter?: string, observe?: 'body', reportProgress?: boolean): Observable; - public requestPreferredEmailChange(user: number, email: string, lang?: string, linkPath?: string, customUrl?: string, idpFilter?: string, observe?: 'response', reportProgress?: boolean): Observable>; - public requestPreferredEmailChange(user: number, email: string, lang?: string, linkPath?: string, customUrl?: string, idpFilter?: string, observe?: 'events', reportProgress?: boolean): Observable>; - public requestPreferredEmailChange(user: number, email: string, lang?: string, linkPath?: string, customUrl?: string, idpFilter?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling requestPreferredEmailChange.'); - } - if (email === null || email === undefined) { - throw new Error('Required parameter email was null or undefined when calling requestPreferredEmailChange.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (email !== undefined && email !== null) { - queryParameters = queryParameters.set('email', email); - } - if (lang !== undefined && lang !== null) { - queryParameters = queryParameters.set('lang', lang); - } - if (linkPath !== undefined && linkPath !== null) { - queryParameters = queryParameters.set('linkPath', linkPath); - } - if (customUrl !== undefined && customUrl !== null) { - queryParameters = queryParameters.set('customUrl', customUrl); - } - if (idpFilter !== undefined && idpFilter !== null) { - queryParameters = queryParameters.set('idpFilter', idpFilter); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/requestPreferredEmailChange`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Reserves password for a user in specified login-namespace. - * @param login login - * @param namespace namespace - * @param password password - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public reservePasswordForLogin(login: string, namespace: string, password: string, observe?: 'body', reportProgress?: boolean): Observable; - public reservePasswordForLogin(login: string, namespace: string, password: string, observe?: 'response', reportProgress?: boolean): Observable>; - public reservePasswordForLogin(login: string, namespace: string, password: string, observe?: 'events', reportProgress?: boolean): Observable>; - public reservePasswordForLogin(login: string, namespace: string, password: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (login === null || login === undefined) { - throw new Error('Required parameter login was null or undefined when calling reservePasswordForLogin.'); - } - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling reservePasswordForLogin.'); - } - if (password === null || password === undefined) { - throw new Error('Required parameter password was null or undefined when calling reservePasswordForLogin.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (login !== undefined && login !== null) { - queryParameters = queryParameters.set('login', login); - } - if (namespace !== undefined && namespace !== null) { - queryParameters = queryParameters.set('namespace', namespace); - } - if (password !== undefined && password !== null) { - queryParameters = queryParameters.set('password', password); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/reservePassword/login`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Reserves password for a user in specified login-namespace. - * @param user id of User - * @param namespace namespace - * @param password password - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public reservePasswordForUser(user: number, namespace: string, password: string, observe?: 'body', reportProgress?: boolean): Observable; - public reservePasswordForUser(user: number, namespace: string, password: string, observe?: 'response', reportProgress?: boolean): Observable>; - public reservePasswordForUser(user: number, namespace: string, password: string, observe?: 'events', reportProgress?: boolean): Observable>; - public reservePasswordForUser(user: number, namespace: string, password: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling reservePasswordForUser.'); - } - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling reservePasswordForUser.'); - } - if (password === null || password === undefined) { - throw new Error('Required parameter password was null or undefined when calling reservePasswordForUser.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (namespace !== undefined && namespace !== null) { - queryParameters = queryParameters.set('namespace', namespace); - } - if (password !== undefined && password !== null) { - queryParameters = queryParameters.set('password', password); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/reservePassword/user`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Reserves a random password in external authz system. User shouldn\'t be able to log-in (account disabled, password unknown to him). This is usefull when manager create account for others and later send them password reset request. - * @param user id of User - * @param namespace namespace - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public reserveRandomPassword(user: number, namespace: string, observe?: 'body', reportProgress?: boolean): Observable; - public reserveRandomPassword(user: number, namespace: string, observe?: 'response', reportProgress?: boolean): Observable>; - public reserveRandomPassword(user: number, namespace: string, observe?: 'events', reportProgress?: boolean): Observable>; - public reserveRandomPassword(user: number, namespace: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling reserveRandomPassword.'); - } - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling reserveRandomPassword.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (namespace !== undefined && namespace !== null) { - queryParameters = queryParameters.set('namespace', namespace); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/reserveRandomPassword`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Updates user - * @param inputUpdateUser - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateUser(inputUpdateUser: InputUpdateUser, observe?: 'body', reportProgress?: boolean): Observable; - public updateUser(inputUpdateUser: InputUpdateUser, observe?: 'response', reportProgress?: boolean): Observable>; - public updateUser(inputUpdateUser: InputUpdateUser, observe?: 'events', reportProgress?: boolean): Observable>; - public updateUser(inputUpdateUser: InputUpdateUser, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputUpdateUser === null || inputUpdateUser === undefined) { - throw new Error('Required parameter inputUpdateUser was null or undefined when calling updateUser.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/usersManager/updateUser`, - inputUpdateUser, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Validate password for a user in specified login-namespace. - * @param login login - * @param namespace namespace - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public validatePasswordForLogin(login: string, namespace: string, observe?: 'body', reportProgress?: boolean): Observable; - public validatePasswordForLogin(login: string, namespace: string, observe?: 'response', reportProgress?: boolean): Observable>; - public validatePasswordForLogin(login: string, namespace: string, observe?: 'events', reportProgress?: boolean): Observable>; - public validatePasswordForLogin(login: string, namespace: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (login === null || login === undefined) { - throw new Error('Required parameter login was null or undefined when calling validatePasswordForLogin.'); - } - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling validatePasswordForLogin.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (login !== undefined && login !== null) { - queryParameters = queryParameters.set('login', login); - } - if (namespace !== undefined && namespace !== null) { - queryParameters = queryParameters.set('namespace', namespace); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/validatePassword/login`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Validate password for a user in specified login-namespace. - * @param user id of User - * @param namespace namespace - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public validatePasswordForUser(user: number, namespace: string, observe?: 'body', reportProgress?: boolean): Observable; - public validatePasswordForUser(user: number, namespace: string, observe?: 'response', reportProgress?: boolean): Observable>; - public validatePasswordForUser(user: number, namespace: string, observe?: 'events', reportProgress?: boolean): Observable>; - public validatePasswordForUser(user: number, namespace: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling validatePasswordForUser.'); - } - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling validatePasswordForUser.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - if (namespace !== undefined && namespace !== null) { - queryParameters = queryParameters.set('namespace', namespace); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/validatePassword/user`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Validate new preferred email address. Request to validate is determined based on token parameter sent in email notice by requestPreferredEmailChange() method. - * @param token token for the email change request - * @param u id of user you want to validate preferred email request - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public validatePreferredEmailChangeWithToken(token: string, u: number, observe?: 'body', reportProgress?: boolean): Observable; - public validatePreferredEmailChangeWithToken(token: string, u: number, observe?: 'response', reportProgress?: boolean): Observable>; - public validatePreferredEmailChangeWithToken(token: string, u: number, observe?: 'events', reportProgress?: boolean): Observable>; - public validatePreferredEmailChangeWithToken(token: string, u: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (token === null || token === undefined) { - throw new Error('Required parameter token was null or undefined when calling validatePreferredEmailChangeWithToken.'); - } - if (u === null || u === undefined) { - throw new Error('Required parameter u was null or undefined when calling validatePreferredEmailChangeWithToken.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (token !== undefined && token !== null) { - queryParameters = queryParameters.set('token', token); - } - if (u !== undefined && u !== null) { - queryParameters = queryParameters.set('u', u); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/usersManager/validatePreferredEmailChange`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.get>( + `${this.configuration.basePath}/json/usersManager/getAllRichUsersWithAttributes`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all rich resources which have the user assigned. + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAssignedRichResourcesForUser( + user: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getAssignedRichResourcesForUser( + user: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAssignedRichResourcesForUser( + user: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getAssignedRichResourcesForUser( + user: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling getAssignedRichResourcesForUser.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/usersManager/getAssignedRichResources`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get list of groups of user on specified facility where use is active. + * That means User is a VALID in the VO and the Group and groups are assigned to the facility. + * @param user id of User + * @param facility id of Facility + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupsForFacilityWhereUserIsActive( + user: number, + facility: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getGroupsForFacilityWhereUserIsActive( + user: number, + facility: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getGroupsForFacilityWhereUserIsActive( + user: number, + facility: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getGroupsForFacilityWhereUserIsActive( + user: number, + facility: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling getGroupsForFacilityWhereUserIsActive.' + ); + } + if (facility === null || facility === undefined) { + throw new Error( + 'Required parameter facility was null or undefined when calling getGroupsForFacilityWhereUserIsActive.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (facility !== undefined && facility !== null) { + queryParameters = queryParameters.set('facility', facility); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/usersManager/getGroupsWhereUserIsActive/facility`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get list of groups of user on specified resource where use is active. + * That means User is a VALID in the VO and the Group and groups are assigned to the resource. + * @param user id of User + * @param resource id of Resource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupsForResourceWhereUserIsActive( + user: number, + resource: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getGroupsForResourceWhereUserIsActive( + user: number, + resource: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getGroupsForResourceWhereUserIsActive( + user: number, + resource: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getGroupsForResourceWhereUserIsActive( + user: number, + resource: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling getGroupsForResourceWhereUserIsActive.' + ); + } + if (resource === null || resource === undefined) { + throw new Error( + 'Required parameter resource was null or undefined when calling getGroupsForResourceWhereUserIsActive.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (resource !== undefined && resource !== null) { + queryParameters = queryParameters.set('resource', resource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/usersManager/getGroupsWhereUserIsActive/resource`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns list of Groups in selected Vo, where the User is a direct Administrator or he is a VALID member of any group which is Administrator of some of these Groups. + * @param user id of User + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupsInVoWhereUserIsAdmin( + user: number, + vo: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getGroupsInVoWhereUserIsAdmin( + user: number, + vo: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getGroupsInVoWhereUserIsAdmin( + user: number, + vo: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getGroupsInVoWhereUserIsAdmin( + user: number, + vo: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling getGroupsInVoWhereUserIsAdmin.' + ); + } + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling getGroupsInVoWhereUserIsAdmin.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/usersManager/getGroupsWhereUserIsAdmin/u-v`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns list of Groups in Perun, where the User is a direct Administrator or he is a VALID member of any group which is Administrator of some of these Groups. + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGroupsWhereUserIsAdmin( + user: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getGroupsWhereUserIsAdmin( + user: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getGroupsWhereUserIsAdmin( + user: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getGroupsWhereUserIsAdmin( + user: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling getGroupsWhereUserIsAdmin.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/usersManager/getGroupsWhereUserIsAdmin/u`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Return list of email addresses of user, which are awaiting validation and are inside time window for validation. If there is no preferred email change request pending or requests are outside time window for validation, returns empty list. + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getPendingPreferredEmailChanges( + user: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getPendingPreferredEmailChanges( + user: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getPendingPreferredEmailChanges( + user: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getPendingPreferredEmailChanges( + user: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling getPendingPreferredEmailChanges.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/usersManager/getPendingPreferredEmailChanges`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets list of all user\'s external sources with attributes. + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRichUserExtSources( + user: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getRichUserExtSources( + user: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getRichUserExtSources( + user: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getRichUserExtSources( + user: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling getRichUserExtSources.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/usersManager/getRichUserExtSources/u`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns user with attributes + * Returns object representing the User with attributes + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRichUserWithAttributes( + user: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getRichUserWithAttributes( + user: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getRichUserWithAttributes( + user: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getRichUserWithAttributes( + user: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling getRichUserWithAttributes.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/usersManager/getRichUserWithAttributes`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns rich users without attributes by their IDs. + * @param ids list of ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRichUsersByIds( + ids: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getRichUsersByIds( + ids: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getRichUsersByIds( + ids: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getRichUsersByIds( + ids: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (ids === null || ids === undefined) { + throw new Error( + 'Required parameter ids was null or undefined when calling getRichUsersByIds.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (ids) { + ids.forEach((element) => { + queryParameters = queryParameters.append('ids[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/usersManager/getRichUsersByIds`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns rich users with attributes by their IDs. + * @param ids list of ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRichUsersWithAttributesByIds( + ids: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getRichUsersWithAttributesByIds( + ids: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getRichUsersWithAttributesByIds( + ids: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getRichUsersWithAttributesByIds( + ids: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (ids === null || ids === undefined) { + throw new Error( + 'Required parameter ids was null or undefined when calling getRichUsersWithAttributesByIds.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (ids) { + ids.forEach((element) => { + queryParameters = queryParameters.append('ids[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/usersManager/getRichUsersWithAttributesByIds`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns list of RichUsers which are not members of any VO with attributes. + * @param attrsNames list of attribute names List<String> or null + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRichUsersWithoutVoWithAttributes( + attrsNames?: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getRichUsersWithoutVoWithAttributes( + attrsNames?: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getRichUsersWithoutVoWithAttributes( + attrsNames?: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getRichUsersWithoutVoWithAttributes( + attrsNames?: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (attrsNames) { + attrsNames.forEach((element) => { + queryParameters = queryParameters.append('attrsNames[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/usersManager/getRichUsersWithoutVoWithAttributes`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get all specific users who are owned by the user. + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getSpecificUsersByUser( + user: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getSpecificUsersByUser( + user: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getSpecificUsersByUser( + user: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getSpecificUsersByUser( + user: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling getSpecificUsersByUser.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/usersManager/getSpecificUsersByUser`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets sponsors for given member with optional attribute names. + * @param member id of Member + * @param attrNames list of attribute names List<String> or null + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getSponsorsForMember( + member: number, + attrNames?: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getSponsorsForMember( + member: number, + attrNames?: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getSponsorsForMember( + member: number, + attrNames?: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getSponsorsForMember( + member: number, + attrNames?: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getSponsorsForMember.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/usersManager/getSponsorsForMember/member`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets sponsors for member specified by VO, extSourceName and extLogin with optional attribute names. + * @param vo id of Vo + * @param extSourceName external source name, e.g. IdP entityId + * @param extLogin external login of user, e.g. john + * @param attrNames list of attribute names List<String> or null + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getSponsorsForMemberByVoAndLogin( + vo: number, + extSourceName: string, + extLogin: string, + attrNames?: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getSponsorsForMemberByVoAndLogin( + vo: number, + extSourceName: string, + extLogin: string, + attrNames?: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getSponsorsForMemberByVoAndLogin( + vo: number, + extSourceName: string, + extLogin: string, + attrNames?: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getSponsorsForMemberByVoAndLogin( + vo: number, + extSourceName: string, + extLogin: string, + attrNames?: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling getSponsorsForMemberByVoAndLogin.' + ); + } + if (extSourceName === null || extSourceName === undefined) { + throw new Error( + 'Required parameter extSourceName was null or undefined when calling getSponsorsForMemberByVoAndLogin.' + ); + } + if (extLogin === null || extLogin === undefined) { + throw new Error( + 'Required parameter extLogin was null or undefined when calling getSponsorsForMemberByVoAndLogin.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (extSourceName !== undefined && extSourceName !== null) { + queryParameters = queryParameters.set('extSourceName', extSourceName); + } + if (extLogin !== undefined && extLogin !== null) { + queryParameters = queryParameters.set('extLogin', extLogin); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/usersManager/getSponsorsForMember/vo`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns user by its ExtSourceName and ExtLogin. + * Returns User found by its authentication data + * @param extLogin external login of user, e.g. john + * @param extSourceName external source name, e.g. IdP entityId + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserByExtSourceNameAndExtLogin( + extLogin: string, + extSourceName: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getUserByExtSourceNameAndExtLogin( + extLogin: string, + extSourceName: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getUserByExtSourceNameAndExtLogin( + extLogin: string, + extSourceName: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getUserByExtSourceNameAndExtLogin( + extLogin: string, + extSourceName: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (extLogin === null || extLogin === undefined) { + throw new Error( + 'Required parameter extLogin was null or undefined when calling getUserByExtSourceNameAndExtLogin.' + ); + } + if (extSourceName === null || extSourceName === undefined) { + throw new Error( + 'Required parameter extSourceName was null or undefined when calling getUserByExtSourceNameAndExtLogin.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (extLogin !== undefined && extLogin !== null) { + queryParameters = queryParameters.set('extLogin', extLogin); + } + if (extSourceName !== undefined && extSourceName !== null) { + queryParameters = queryParameters.set('extSourceName', extSourceName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/usersManager/getUserByExtSourceNameAndExtLogin`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns user by its id + * Returns object representing the User + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserById(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public getUserById( + id: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getUserById( + id: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getUserById( + id: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getUserById.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/usersManager/getUserById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns user ext source by its id. + * @param userExtSource id of UserExtSource + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserExtSourceById( + userExtSource: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getUserExtSourceById( + userExtSource: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getUserExtSourceById( + userExtSource: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getUserExtSourceById( + userExtSource: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (userExtSource === null || userExtSource === undefined) { + throw new Error( + 'Required parameter userExtSource was null or undefined when calling getUserExtSourceById.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (userExtSource !== undefined && userExtSource !== null) { + queryParameters = queryParameters.set('userExtSource', userExtSource); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/usersManager/getUserExtSourceById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Return userExtSource for specific attribute definition (specified by id) and unique value. + * @param attributeId id of AttributeDefinition + * @param attributeValue string value of Attribute + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserExtSourceByUniqueAttributeValueAndAttributeId( + attributeId: number, + attributeValue: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getUserExtSourceByUniqueAttributeValueAndAttributeId( + attributeId: number, + attributeValue: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getUserExtSourceByUniqueAttributeValueAndAttributeId( + attributeId: number, + attributeValue: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getUserExtSourceByUniqueAttributeValueAndAttributeId( + attributeId: number, + attributeValue: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (attributeId === null || attributeId === undefined) { + throw new Error( + 'Required parameter attributeId was null or undefined when calling getUserExtSourceByUniqueAttributeValueAndAttributeId.' + ); + } + if (attributeValue === null || attributeValue === undefined) { + throw new Error( + 'Required parameter attributeValue was null or undefined when calling getUserExtSourceByUniqueAttributeValueAndAttributeId.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (attributeId !== undefined && attributeId !== null) { + queryParameters = queryParameters.set('attributeId', attributeId); + } + if (attributeValue !== undefined && attributeValue !== null) { + queryParameters = queryParameters.set('attributeValue', attributeValue); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/usersManager/getUserExtSourceByUniqueAttributeValue/id`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Return userExtSource for specific attribute definition (specified by name) and unique value. + * @param attributeName full name of attribute definition (namespace + \':\' + friendlyName) + * @param attributeValue string value of Attribute + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserExtSourceByUniqueAttributeValueAndAttributeName( + attributeName: string, + attributeValue: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getUserExtSourceByUniqueAttributeValueAndAttributeName( + attributeName: string, + attributeValue: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getUserExtSourceByUniqueAttributeValueAndAttributeName( + attributeName: string, + attributeValue: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getUserExtSourceByUniqueAttributeValueAndAttributeName( + attributeName: string, + attributeValue: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (attributeName === null || attributeName === undefined) { + throw new Error( + 'Required parameter attributeName was null or undefined when calling getUserExtSourceByUniqueAttributeValueAndAttributeName.' + ); + } + if (attributeValue === null || attributeValue === undefined) { + throw new Error( + 'Required parameter attributeValue was null or undefined when calling getUserExtSourceByUniqueAttributeValueAndAttributeName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (attributeName !== undefined && attributeName !== null) { + queryParameters = queryParameters.set('attributeName', attributeName); + } + if (attributeValue !== undefined && attributeValue !== null) { + queryParameters = queryParameters.set('attributeValue', attributeValue); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/usersManager/getUserExtSourceByUniqueAttributeValue/name`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets list of all user\'s external sources. + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserExtSources( + user: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getUserExtSources( + user: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getUserExtSources( + user: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getUserExtSources( + user: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling getUserExtSources.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/usersManager/getUserExtSources`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns list of user ext sources by their ids. + * @param ids list of ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserExtSourcesByIds( + ids: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getUserExtSourcesByIds( + ids: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getUserExtSourcesByIds( + ids: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getUserExtSourcesByIds( + ids: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (ids === null || ids === undefined) { + throw new Error( + 'Required parameter ids was null or undefined when calling getUserExtSourcesByIds.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (ids) { + ids.forEach((element) => { + queryParameters = queryParameters.append('ids[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/usersManager/getUserExtSourcesByIds`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns all users + * Returns list of objects representing the User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUsers(observe?: 'body', reportProgress?: boolean): Observable>; + public getUsers( + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getUsers(observe?: 'events', reportProgress?: boolean): Observable>>; + public getUsers(observe: any = 'body', reportProgress: boolean = false): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/usersManager/getUsers`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns list of Users by their ids. + * @param ids list of ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUsersByIds( + ids: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getUsersByIds( + ids: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getUsersByIds( + ids: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getUsersByIds( + ids: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (ids === null || ids === undefined) { + throw new Error('Required parameter ids was null or undefined when calling getUsersByIds.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (ids) { + ids.forEach((element) => { + queryParameters = queryParameters.append('ids[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/usersManager/getUsersByIds`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Return all users who owns the specific user. + * @param specificUser id of specific User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUsersBySpecificUser( + specificUser: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getUsersBySpecificUser( + specificUser: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getUsersBySpecificUser( + specificUser: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getUsersBySpecificUser( + specificUser: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (specificUser === null || specificUser === undefined) { + throw new Error( + 'Required parameter specificUser was null or undefined when calling getUsersBySpecificUser.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (specificUser !== undefined && specificUser !== null) { + queryParameters = queryParameters.set('specificUser', specificUser); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/usersManager/getUsersBySpecificUser`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get page of users with the given attributes. + * @param inputGetPaginatedUsers + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUsersPage( + inputGetPaginatedUsers: InputGetPaginatedUsers, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getUsersPage( + inputGetPaginatedUsers: InputGetPaginatedUsers, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getUsersPage( + inputGetPaginatedUsers: InputGetPaginatedUsers, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getUsersPage( + inputGetPaginatedUsers: InputGetPaginatedUsers, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputGetPaginatedUsers === null || inputGetPaginatedUsers === undefined) { + throw new Error( + 'Required parameter inputGetPaginatedUsers was null or undefined when calling getUsersPage.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/usersManager/getUsersPage`, + inputGetPaginatedUsers, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns list of VOs, where the user is an Administrator. If a group, of which the user is a valid member, is an administrator of a VO, include that VO as well. + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVosWhereUserIsAdmin( + user: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getVosWhereUserIsAdmin( + user: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getVosWhereUserIsAdmin( + user: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getVosWhereUserIsAdmin( + user: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling getVosWhereUserIsAdmin.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/usersManager/getVosWhereUserIsAdmin`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns list of VOs, where the user is a Member. + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVosWhereUserIsMember( + user: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getVosWhereUserIsMember( + user: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getVosWhereUserIsMember( + user: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getVosWhereUserIsMember( + user: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling getVosWhereUserIsMember.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/usersManager/getVosWhereUserIsMember`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Checks if the login is available in the namespace. Return 1 if yes, 0 if no. + * @param loginNamespace + * @param login login + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public isLoginAvailable( + loginNamespace: string, + login: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public isLoginAvailable( + loginNamespace: string, + login: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public isLoginAvailable( + loginNamespace: string, + login: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public isLoginAvailable( + loginNamespace: string, + login: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (loginNamespace === null || loginNamespace === undefined) { + throw new Error( + 'Required parameter loginNamespace was null or undefined when calling isLoginAvailable.' + ); + } + if (login === null || login === undefined) { + throw new Error( + 'Required parameter login was null or undefined when calling isLoginAvailable.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (loginNamespace !== undefined && loginNamespace !== null) { + queryParameters = queryParameters.set('loginNamespace', loginNamespace); + } + if (login !== undefined && login !== null) { + queryParameters = queryParameters.set('login', login); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/usersManager/isLoginAvailable`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Check wheter login exists in specified login-namespace. Only available for some namespaces. + * @param user id of User + * @param namespace namespace + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public loginExist( + user: number, + namespace: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public loginExist( + user: number, + namespace: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public loginExist( + user: number, + namespace: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public loginExist( + user: number, + namespace: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling loginExist.'); + } + if (namespace === null || namespace === undefined) { + throw new Error( + 'Required parameter namespace was null or undefined when calling loginExist.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (namespace !== undefined && namespace !== null) { + queryParameters = queryParameters.set('namespace', namespace); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/usersManager/loginExist`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove specific user owner. + * @param user id of User + * @param specificUser id of specific User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeSpecificUserOwner( + user: number, + specificUser: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeSpecificUserOwner( + user: number, + specificUser: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeSpecificUserOwner( + user: number, + specificUser: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeSpecificUserOwner( + user: number, + specificUser: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling removeSpecificUserOwner.' + ); + } + if (specificUser === null || specificUser === undefined) { + throw new Error( + 'Required parameter specificUser was null or undefined when calling removeSpecificUserOwner.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (specificUser !== undefined && specificUser !== null) { + queryParameters = queryParameters.set('specificUser', specificUser); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/usersManager/removeSpecificUserOwner`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove user\'s external source. Persistent UserExtSources are not removed unless force param is present and set to true. + * @param user id of User + * @param userExtSource id of UserExtSource + * @param force If true, delete entity forcefully. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeUserExtSource( + user: number, + userExtSource: number, + force?: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeUserExtSource( + user: number, + userExtSource: number, + force?: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeUserExtSource( + user: number, + userExtSource: number, + force?: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeUserExtSource( + user: number, + userExtSource: number, + force?: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling removeUserExtSource.' + ); + } + if (userExtSource === null || userExtSource === undefined) { + throw new Error( + 'Required parameter userExtSource was null or undefined when calling removeUserExtSource.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (userExtSource !== undefined && userExtSource !== null) { + queryParameters = queryParameters.set('userExtSource', userExtSource); + } + if (force !== undefined && force !== null) { + queryParameters = queryParameters.set('force', force); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/usersManager/removeUserExtSource`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Request to change preferred email address of user. Validation mail is sent on new address. Change is not saved until user validate new email address by calling validatePreferredEmailChange() method with proper set of parameters (sent in validation mail). Provide eiher linkPath (appended to referer) or whole custom url. Combination of linkPath and customUrl is not supported. + * @param user id of User + * @param email new email address to set + * @param lang language to get confirmation mail in (optional) + * @param linkPath path that is appended to the referer and creates the verification link (optional) + * @param customUrl url to verification link containing path (optional) + * @param idpFilter authentication method appended to query parameters of verification link (optional) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public requestPreferredEmailChange( + user: number, + email: string, + lang?: string, + linkPath?: string, + customUrl?: string, + idpFilter?: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public requestPreferredEmailChange( + user: number, + email: string, + lang?: string, + linkPath?: string, + customUrl?: string, + idpFilter?: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public requestPreferredEmailChange( + user: number, + email: string, + lang?: string, + linkPath?: string, + customUrl?: string, + idpFilter?: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public requestPreferredEmailChange( + user: number, + email: string, + lang?: string, + linkPath?: string, + customUrl?: string, + idpFilter?: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling requestPreferredEmailChange.' + ); + } + if (email === null || email === undefined) { + throw new Error( + 'Required parameter email was null or undefined when calling requestPreferredEmailChange.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (email !== undefined && email !== null) { + queryParameters = queryParameters.set('email', email); + } + if (lang !== undefined && lang !== null) { + queryParameters = queryParameters.set('lang', lang); + } + if (linkPath !== undefined && linkPath !== null) { + queryParameters = queryParameters.set('linkPath', linkPath); + } + if (customUrl !== undefined && customUrl !== null) { + queryParameters = queryParameters.set('customUrl', customUrl); + } + if (idpFilter !== undefined && idpFilter !== null) { + queryParameters = queryParameters.set('idpFilter', idpFilter); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/usersManager/requestPreferredEmailChange`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Reserves password for a user in specified login-namespace. + * @param login login + * @param namespace namespace + * @param password password + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public reservePasswordForLogin( + login: string, + namespace: string, + password: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public reservePasswordForLogin( + login: string, + namespace: string, + password: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public reservePasswordForLogin( + login: string, + namespace: string, + password: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public reservePasswordForLogin( + login: string, + namespace: string, + password: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (login === null || login === undefined) { + throw new Error( + 'Required parameter login was null or undefined when calling reservePasswordForLogin.' + ); + } + if (namespace === null || namespace === undefined) { + throw new Error( + 'Required parameter namespace was null or undefined when calling reservePasswordForLogin.' + ); + } + if (password === null || password === undefined) { + throw new Error( + 'Required parameter password was null or undefined when calling reservePasswordForLogin.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (login !== undefined && login !== null) { + queryParameters = queryParameters.set('login', login); + } + if (namespace !== undefined && namespace !== null) { + queryParameters = queryParameters.set('namespace', namespace); + } + if (password !== undefined && password !== null) { + queryParameters = queryParameters.set('password', password); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/usersManager/reservePassword/login`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Reserves password for a user in specified login-namespace. + * @param user id of User + * @param namespace namespace + * @param password password + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public reservePasswordForUser( + user: number, + namespace: string, + password: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public reservePasswordForUser( + user: number, + namespace: string, + password: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public reservePasswordForUser( + user: number, + namespace: string, + password: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public reservePasswordForUser( + user: number, + namespace: string, + password: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling reservePasswordForUser.' + ); + } + if (namespace === null || namespace === undefined) { + throw new Error( + 'Required parameter namespace was null or undefined when calling reservePasswordForUser.' + ); + } + if (password === null || password === undefined) { + throw new Error( + 'Required parameter password was null or undefined when calling reservePasswordForUser.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (namespace !== undefined && namespace !== null) { + queryParameters = queryParameters.set('namespace', namespace); + } + if (password !== undefined && password !== null) { + queryParameters = queryParameters.set('password', password); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/usersManager/reservePassword/user`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Reserves a random password in external authz system. User shouldn\'t be able to log-in (account disabled, password unknown to him). This is usefull when manager create account for others and later send them password reset request. + * @param user id of User + * @param namespace namespace + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public reserveRandomPassword( + user: number, + namespace: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public reserveRandomPassword( + user: number, + namespace: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public reserveRandomPassword( + user: number, + namespace: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public reserveRandomPassword( + user: number, + namespace: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling reserveRandomPassword.' + ); + } + if (namespace === null || namespace === undefined) { + throw new Error( + 'Required parameter namespace was null or undefined when calling reserveRandomPassword.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (namespace !== undefined && namespace !== null) { + queryParameters = queryParameters.set('namespace', namespace); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/usersManager/reserveRandomPassword`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Updates user + * @param inputUpdateUser + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateUser( + inputUpdateUser: InputUpdateUser, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public updateUser( + inputUpdateUser: InputUpdateUser, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public updateUser( + inputUpdateUser: InputUpdateUser, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public updateUser( + inputUpdateUser: InputUpdateUser, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputUpdateUser === null || inputUpdateUser === undefined) { + throw new Error( + 'Required parameter inputUpdateUser was null or undefined when calling updateUser.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/usersManager/updateUser`, + inputUpdateUser, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Validate password for a user in specified login-namespace. + * @param login login + * @param namespace namespace + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public validatePasswordForLogin( + login: string, + namespace: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public validatePasswordForLogin( + login: string, + namespace: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public validatePasswordForLogin( + login: string, + namespace: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public validatePasswordForLogin( + login: string, + namespace: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (login === null || login === undefined) { + throw new Error( + 'Required parameter login was null or undefined when calling validatePasswordForLogin.' + ); + } + if (namespace === null || namespace === undefined) { + throw new Error( + 'Required parameter namespace was null or undefined when calling validatePasswordForLogin.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (login !== undefined && login !== null) { + queryParameters = queryParameters.set('login', login); + } + if (namespace !== undefined && namespace !== null) { + queryParameters = queryParameters.set('namespace', namespace); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/usersManager/validatePassword/login`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Validate password for a user in specified login-namespace. + * @param user id of User + * @param namespace namespace + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public validatePasswordForUser( + user: number, + namespace: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public validatePasswordForUser( + user: number, + namespace: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public validatePasswordForUser( + user: number, + namespace: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public validatePasswordForUser( + user: number, + namespace: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling validatePasswordForUser.' + ); + } + if (namespace === null || namespace === undefined) { + throw new Error( + 'Required parameter namespace was null or undefined when calling validatePasswordForUser.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + if (namespace !== undefined && namespace !== null) { + queryParameters = queryParameters.set('namespace', namespace); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/usersManager/validatePassword/user`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Validate new preferred email address. Request to validate is determined based on token parameter sent in email notice by requestPreferredEmailChange() method. + * @param token token for the email change request + * @param u id of user you want to validate preferred email request + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public validatePreferredEmailChangeWithToken( + token: string, + u: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public validatePreferredEmailChangeWithToken( + token: string, + u: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public validatePreferredEmailChangeWithToken( + token: string, + u: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public validatePreferredEmailChangeWithToken( + token: string, + u: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (token === null || token === undefined) { + throw new Error( + 'Required parameter token was null or undefined when calling validatePreferredEmailChangeWithToken.' + ); + } + if (u === null || u === undefined) { + throw new Error( + 'Required parameter u was null or undefined when calling validatePreferredEmailChangeWithToken.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (token !== undefined && token !== null) { + queryParameters = queryParameters.set('token', token); + } + if (u !== undefined && u !== null) { + queryParameters = queryParameters.set('u', u); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); } + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/usersManager/validatePreferredEmailChange`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } } diff --git a/libs/perun/openapi/src/lib/api/utils.service.ts b/libs/perun/openapi/src/lib/api/utils.service.ts index f04bbc71c..7921c9489 100644 --- a/libs/perun/openapi/src/lib/api/utils.service.ts +++ b/libs/perun/openapi/src/lib/api/utils.service.ts @@ -11,334 +11,398 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { PerunAppsConfig } from '../model/perunAppsConfig'; import { PerunException } from '../model/perunException'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - - +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class UtilsService { - - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string, + @Optional() configuration: Configuration + ) { + if (configuration) { + this.configuration = configuration; } - - - - /** - * Gets configuration of perun apps brandings and apps\' domains - * Returns object of type PerunAppsConfig - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAppsConfig(observe?: 'body', reportProgress?: boolean): Observable; - public getAppsConfig(observe?: 'response', reportProgress?: boolean): Observable>; - public getAppsConfig(observe?: 'events', reportProgress?: boolean): Observable>; - public getAppsConfig(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/utils/getAppsConfig`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; } - - /** - * Gets perun-web-gui.properties as Map<String,String> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getGuiConfiguration(observe?: 'body', reportProgress?: boolean): Observable<{ [key: string]: string; }>; - public getGuiConfiguration(observe?: 'response', reportProgress?: boolean): Observable>; - public getGuiConfiguration(observe?: 'events', reportProgress?: boolean): Observable>; - public getGuiConfiguration(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get<{ [key: string]: string; }>(`${this.configuration.basePath}/json/utils/getGuiConfiguration`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + /** + * Gets configuration of perun apps brandings and apps\' domains + * Returns object of type PerunAppsConfig + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAppsConfig(observe?: 'body', reportProgress?: boolean): Observable; + public getAppsConfig( + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getAppsConfig( + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getAppsConfig(observe: any = 'body', reportProgress: boolean = false): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); } - /** - * Gets Perun runtime status - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getPerunRPCVersion(observe?: 'body', reportProgress?: boolean): Observable; - public getPerunRPCVersion(observe?: 'response', reportProgress?: boolean): Observable>; - public getPerunRPCVersion(observe?: 'events', reportProgress?: boolean): Observable>; - public getPerunRPCVersion(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'text/plain' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); } - - /** - * Gets Perun runtime statistics - * Returns list of strings which looks like this \"Timestamp: \'2019-11-14 10:46:39.613\'\", \"USERS: \'39927\'\", \"FACILITIES: \'552\'\", \"DESTINATIONS: \'2568\'\", \"VOS: \'341\'\", \"RESOURCES: \'2560\'\", \"GROUPS: \'2300\'\", \"AUDITMESSAGES: \'7333237\'\" - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getPerunStatistics(observe?: 'body', reportProgress?: boolean): Observable>; - public getPerunStatistics(observe?: 'response', reportProgress?: boolean): Observable>>; - public getPerunStatistics(observe?: 'events', reportProgress?: boolean): Observable>>; - public getPerunStatistics(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/utils/getPerunStatistics`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); } - /** - * Gets Perun runtime status - * Returns list of strings which looks like this \"Version of Perun: 3.8.6\", \"Version of PerunDB: 3.1.55\", \"Version of Servlet: Apache Tomcat/9.0.16 (Debian)\", \"Version of DB-driver: PostgreSQL JDBC Driver-42.2.8\", \"Version of DB: PostgreSQL-12.0 (Debian 12.0-2.pgdg100+1)\", \"Version of Java platform: 11.0.5\", \"AuditerConsumer: \'127.0.0.1:6071\' with last processed id=\'23463958\'\", \"AuditerConsumer: \'ldapcConsumer\' with last processed id=\'23463958\'\", \"AuditerConsumer: \'notifications\' with last processed id=\'23463952\'\", \"LastMessageId: 23463958\", \"Timestamp: 2019-11-14 10:12:30.99\" - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getPerunStatus(observe?: 'body', reportProgress?: boolean): Observable>; - public getPerunStatus(observe?: 'response', reportProgress?: boolean): Observable>>; - public getPerunStatus(observe?: 'events', reportProgress?: boolean): Observable>>; - public getPerunStatus(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } + return this.httpClient.get( + `${this.configuration.basePath}/json/utils/getAppsConfig`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets perun-web-gui.properties as Map<String,String> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGuiConfiguration( + observe?: 'body', + reportProgress?: boolean + ): Observable<{ [key: string]: string }>; + public getGuiConfiguration( + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getGuiConfiguration( + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getGuiConfiguration( + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + return this.httpClient.get<{ [key: string]: string }>( + `${this.configuration.basePath}/json/utils/getGuiConfiguration`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets Perun runtime status + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getPerunRPCVersion(observe?: 'body', reportProgress?: boolean): Observable; + public getPerunRPCVersion( + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getPerunRPCVersion( + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getPerunRPCVersion( + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } - return this.httpClient.get>(`${this.configuration.basePath}/json/utils/getPerunStatus`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['text/plain']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); } - /** - * Gets Perun system time in milliseconds since the epoch - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getPerunSystemTimeInMillis(observe?: 'body', reportProgress?: boolean): Observable; - public getPerunSystemTimeInMillis(observe?: 'response', reportProgress?: boolean): Observable>; - public getPerunSystemTimeInMillis(observe?: 'events', reportProgress?: boolean): Observable>; - public getPerunSystemTimeInMillis(observe: any = 'body', reportProgress: boolean = false ): Observable { + return this.httpClient.get(`${this.configuration.basePath}/`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + }); + } + + /** + * Gets Perun runtime statistics + * Returns list of strings which looks like this \"Timestamp: \'2019-11-14 10:46:39.613\'\", \"USERS: \'39927\'\", \"FACILITIES: \'552\'\", \"DESTINATIONS: \'2568\'\", \"VOS: \'341\'\", \"RESOURCES: \'2560\'\", \"GROUPS: \'2300\'\", \"AUDITMESSAGES: \'7333237\'\" + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getPerunStatistics(observe?: 'body', reportProgress?: boolean): Observable>; + public getPerunStatistics( + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getPerunStatistics( + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getPerunStatistics( + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } - let headers = this.defaultHeaders; + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } + return this.httpClient.get>( + `${this.configuration.basePath}/json/utils/getPerunStatistics`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets Perun runtime status + * Returns list of strings which looks like this \"Version of Perun: 3.8.6\", \"Version of PerunDB: 3.1.55\", \"Version of Servlet: Apache Tomcat/9.0.16 (Debian)\", \"Version of DB-driver: PostgreSQL JDBC Driver-42.2.8\", \"Version of DB: PostgreSQL-12.0 (Debian 12.0-2.pgdg100+1)\", \"Version of Java platform: 11.0.5\", \"AuditerConsumer: \'127.0.0.1:6071\' with last processed id=\'23463958\'\", \"AuditerConsumer: \'ldapcConsumer\' with last processed id=\'23463958\'\", \"AuditerConsumer: \'notifications\' with last processed id=\'23463952\'\", \"LastMessageId: 23463958\", \"Timestamp: 2019-11-14 10:12:30.99\" + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getPerunStatus(observe?: 'body', reportProgress?: boolean): Observable>; + public getPerunStatus( + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getPerunStatus( + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getPerunStatus(observe: any = 'body', reportProgress: boolean = false): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + return this.httpClient.get>( + `${this.configuration.basePath}/json/utils/getPerunStatus`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets Perun system time in milliseconds since the epoch + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getPerunSystemTimeInMillis(observe?: 'body', reportProgress?: boolean): Observable; + public getPerunSystemTimeInMillis( + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getPerunSystemTimeInMillis( + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getPerunSystemTimeInMillis( + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } - return this.httpClient.get(`${this.configuration.basePath}/json/utils/getPerunSystemTimeInMillis`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); } + return this.httpClient.get( + `${this.configuration.basePath}/json/utils/getPerunSystemTimeInMillis`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } } diff --git a/libs/perun/openapi/src/lib/api/vosManager.service.ts b/libs/perun/openapi/src/lib/api/vosManager.service.ts index cfb51b810..b0d825f58 100644 --- a/libs/perun/openapi/src/lib/api/vosManager.service.ts +++ b/libs/perun/openapi/src/lib/api/vosManager.service.ts @@ -11,11 +11,17 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; import { BanOnVo } from '../model/banOnVo'; import { Candidate } from '../model/candidate'; @@ -30,2054 +36,2775 @@ import { User } from '../model/user'; import { Vo } from '../model/vo'; import { VoAdminRoles } from '../model/voAdminRoles'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - - +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class VosManagerService { + protected basePath = 'https://perun.cesnet.cz/krb/rpc'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string, + @Optional() configuration: Configuration + ) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + /** + * Add group as a sponsor of guest members of VO. All members of group will become sponsors. + * @param vo id of Vo + * @param authorizedGroup Group id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addSponsorRoleToGroup( + vo: number, + authorizedGroup: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public addSponsorRoleToGroup( + vo: number, + authorizedGroup: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public addSponsorRoleToGroup( + vo: number, + authorizedGroup: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public addSponsorRoleToGroup( + vo: number, + authorizedGroup: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling addSponsorRoleToGroup.' + ); + } + if (authorizedGroup === null || authorizedGroup === undefined) { + throw new Error( + 'Required parameter authorizedGroup was null or undefined when calling addSponsorRoleToGroup.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (authorizedGroup !== undefined && authorizedGroup !== null) { + queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/vosManager/addSponsorRole/group`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Add user as a sponsor for guest members of VO. + * @param vo id of Vo + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addSponsorRoleToUser( + vo: number, + user: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public addSponsorRoleToUser( + vo: number, + user: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public addSponsorRoleToUser( + vo: number, + user: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public addSponsorRoleToUser( + vo: number, + user: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling addSponsorRoleToUser.' + ); + } + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling addSponsorRoleToUser.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/vosManager/addSponsorRole/user`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Adds a group as a Vo admin. + * @param vo id of Vo + * @param authorizedGroup Group id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addVoAdminGroup( + vo: number, + authorizedGroup: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public addVoAdminGroup( + vo: number, + authorizedGroup: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public addVoAdminGroup( + vo: number, + authorizedGroup: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public addVoAdminGroup( + vo: number, + authorizedGroup: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling addVoAdminGroup.'); + } + if (authorizedGroup === null || authorizedGroup === undefined) { + throw new Error( + 'Required parameter authorizedGroup was null or undefined when calling addVoAdminGroup.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (authorizedGroup !== undefined && authorizedGroup !== null) { + queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/vosManager/addAdmin/group`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Adds a user as a Vo admin. + * @param vo id of Vo + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addVoAdminUser( + vo: number, + user: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public addVoAdminUser( + vo: number, + user: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public addVoAdminUser( + vo: number, + user: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public addVoAdminUser( + vo: number, + user: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling addVoAdminUser.'); + } + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling addVoAdminUser.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/vosManager/addAdmin/user`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Creates new VO. Caller is automatically set as VO manager. + * @param name name - length can be no more than 128 characters + * @param shortName shortName - can contain only a-z, A-Z, 0-9, \'.\', \'-\', \'_\' and cannot be longer than 32 characters + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createVoWithName( + name: string, + shortName: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public createVoWithName( + name: string, + shortName: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public createVoWithName( + name: string, + shortName: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public createVoWithName( + name: string, + shortName: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (name === null || name === undefined) { + throw new Error( + 'Required parameter name was null or undefined when calling createVoWithName.' + ); + } + if (shortName === null || shortName === undefined) { + throw new Error( + 'Required parameter shortName was null or undefined when calling createVoWithName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (name !== undefined && name !== null) { + queryParameters = queryParameters.set('name', name); + } + if (shortName !== undefined && shortName !== null) { + queryParameters = queryParameters.set('shortName', shortName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/vosManager/createVo/withName`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Creates new VO. Caller is automatically set as VO manager. Vo Object must contain: name - lenght can be no more than 128 characters shortName - can contain only a-z, A-Z, 0-9, \'.\', \'-\', \'_\' and cannot be longer than 32 characters. Other parameters are ignored. @exampleParam vo { \"name\" : \"My testing VO\" , \"shortName\" : \"test_vo\" } + * @param inputCreateVoWithVo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createVoWithVo( + inputCreateVoWithVo: InputCreateVoWithVo, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public createVoWithVo( + inputCreateVoWithVo: InputCreateVoWithVo, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public createVoWithVo( + inputCreateVoWithVo: InputCreateVoWithVo, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public createVoWithVo( + inputCreateVoWithVo: InputCreateVoWithVo, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputCreateVoWithVo === null || inputCreateVoWithVo === undefined) { + throw new Error( + 'Required parameter inputCreateVoWithVo was null or undefined when calling createVoWithVo.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/vosManager/createVo/withVo`, + inputCreateVoWithVo, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Deletes a VO. If force == true then VO is deleted including members, groups and resources. If force == false or null only empty VO is deleted or exception is thrown. + * @param vo id of Vo + * @param force If true, delete entity forcefully. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteVo( + vo: number, + force?: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public deleteVo( + vo: number, + force?: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public deleteVo( + vo: number, + force?: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public deleteVo( + vo: number, + force?: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling deleteVo.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (force !== undefined && force !== null) { + queryParameters = queryParameters.set('force', force); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/vosManager/deleteVo`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Find candidates for VO. Candidates can be used to create new members. Candidates are searched in VOs external sources (if available). Candidates, which are already members of VO are never returned even if they match searchString. You can also specify maximum number of results. + * @param id numeric id + * @param searchString Text to search by + * @param maxNumOfResults Number of maximum results + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findCandidates( + id: number, + searchString: string, + maxNumOfResults?: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public findCandidates( + id: number, + searchString: string, + maxNumOfResults?: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public findCandidates( + id: number, + searchString: string, + maxNumOfResults?: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public findCandidates( + id: number, + searchString: string, + maxNumOfResults?: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling findCandidates.'); + } + if (searchString === null || searchString === undefined) { + throw new Error( + 'Required parameter searchString was null or undefined when calling findCandidates.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + if (searchString !== undefined && searchString !== null) { + queryParameters = queryParameters.set('searchString', searchString); + } + if (maxNumOfResults !== undefined && maxNumOfResults !== null) { + queryParameters = queryParameters.set('maxNumOfResults', maxNumOfResults); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/vosManager/findCandidates`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Find candidates for Group. Candidates can be used to create new VO and Group members. Candidates are searched in Groups external sources (if available). Candidates, which are already members of VO are never returned even if they match searchString. + * @param group id of Group + * @param searchString Text to search by + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findCandidatesForGroup( + group: number, + searchString: string, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public findCandidatesForGroup( + group: number, + searchString: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public findCandidatesForGroup( + group: number, + searchString: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public findCandidatesForGroup( + group: number, + searchString: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling findCandidatesForGroup.' + ); + } + if (searchString === null || searchString === undefined) { + throw new Error( + 'Required parameter searchString was null or undefined when calling findCandidatesForGroup.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (searchString !== undefined && searchString !== null) { + queryParameters = queryParameters.set('searchString', searchString); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/vosManager/findCandidates/forGroup`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Return list of all VOs in Perun. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllVos(observe?: 'body', reportProgress?: boolean): Observable>; + public getAllVos( + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getAllVos(observe?: 'events', reportProgress?: boolean): Observable>>; + public getAllVos(observe: any = 'body', reportProgress: boolean = false): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/vosManager/getAllVos`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Find MemberCandidates for GROUP. MemberCandidates can be used to create new members. They are made of Candidate, RichUser and Member objects. Candidates are searched in VO\'s or GROUP\'s (depends on privileges) external sources (if available). RichUsers are searched in given VO and are associated with appropriate candidate and member. RichUsers for appropriate Candidate are also searched in the whole Perun. + * @param group id of Group + * @param attrNames list of attribute names List<String> + * @param searchString Text to search by + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getCompleteCandidatesForGroup( + group: number, + attrNames: Array, + searchString: string, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getCompleteCandidatesForGroup( + group: number, + attrNames: Array, + searchString: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getCompleteCandidatesForGroup( + group: number, + attrNames: Array, + searchString: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getCompleteCandidatesForGroup( + group: number, + attrNames: Array, + searchString: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (group === null || group === undefined) { + throw new Error( + 'Required parameter group was null or undefined when calling getCompleteCandidatesForGroup.' + ); + } + if (attrNames === null || attrNames === undefined) { + throw new Error( + 'Required parameter attrNames was null or undefined when calling getCompleteCandidatesForGroup.' + ); + } + if (searchString === null || searchString === undefined) { + throw new Error( + 'Required parameter searchString was null or undefined when calling getCompleteCandidatesForGroup.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (group !== undefined && group !== null) { + queryParameters = queryParameters.set('group', group); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + if (searchString !== undefined && searchString !== null) { + queryParameters = queryParameters.set('searchString', searchString); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/vosManager/getCompleteCandidates/forGroup`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Find MemberCandidates for VO. MemberCandidates can be used to create new members. They are made of Candidate, RichUser and Member objects. Candidates are searched in VO\'s external sources (if available). RichUsers are searched in given VO and are associated with appropriate candidate and member. RichUsers for MemberCandidates may also be searched in the whole Perun. + * @param vo id of Vo + * @param attrNames list of attribute names List<String> + * @param searchString Text to search by + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getCompleteCandidatesForVo( + vo: number, + attrNames: Array, + searchString: string, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getCompleteCandidatesForVo( + vo: number, + attrNames: Array, + searchString: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getCompleteCandidatesForVo( + vo: number, + attrNames: Array, + searchString: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getCompleteCandidatesForVo( + vo: number, + attrNames: Array, + searchString: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling getCompleteCandidatesForVo.' + ); + } + if (attrNames === null || attrNames === undefined) { + throw new Error( + 'Required parameter attrNames was null or undefined when calling getCompleteCandidatesForVo.' + ); + } + if (searchString === null || searchString === undefined) { + throw new Error( + 'Required parameter searchString was null or undefined when calling getCompleteCandidatesForVo.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (attrNames) { + attrNames.forEach((element) => { + queryParameters = queryParameters.append('attrNames[]', element); + }); + } + if (searchString !== undefined && searchString !== null) { + queryParameters = queryParameters.set('searchString', searchString); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/vosManager/getCompleteCandidates/forVo`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Return list of all VOs the caller is associated with. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getMyVos(observe?: 'body', reportProgress?: boolean): Observable>; + public getMyVos( + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getMyVos(observe?: 'events', reportProgress?: boolean): Observable>>; + public getMyVos(observe: any = 'body', reportProgress: boolean = false): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>(`${this.configuration.basePath}/json/vosManager/getVos`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + }); + } + + /** + * Get list of all richUser administrators for the vo and supported role with specific attributes. If some group is administrator of the given group, all VALID members are included in the list. Supported roles: VOOBSERVER, TOPGROUPCREATOR, VOADMIN If \"onlyDirectAdmins\" is == true, return only direct admins of the vo for supported role with specific attributes. If \"allUserAttributes\" is == true, do not specify attributes through list and return them all in objects richUser. Ignoring list of specific attributes. + * @param vo id of Vo + * @param role role name + * @param specificAttributes list of specified attributes which are needed in object richUser + * @param allUserAttributes if == true, get all possible user attributes and ignore list of specificAttributes (if false, get only specific attributes) + * @param onlyDirectAdmins if == true, get only direct vo administrators (if false, get both direct and indirect) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRichAdminsForVo( + vo: number, + role: VoAdminRoles, + specificAttributes: Array, + allUserAttributes: boolean, + onlyDirectAdmins: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getRichAdminsForVo( + vo: number, + role: VoAdminRoles, + specificAttributes: Array, + allUserAttributes: boolean, + onlyDirectAdmins: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getRichAdminsForVo( + vo: number, + role: VoAdminRoles, + specificAttributes: Array, + allUserAttributes: boolean, + onlyDirectAdmins: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getRichAdminsForVo( + vo: number, + role: VoAdminRoles, + specificAttributes: Array, + allUserAttributes: boolean, + onlyDirectAdmins: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling getRichAdminsForVo.' + ); + } + if (role === null || role === undefined) { + throw new Error( + 'Required parameter role was null or undefined when calling getRichAdminsForVo.' + ); + } + if (specificAttributes === null || specificAttributes === undefined) { + throw new Error( + 'Required parameter specificAttributes was null or undefined when calling getRichAdminsForVo.' + ); + } + if (allUserAttributes === null || allUserAttributes === undefined) { + throw new Error( + 'Required parameter allUserAttributes was null or undefined when calling getRichAdminsForVo.' + ); + } + if (onlyDirectAdmins === null || onlyDirectAdmins === undefined) { + throw new Error( + 'Required parameter onlyDirectAdmins was null or undefined when calling getRichAdminsForVo.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (role !== undefined && role !== null) { + queryParameters = queryParameters.set('role', role); + } + if (specificAttributes) { + specificAttributes.forEach((element) => { + queryParameters = queryParameters.append('specificAttributes', element); + }); + } + if (allUserAttributes !== undefined && allUserAttributes !== null) { + queryParameters = queryParameters.set('allUserAttributes', allUserAttributes); + } + if (onlyDirectAdmins !== undefined && onlyDirectAdmins !== null) { + queryParameters = queryParameters.set('onlyDirectAdmins', onlyDirectAdmins); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/vosManager/getRichAdmins`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get list of administrator groups of the given VO. Supported roles: VOOBSERVER, TOPGROUPCREATOR, VOADMIN + * @param vo id of Vo + * @param role supported role name + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVoAdminGroups( + vo: number, + role: VoAdminRoles, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getVoAdminGroups( + vo: number, + role: VoAdminRoles, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getVoAdminGroups( + vo: number, + role: VoAdminRoles, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getVoAdminGroups( + vo: number, + role: VoAdminRoles, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getVoAdminGroups.'); + } + if (role === null || role === undefined) { + throw new Error( + 'Required parameter role was null or undefined when calling getVoAdminGroups.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (role !== undefined && role !== null) { + queryParameters = queryParameters.set('role', role); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/vosManager/getAdminGroups`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get list of all vo administrators for supported role and specific vo. If onlyDirectAdmins is true, return only direct admins of the vo for supported role. Otherwise return direct admins and users who are VALID members of administrator groups Supported roles: VOOBSERVER, TOPGROUPCREATOR, VOADMIN + * @param vo id of Vo + * @param role supported role name + * @param onlyDirectAdmins get only direct administrators (if false, get both direct and indirect) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVoAdminUsers( + vo: number, + role: VoAdminRoles, + onlyDirectAdmins: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getVoAdminUsers( + vo: number, + role: VoAdminRoles, + onlyDirectAdmins: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getVoAdminUsers( + vo: number, + role: VoAdminRoles, + onlyDirectAdmins: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getVoAdminUsers( + vo: number, + role: VoAdminRoles, + onlyDirectAdmins: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getVoAdminUsers.'); + } + if (role === null || role === undefined) { + throw new Error( + 'Required parameter role was null or undefined when calling getVoAdminUsers.' + ); + } + if (onlyDirectAdmins === null || onlyDirectAdmins === undefined) { + throw new Error( + 'Required parameter onlyDirectAdmins was null or undefined when calling getVoAdminUsers.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (role !== undefined && role !== null) { + queryParameters = queryParameters.set('role', role); + } + if (onlyDirectAdmins !== undefined && onlyDirectAdmins !== null) { + queryParameters = queryParameters.set('onlyDirectAdmins', onlyDirectAdmins); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/vosManager/getAdmins`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get vo ban with given id. + * @param banId id of a ban + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVoBanById( + banId: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getVoBanById( + banId: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getVoBanById( + banId: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getVoBanById( + banId: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (banId === null || banId === undefined) { + throw new Error('Required parameter banId was null or undefined when calling getVoBanById.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (banId !== undefined && banId !== null) { + queryParameters = queryParameters.set('banId', banId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/vosManager/getBanById`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get ban for given member, or null if he is not banned. + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVoBanForMember( + member: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getVoBanForMember( + member: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getVoBanForMember( + member: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getVoBanForMember( + member: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling getVoBanForMember.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/vosManager/getBanForMember`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Get list of all bans for vo with given id. + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVoBansForVo( + vo: number, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getVoBansForVo( + vo: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getVoBansForVo( + vo: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getVoBansForVo( + vo: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error('Required parameter vo was null or undefined when calling getVoBansForVo.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/vosManager/getBansForVo`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns a virtual organization by id. + * @param id numeric id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVoById(id: number, observe?: 'body', reportProgress?: boolean): Observable; + public getVoById( + id: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getVoById( + id: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getVoById( + id: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getVoById.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (id !== undefined && id !== null) { + queryParameters = queryParameters.set('id', id); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get(`${this.configuration.basePath}/json/vosManager/getVoById`, { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + }); + } + + /** + * Returns a VO by its short name. + * @param shortName short name of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVoByShortName( + shortName: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public getVoByShortName( + shortName: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getVoByShortName( + shortName: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getVoByShortName( + shortName: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (shortName === null || shortName === undefined) { + throw new Error( + 'Required parameter shortName was null or undefined when calling getVoByShortName.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (shortName !== undefined && shortName !== null) { + queryParameters = queryParameters.set('shortName', shortName); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/vosManager/getVoByShortName`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Returns number of vo members by their status. + * @param vo id of Vo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVoMembersCountsByStatus( + vo: number, + observe?: 'body', + reportProgress?: boolean + ): Observable<{ [key: string]: number }>; + public getVoMembersCountsByStatus( + vo: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getVoMembersCountsByStatus( + vo: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public getVoMembersCountsByStatus( + vo: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling getVoMembersCountsByStatus.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get<{ [key: string]: number }>( + `${this.configuration.basePath}/json/vosManager/getVoMembersCountsByStatus`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Return list of VOs by their ids. + * @param ids list of ids List<Integer> + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVosByIds( + ids: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + public getVosByIds( + ids: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + public getVosByIds( + ids: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + public getVosByIds( + ids: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (ids === null || ids === undefined) { + throw new Error('Required parameter ids was null or undefined when calling getVosByIds.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (ids) { + ids.forEach((element) => { + queryParameters = queryParameters.append('ids[]', element); + }); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get>( + `${this.configuration.basePath}/json/vosManager/getVosByIds`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Gets count of all vos. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getVosCount(observe?: 'body', reportProgress?: boolean): Observable; + public getVosCount( + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public getVosCount(observe?: 'events', reportProgress?: boolean): Observable>; + public getVosCount(observe: any = 'body', reportProgress: boolean = false): Observable { + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.get( + `${this.configuration.basePath}/json/vosManager/getVosCount`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Removes group as a sponsor. All group members will cease to be sponsors, and their sponsored members will be set as expired if the group member was their last sponsor. + * @param vo id of Vo + * @param authorizedGroup Group id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeSponsorRoleFromGroup( + vo: number, + authorizedGroup: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeSponsorRoleFromGroup( + vo: number, + authorizedGroup: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeSponsorRoleFromGroup( + vo: number, + authorizedGroup: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeSponsorRoleFromGroup( + vo: number, + authorizedGroup: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling removeSponsorRoleFromGroup.' + ); + } + if (authorizedGroup === null || authorizedGroup === undefined) { + throw new Error( + 'Required parameter authorizedGroup was null or undefined when calling removeSponsorRoleFromGroup.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (authorizedGroup !== undefined && authorizedGroup !== null) { + queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/vosManager/removeSponsorRole/group`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Removes user as a sponsor. His or her sponsored members will be set as expired if the user was their last sponsor. + * @param vo id of Vo + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeSponsorRoleFromUser( + vo: number, + user: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeSponsorRoleFromUser( + vo: number, + user: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeSponsorRoleFromUser( + vo: number, + user: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeSponsorRoleFromUser( + vo: number, + user: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling removeSponsorRoleFromUser.' + ); + } + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling removeSponsorRoleFromUser.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/vosManager/removeSponsorRole/user`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Removes a group as a Vo admin. + * @param vo id of Vo + * @param authorizedGroup Group id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeVoAdminGroup( + vo: number, + authorizedGroup: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeVoAdminGroup( + vo: number, + authorizedGroup: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeVoAdminGroup( + vo: number, + authorizedGroup: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeVoAdminGroup( + vo: number, + authorizedGroup: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling removeVoAdminGroup.' + ); + } + if (authorizedGroup === null || authorizedGroup === undefined) { + throw new Error( + 'Required parameter authorizedGroup was null or undefined when calling removeVoAdminGroup.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (authorizedGroup !== undefined && authorizedGroup !== null) { + queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/vosManager/removeAdmin/group`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Removes a user as a Vo admin. + * @param vo id of Vo + * @param user id of User + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeVoAdminUser( + vo: number, + user: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeVoAdminUser( + vo: number, + user: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeVoAdminUser( + vo: number, + user: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeVoAdminUser( + vo: number, + user: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (vo === null || vo === undefined) { + throw new Error( + 'Required parameter vo was null or undefined when calling removeVoAdminUser.' + ); + } + if (user === null || user === undefined) { + throw new Error( + 'Required parameter user was null or undefined when calling removeVoAdminUser.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (vo !== undefined && vo !== null) { + queryParameters = queryParameters.set('vo', vo); + } + if (user !== undefined && user !== null) { + queryParameters = queryParameters.set('user', user); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/vosManager/removeAdmin/user`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove vo ban with given id. + * @param banId id of a ban + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeVoBan(banId: number, observe?: 'body', reportProgress?: boolean): Observable; + public removeVoBan( + banId: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeVoBan( + banId: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeVoBan( + banId: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (banId === null || banId === undefined) { + throw new Error('Required parameter banId was null or undefined when calling removeVoBan.'); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (banId !== undefined && banId !== null) { + queryParameters = queryParameters.set('banId', banId); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/vosManager/removeBan`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Remove vo ban for member with given id. + * @param member id of Member + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removeVoBanForMember( + member: number, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public removeVoBanForMember( + member: number, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public removeVoBanForMember( + member: number, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public removeVoBanForMember( + member: number, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (member === null || member === undefined) { + throw new Error( + 'Required parameter member was null or undefined when calling removeVoBanForMember.' + ); + } + + let queryParameters = new HttpParams({ encoder: this.encoder }); + if (member !== undefined && member !== null) { + queryParameters = queryParameters.set('member', member); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/urlinjsonout/vosManager/removeBanForMember`, + null, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Set ban for member on his vo. The member id is required, validityTo and description are optional. voId is ignored. + * @param inputSetVoBan + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public setVoBan( + inputSetVoBan: InputSetVoBan, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public setVoBan( + inputSetVoBan: InputSetVoBan, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public setVoBan( + inputSetVoBan: InputSetVoBan, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public setVoBan( + inputSetVoBan: InputSetVoBan, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputSetVoBan === null || inputSetVoBan === undefined) { + throw new Error( + 'Required parameter inputSetVoBan was null or undefined when calling setVoBan.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.post( + `${this.configuration.basePath}/json/vosManager/setBan`, + inputSetVoBan, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } + + /** + * Updates a VO. Only name parameter is updated. VO to updated is determined by id parameter of passed VO object. + * @param inputUpdateVo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateVo( + inputUpdateVo: InputUpdateVo, + observe?: 'body', + reportProgress?: boolean + ): Observable; + public updateVo( + inputUpdateVo: InputUpdateVo, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + public updateVo( + inputUpdateVo: InputUpdateVo, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + public updateVo( + inputUpdateVo: InputUpdateVo, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (inputUpdateVo === null || inputUpdateVo === undefined) { + throw new Error( + 'Required parameter inputUpdateVo was null or undefined when calling updateVo.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (ApiKeyAuth) required + if (this.configuration.apiKeys && this.configuration.apiKeys['Authorization']) { + headers = headers.set('Authorization', this.configuration.apiKeys['Authorization']); + } + + // authentication (BasicAuth) required + if (this.configuration.username || this.configuration.password) { + headers = headers.set( + 'Authorization', + 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password) + ); + } + // authentication (BearerAuth) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } - protected basePath = 'https://perun.cesnet.cz/krb/rpc'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - - - /** - * Add group as a sponsor of guest members of VO. All members of group will become sponsors. - * @param vo id of Vo - * @param authorizedGroup Group id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addSponsorRoleToGroup(vo: number, authorizedGroup: number, observe?: 'body', reportProgress?: boolean): Observable; - public addSponsorRoleToGroup(vo: number, authorizedGroup: number, observe?: 'response', reportProgress?: boolean): Observable>; - public addSponsorRoleToGroup(vo: number, authorizedGroup: number, observe?: 'events', reportProgress?: boolean): Observable>; - public addSponsorRoleToGroup(vo: number, authorizedGroup: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling addSponsorRoleToGroup.'); - } - if (authorizedGroup === null || authorizedGroup === undefined) { - throw new Error('Required parameter authorizedGroup was null or undefined when calling addSponsorRoleToGroup.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (authorizedGroup !== undefined && authorizedGroup !== null) { - queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/vosManager/addSponsorRole/group`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Add user as a sponsor for guest members of VO. - * @param vo id of Vo - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addSponsorRoleToUser(vo: number, user: number, observe?: 'body', reportProgress?: boolean): Observable; - public addSponsorRoleToUser(vo: number, user: number, observe?: 'response', reportProgress?: boolean): Observable>; - public addSponsorRoleToUser(vo: number, user: number, observe?: 'events', reportProgress?: boolean): Observable>; - public addSponsorRoleToUser(vo: number, user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling addSponsorRoleToUser.'); - } - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling addSponsorRoleToUser.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/vosManager/addSponsorRole/user`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Adds a group as a Vo admin. - * @param vo id of Vo - * @param authorizedGroup Group id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addVoAdminGroup(vo: number, authorizedGroup: number, observe?: 'body', reportProgress?: boolean): Observable; - public addVoAdminGroup(vo: number, authorizedGroup: number, observe?: 'response', reportProgress?: boolean): Observable>; - public addVoAdminGroup(vo: number, authorizedGroup: number, observe?: 'events', reportProgress?: boolean): Observable>; - public addVoAdminGroup(vo: number, authorizedGroup: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling addVoAdminGroup.'); - } - if (authorizedGroup === null || authorizedGroup === undefined) { - throw new Error('Required parameter authorizedGroup was null or undefined when calling addVoAdminGroup.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (authorizedGroup !== undefined && authorizedGroup !== null) { - queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/vosManager/addAdmin/group`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Adds a user as a Vo admin. - * @param vo id of Vo - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addVoAdminUser(vo: number, user: number, observe?: 'body', reportProgress?: boolean): Observable; - public addVoAdminUser(vo: number, user: number, observe?: 'response', reportProgress?: boolean): Observable>; - public addVoAdminUser(vo: number, user: number, observe?: 'events', reportProgress?: boolean): Observable>; - public addVoAdminUser(vo: number, user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling addVoAdminUser.'); - } - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling addVoAdminUser.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/vosManager/addAdmin/user`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Creates new VO. Caller is automatically set as VO manager. - * @param name name - length can be no more than 128 characters - * @param shortName shortName - can contain only a-z, A-Z, 0-9, \'.\', \'-\', \'_\' and cannot be longer than 32 characters - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createVoWithName(name: string, shortName: string, observe?: 'body', reportProgress?: boolean): Observable; - public createVoWithName(name: string, shortName: string, observe?: 'response', reportProgress?: boolean): Observable>; - public createVoWithName(name: string, shortName: string, observe?: 'events', reportProgress?: boolean): Observable>; - public createVoWithName(name: string, shortName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling createVoWithName.'); - } - if (shortName === null || shortName === undefined) { - throw new Error('Required parameter shortName was null or undefined when calling createVoWithName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (name !== undefined && name !== null) { - queryParameters = queryParameters.set('name', name); - } - if (shortName !== undefined && shortName !== null) { - queryParameters = queryParameters.set('shortName', shortName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/vosManager/createVo/withName`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Creates new VO. Caller is automatically set as VO manager. Vo Object must contain: name - lenght can be no more than 128 characters shortName - can contain only a-z, A-Z, 0-9, \'.\', \'-\', \'_\' and cannot be longer than 32 characters. Other parameters are ignored. @exampleParam vo { \"name\" : \"My testing VO\" , \"shortName\" : \"test_vo\" } - * @param inputCreateVoWithVo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createVoWithVo(inputCreateVoWithVo: InputCreateVoWithVo, observe?: 'body', reportProgress?: boolean): Observable; - public createVoWithVo(inputCreateVoWithVo: InputCreateVoWithVo, observe?: 'response', reportProgress?: boolean): Observable>; - public createVoWithVo(inputCreateVoWithVo: InputCreateVoWithVo, observe?: 'events', reportProgress?: boolean): Observable>; - public createVoWithVo(inputCreateVoWithVo: InputCreateVoWithVo, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputCreateVoWithVo === null || inputCreateVoWithVo === undefined) { - throw new Error('Required parameter inputCreateVoWithVo was null or undefined when calling createVoWithVo.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/vosManager/createVo/withVo`, - inputCreateVoWithVo, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Deletes a VO. If force == true then VO is deleted including members, groups and resources. If force == false or null only empty VO is deleted or exception is thrown. - * @param vo id of Vo - * @param force If true, delete entity forcefully. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteVo(vo: number, force?: boolean, observe?: 'body', reportProgress?: boolean): Observable; - public deleteVo(vo: number, force?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteVo(vo: number, force?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteVo(vo: number, force?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling deleteVo.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (force !== undefined && force !== null) { - queryParameters = queryParameters.set('force', force); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/vosManager/deleteVo`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Find candidates for VO. Candidates can be used to create new members. Candidates are searched in VOs external sources (if available). Candidates, which are already members of VO are never returned even if they match searchString. You can also specify maximum number of results. - * @param id numeric id - * @param searchString Text to search by - * @param maxNumOfResults Number of maximum results - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findCandidates(id: number, searchString: string, maxNumOfResults?: number, observe?: 'body', reportProgress?: boolean): Observable>; - public findCandidates(id: number, searchString: string, maxNumOfResults?: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public findCandidates(id: number, searchString: string, maxNumOfResults?: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public findCandidates(id: number, searchString: string, maxNumOfResults?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling findCandidates.'); - } - if (searchString === null || searchString === undefined) { - throw new Error('Required parameter searchString was null or undefined when calling findCandidates.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - if (searchString !== undefined && searchString !== null) { - queryParameters = queryParameters.set('searchString', searchString); - } - if (maxNumOfResults !== undefined && maxNumOfResults !== null) { - queryParameters = queryParameters.set('maxNumOfResults', maxNumOfResults); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/vosManager/findCandidates`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Find candidates for Group. Candidates can be used to create new VO and Group members. Candidates are searched in Groups external sources (if available). Candidates, which are already members of VO are never returned even if they match searchString. - * @param group id of Group - * @param searchString Text to search by - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findCandidatesForGroup(group: number, searchString: string, observe?: 'body', reportProgress?: boolean): Observable>; - public findCandidatesForGroup(group: number, searchString: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public findCandidatesForGroup(group: number, searchString: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public findCandidatesForGroup(group: number, searchString: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling findCandidatesForGroup.'); - } - if (searchString === null || searchString === undefined) { - throw new Error('Required parameter searchString was null or undefined when calling findCandidatesForGroup.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (searchString !== undefined && searchString !== null) { - queryParameters = queryParameters.set('searchString', searchString); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/vosManager/findCandidates/forGroup`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Return list of all VOs in Perun. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllVos(observe?: 'body', reportProgress?: boolean): Observable>; - public getAllVos(observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllVos(observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllVos(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/vosManager/getAllVos`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Find MemberCandidates for GROUP. MemberCandidates can be used to create new members. They are made of Candidate, RichUser and Member objects. Candidates are searched in VO\'s or GROUP\'s (depends on privileges) external sources (if available). RichUsers are searched in given VO and are associated with appropriate candidate and member. RichUsers for appropriate Candidate are also searched in the whole Perun. - * @param group id of Group - * @param attrNames list of attribute names List<String> - * @param searchString Text to search by - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getCompleteCandidatesForGroup(group: number, attrNames: Array, searchString: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getCompleteCandidatesForGroup(group: number, attrNames: Array, searchString: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getCompleteCandidatesForGroup(group: number, attrNames: Array, searchString: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getCompleteCandidatesForGroup(group: number, attrNames: Array, searchString: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getCompleteCandidatesForGroup.'); - } - if (attrNames === null || attrNames === undefined) { - throw new Error('Required parameter attrNames was null or undefined when calling getCompleteCandidatesForGroup.'); - } - if (searchString === null || searchString === undefined) { - throw new Error('Required parameter searchString was null or undefined when calling getCompleteCandidatesForGroup.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (group !== undefined && group !== null) { - queryParameters = queryParameters.set('group', group); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - if (searchString !== undefined && searchString !== null) { - queryParameters = queryParameters.set('searchString', searchString); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/vosManager/getCompleteCandidates/forGroup`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Find MemberCandidates for VO. MemberCandidates can be used to create new members. They are made of Candidate, RichUser and Member objects. Candidates are searched in VO\'s external sources (if available). RichUsers are searched in given VO and are associated with appropriate candidate and member. RichUsers for MemberCandidates may also be searched in the whole Perun. - * @param vo id of Vo - * @param attrNames list of attribute names List<String> - * @param searchString Text to search by - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getCompleteCandidatesForVo(vo: number, attrNames: Array, searchString: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getCompleteCandidatesForVo(vo: number, attrNames: Array, searchString: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getCompleteCandidatesForVo(vo: number, attrNames: Array, searchString: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getCompleteCandidatesForVo(vo: number, attrNames: Array, searchString: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getCompleteCandidatesForVo.'); - } - if (attrNames === null || attrNames === undefined) { - throw new Error('Required parameter attrNames was null or undefined when calling getCompleteCandidatesForVo.'); - } - if (searchString === null || searchString === undefined) { - throw new Error('Required parameter searchString was null or undefined when calling getCompleteCandidatesForVo.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (attrNames) { - attrNames.forEach((element) => { - queryParameters = queryParameters.append('attrNames[]', element); - }) - } - if (searchString !== undefined && searchString !== null) { - queryParameters = queryParameters.set('searchString', searchString); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/vosManager/getCompleteCandidates/forVo`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Return list of all VOs the caller is associated with. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getMyVos(observe?: 'body', reportProgress?: boolean): Observable>; - public getMyVos(observe?: 'response', reportProgress?: boolean): Observable>>; - public getMyVos(observe?: 'events', reportProgress?: boolean): Observable>>; - public getMyVos(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/vosManager/getVos`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get list of all richUser administrators for the vo and supported role with specific attributes. If some group is administrator of the given group, all VALID members are included in the list. Supported roles: VOOBSERVER, TOPGROUPCREATOR, VOADMIN If \"onlyDirectAdmins\" is == true, return only direct admins of the vo for supported role with specific attributes. If \"allUserAttributes\" is == true, do not specify attributes through list and return them all in objects richUser. Ignoring list of specific attributes. - * @param vo id of Vo - * @param role role name - * @param specificAttributes list of specified attributes which are needed in object richUser - * @param allUserAttributes if == true, get all possible user attributes and ignore list of specificAttributes (if false, get only specific attributes) - * @param onlyDirectAdmins if == true, get only direct vo administrators (if false, get both direct and indirect) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRichAdminsForVo(vo: number, role: VoAdminRoles, specificAttributes: Array, allUserAttributes: boolean, onlyDirectAdmins: boolean, observe?: 'body', reportProgress?: boolean): Observable>; - public getRichAdminsForVo(vo: number, role: VoAdminRoles, specificAttributes: Array, allUserAttributes: boolean, onlyDirectAdmins: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; - public getRichAdminsForVo(vo: number, role: VoAdminRoles, specificAttributes: Array, allUserAttributes: boolean, onlyDirectAdmins: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; - public getRichAdminsForVo(vo: number, role: VoAdminRoles, specificAttributes: Array, allUserAttributes: boolean, onlyDirectAdmins: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getRichAdminsForVo.'); - } - if (role === null || role === undefined) { - throw new Error('Required parameter role was null or undefined when calling getRichAdminsForVo.'); - } - if (specificAttributes === null || specificAttributes === undefined) { - throw new Error('Required parameter specificAttributes was null or undefined when calling getRichAdminsForVo.'); - } - if (allUserAttributes === null || allUserAttributes === undefined) { - throw new Error('Required parameter allUserAttributes was null or undefined when calling getRichAdminsForVo.'); - } - if (onlyDirectAdmins === null || onlyDirectAdmins === undefined) { - throw new Error('Required parameter onlyDirectAdmins was null or undefined when calling getRichAdminsForVo.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (role !== undefined && role !== null) { - queryParameters = queryParameters.set('role', role); - } - if (specificAttributes) { - specificAttributes.forEach((element) => { - queryParameters = queryParameters.append('specificAttributes', element); - }) - } - if (allUserAttributes !== undefined && allUserAttributes !== null) { - queryParameters = queryParameters.set('allUserAttributes', allUserAttributes); - } - if (onlyDirectAdmins !== undefined && onlyDirectAdmins !== null) { - queryParameters = queryParameters.set('onlyDirectAdmins', onlyDirectAdmins); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/vosManager/getRichAdmins`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get list of administrator groups of the given VO. Supported roles: VOOBSERVER, TOPGROUPCREATOR, VOADMIN - * @param vo id of Vo - * @param role supported role name - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVoAdminGroups(vo: number, role: VoAdminRoles, observe?: 'body', reportProgress?: boolean): Observable>; - public getVoAdminGroups(vo: number, role: VoAdminRoles, observe?: 'response', reportProgress?: boolean): Observable>>; - public getVoAdminGroups(vo: number, role: VoAdminRoles, observe?: 'events', reportProgress?: boolean): Observable>>; - public getVoAdminGroups(vo: number, role: VoAdminRoles, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getVoAdminGroups.'); - } - if (role === null || role === undefined) { - throw new Error('Required parameter role was null or undefined when calling getVoAdminGroups.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (role !== undefined && role !== null) { - queryParameters = queryParameters.set('role', role); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/vosManager/getAdminGroups`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get list of all vo administrators for supported role and specific vo. If onlyDirectAdmins is true, return only direct admins of the vo for supported role. Otherwise return direct admins and users who are VALID members of administrator groups Supported roles: VOOBSERVER, TOPGROUPCREATOR, VOADMIN - * @param vo id of Vo - * @param role supported role name - * @param onlyDirectAdmins get only direct administrators (if false, get both direct and indirect) - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVoAdminUsers(vo: number, role: VoAdminRoles, onlyDirectAdmins: boolean, observe?: 'body', reportProgress?: boolean): Observable>; - public getVoAdminUsers(vo: number, role: VoAdminRoles, onlyDirectAdmins: boolean, observe?: 'response', reportProgress?: boolean): Observable>>; - public getVoAdminUsers(vo: number, role: VoAdminRoles, onlyDirectAdmins: boolean, observe?: 'events', reportProgress?: boolean): Observable>>; - public getVoAdminUsers(vo: number, role: VoAdminRoles, onlyDirectAdmins: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getVoAdminUsers.'); - } - if (role === null || role === undefined) { - throw new Error('Required parameter role was null or undefined when calling getVoAdminUsers.'); - } - if (onlyDirectAdmins === null || onlyDirectAdmins === undefined) { - throw new Error('Required parameter onlyDirectAdmins was null or undefined when calling getVoAdminUsers.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (role !== undefined && role !== null) { - queryParameters = queryParameters.set('role', role); - } - if (onlyDirectAdmins !== undefined && onlyDirectAdmins !== null) { - queryParameters = queryParameters.set('onlyDirectAdmins', onlyDirectAdmins); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/vosManager/getAdmins`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get vo ban with given id. - * @param banId id of a ban - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVoBanById(banId: number, observe?: 'body', reportProgress?: boolean): Observable; - public getVoBanById(banId: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getVoBanById(banId: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getVoBanById(banId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (banId === null || banId === undefined) { - throw new Error('Required parameter banId was null or undefined when calling getVoBanById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (banId !== undefined && banId !== null) { - queryParameters = queryParameters.set('banId', banId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/vosManager/getBanById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get ban for given member, or null if he is not banned. - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVoBanForMember(member: number, observe?: 'body', reportProgress?: boolean): Observable; - public getVoBanForMember(member: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getVoBanForMember(member: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getVoBanForMember(member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling getVoBanForMember.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/vosManager/getBanForMember`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get list of all bans for vo with given id. - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVoBansForVo(vo: number, observe?: 'body', reportProgress?: boolean): Observable>; - public getVoBansForVo(vo: number, observe?: 'response', reportProgress?: boolean): Observable>>; - public getVoBansForVo(vo: number, observe?: 'events', reportProgress?: boolean): Observable>>; - public getVoBansForVo(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getVoBansForVo.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/vosManager/getBansForVo`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns a virtual organization by id. - * @param id numeric id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVoById(id: number, observe?: 'body', reportProgress?: boolean): Observable; - public getVoById(id: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getVoById(id: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getVoById(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getVoById.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (id !== undefined && id !== null) { - queryParameters = queryParameters.set('id', id); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/vosManager/getVoById`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns a VO by its short name. - * @param shortName short name of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVoByShortName(shortName: string, observe?: 'body', reportProgress?: boolean): Observable; - public getVoByShortName(shortName: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getVoByShortName(shortName: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getVoByShortName(shortName: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (shortName === null || shortName === undefined) { - throw new Error('Required parameter shortName was null or undefined when calling getVoByShortName.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (shortName !== undefined && shortName !== null) { - queryParameters = queryParameters.set('shortName', shortName); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/vosManager/getVoByShortName`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns number of vo members by their status. - * @param vo id of Vo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVoMembersCountsByStatus(vo: number, observe?: 'body', reportProgress?: boolean): Observable<{ [key: string]: number; }>; - public getVoMembersCountsByStatus(vo: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getVoMembersCountsByStatus(vo: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getVoMembersCountsByStatus(vo: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling getVoMembersCountsByStatus.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}/json/vosManager/getVoMembersCountsByStatus`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Return list of VOs by their ids. - * @param ids list of ids List<Integer> - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVosByIds(ids: Array, observe?: 'body', reportProgress?: boolean): Observable>; - public getVosByIds(ids: Array, observe?: 'response', reportProgress?: boolean): Observable>>; - public getVosByIds(ids: Array, observe?: 'events', reportProgress?: boolean): Observable>>; - public getVosByIds(ids: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (ids === null || ids === undefined) { - throw new Error('Required parameter ids was null or undefined when calling getVosByIds.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (ids) { - ids.forEach((element) => { - queryParameters = queryParameters.append('ids[]', element); - }) - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get>(`${this.configuration.basePath}/json/vosManager/getVosByIds`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Gets count of all vos. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getVosCount(observe?: 'body', reportProgress?: boolean): Observable; - public getVosCount(observe?: 'response', reportProgress?: boolean): Observable>; - public getVosCount(observe?: 'events', reportProgress?: boolean): Observable>; - public getVosCount(observe: any = 'body', reportProgress: boolean = false ): Observable { - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.get(`${this.configuration.basePath}/json/vosManager/getVosCount`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Removes group as a sponsor. All group members will cease to be sponsors, and their sponsored members will be set as expired if the group member was their last sponsor. - * @param vo id of Vo - * @param authorizedGroup Group id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeSponsorRoleFromGroup(vo: number, authorizedGroup: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeSponsorRoleFromGroup(vo: number, authorizedGroup: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeSponsorRoleFromGroup(vo: number, authorizedGroup: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeSponsorRoleFromGroup(vo: number, authorizedGroup: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling removeSponsorRoleFromGroup.'); - } - if (authorizedGroup === null || authorizedGroup === undefined) { - throw new Error('Required parameter authorizedGroup was null or undefined when calling removeSponsorRoleFromGroup.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (authorizedGroup !== undefined && authorizedGroup !== null) { - queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/vosManager/removeSponsorRole/group`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Removes user as a sponsor. His or her sponsored members will be set as expired if the user was their last sponsor. - * @param vo id of Vo - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeSponsorRoleFromUser(vo: number, user: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeSponsorRoleFromUser(vo: number, user: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeSponsorRoleFromUser(vo: number, user: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeSponsorRoleFromUser(vo: number, user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling removeSponsorRoleFromUser.'); - } - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling removeSponsorRoleFromUser.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/vosManager/removeSponsorRole/user`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Removes a group as a Vo admin. - * @param vo id of Vo - * @param authorizedGroup Group id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeVoAdminGroup(vo: number, authorizedGroup: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeVoAdminGroup(vo: number, authorizedGroup: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeVoAdminGroup(vo: number, authorizedGroup: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeVoAdminGroup(vo: number, authorizedGroup: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling removeVoAdminGroup.'); - } - if (authorizedGroup === null || authorizedGroup === undefined) { - throw new Error('Required parameter authorizedGroup was null or undefined when calling removeVoAdminGroup.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (authorizedGroup !== undefined && authorizedGroup !== null) { - queryParameters = queryParameters.set('authorizedGroup', authorizedGroup); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/vosManager/removeAdmin/group`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Removes a user as a Vo admin. - * @param vo id of Vo - * @param user id of User - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeVoAdminUser(vo: number, user: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeVoAdminUser(vo: number, user: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeVoAdminUser(vo: number, user: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeVoAdminUser(vo: number, user: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (vo === null || vo === undefined) { - throw new Error('Required parameter vo was null or undefined when calling removeVoAdminUser.'); - } - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling removeVoAdminUser.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (vo !== undefined && vo !== null) { - queryParameters = queryParameters.set('vo', vo); - } - if (user !== undefined && user !== null) { - queryParameters = queryParameters.set('user', user); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/vosManager/removeAdmin/user`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove vo ban with given id. - * @param banId id of a ban - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeVoBan(banId: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeVoBan(banId: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeVoBan(banId: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeVoBan(banId: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (banId === null || banId === undefined) { - throw new Error('Required parameter banId was null or undefined when calling removeVoBan.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (banId !== undefined && banId !== null) { - queryParameters = queryParameters.set('banId', banId); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/vosManager/removeBan`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Remove vo ban for member with given id. - * @param member id of Member - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removeVoBanForMember(member: number, observe?: 'body', reportProgress?: boolean): Observable; - public removeVoBanForMember(member: number, observe?: 'response', reportProgress?: boolean): Observable>; - public removeVoBanForMember(member: number, observe?: 'events', reportProgress?: boolean): Observable>; - public removeVoBanForMember(member: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (member === null || member === undefined) { - throw new Error('Required parameter member was null or undefined when calling removeVoBanForMember.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (member !== undefined && member !== null) { - queryParameters = queryParameters.set('member', member); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - return this.httpClient.post(`${this.configuration.basePath}/urlinjsonout/vosManager/removeBanForMember`, - null, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Set ban for member on his vo. The member id is required, validityTo and description are optional. voId is ignored. - * @param inputSetVoBan - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public setVoBan(inputSetVoBan: InputSetVoBan, observe?: 'body', reportProgress?: boolean): Observable; - public setVoBan(inputSetVoBan: InputSetVoBan, observe?: 'response', reportProgress?: boolean): Observable>; - public setVoBan(inputSetVoBan: InputSetVoBan, observe?: 'events', reportProgress?: boolean): Observable>; - public setVoBan(inputSetVoBan: InputSetVoBan, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputSetVoBan === null || inputSetVoBan === undefined) { - throw new Error('Required parameter inputSetVoBan was null or undefined when calling setVoBan.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/vosManager/setBan`, - inputSetVoBan, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Updates a VO. Only name parameter is updated. VO to updated is determined by id parameter of passed VO object. - * @param inputUpdateVo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateVo(inputUpdateVo: InputUpdateVo, observe?: 'body', reportProgress?: boolean): Observable; - public updateVo(inputUpdateVo: InputUpdateVo, observe?: 'response', reportProgress?: boolean): Observable>; - public updateVo(inputUpdateVo: InputUpdateVo, observe?: 'events', reportProgress?: boolean): Observable>; - public updateVo(inputUpdateVo: InputUpdateVo, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (inputUpdateVo === null || inputUpdateVo === undefined) { - throw new Error('Required parameter inputUpdateVo was null or undefined when calling updateVo.'); - } - - let headers = this.defaultHeaders; - - // authentication (ApiKeyAuth) required - if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) { - headers = headers.set('Authorization', this.configuration.apiKeys["Authorization"]); - } - - // authentication (BasicAuth) required - if (this.configuration.username || this.configuration.password) { - headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); - } - // authentication (BearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.post(`${this.configuration.basePath}/json/vosManager/updateVo`, - inputUpdateVo, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); } + return this.httpClient.post( + `${this.configuration.basePath}/json/vosManager/updateVo`, + inputUpdateVo, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress, + } + ); + } } diff --git a/libs/perun/openapi/src/lib/configuration.ts b/libs/perun/openapi/src/lib/configuration.ts index c038bbc94..5524d7849 100644 --- a/libs/perun/openapi/src/lib/configuration.ts +++ b/libs/perun/openapi/src/lib/configuration.ts @@ -1,84 +1,89 @@ import { HttpParameterCodec } from '@angular/common/http'; export interface ConfigurationParameters { - apiKeys?: {[ key: string ]: string}; - username?: string; - password?: string; - accessToken?: string | (() => string); - basePath?: string; - withCredentials?: boolean; - encoder?: HttpParameterCodec; + apiKeys?: { [key: string]: string }; + username?: string; + password?: string; + accessToken?: string | (() => string); + basePath?: string; + withCredentials?: boolean; + encoder?: HttpParameterCodec; } export class Configuration { - apiKeys?: {[ key: string ]: string}; - username?: string; - password?: string; - accessToken?: string | (() => string); - basePath?: string; - withCredentials?: boolean; - encoder?: HttpParameterCodec; + apiKeys?: { [key: string]: string }; + username?: string; + password?: string; + accessToken?: string | (() => string); + basePath?: string; + withCredentials?: boolean; + encoder?: HttpParameterCodec; - constructor(configurationParameters: ConfigurationParameters = {}) { - this.apiKeys = configurationParameters.apiKeys; - this.username = configurationParameters.username; - this.password = configurationParameters.password; - this.accessToken = configurationParameters.accessToken; - this.basePath = configurationParameters.basePath; - this.withCredentials = configurationParameters.withCredentials; - this.encoder = configurationParameters.encoder; - } - - /** - * Select the correct content-type to use for a request. - * Uses {@link Configuration#isJsonMime} to determine the correct content-type. - * If no content type is found return the first found type if the contentTypes is not empty - * @param contentTypes - the array of content types that are available for selection - * @returns the selected content-type or undefined if no selection could be made. - */ - public selectHeaderContentType (contentTypes: string[]): string | undefined { - if (contentTypes.length === 0) { - return undefined; - } + constructor(configurationParameters: ConfigurationParameters = {}) { + this.apiKeys = configurationParameters.apiKeys; + this.username = configurationParameters.username; + this.password = configurationParameters.password; + this.accessToken = configurationParameters.accessToken; + this.basePath = configurationParameters.basePath; + this.withCredentials = configurationParameters.withCredentials; + this.encoder = configurationParameters.encoder; + } - const type = contentTypes.find((x: string) => this.isJsonMime(x)); - if (type === undefined) { - return contentTypes[0]; - } - return type; + /** + * Select the correct content-type to use for a request. + * Uses {@link Configuration#isJsonMime} to determine the correct content-type. + * If no content type is found return the first found type if the contentTypes is not empty + * @param contentTypes - the array of content types that are available for selection + * @returns the selected content-type or undefined if no selection could be made. + */ + public selectHeaderContentType(contentTypes: string[]): string | undefined { + if (contentTypes.length === 0) { + return undefined; } - /** - * Select the correct accept content-type to use for a request. - * Uses {@link Configuration#isJsonMime} to determine the correct accept content-type. - * If no content type is found return the first found type if the contentTypes is not empty - * @param accepts - the array of content types that are available for selection. - * @returns the selected content-type or undefined if no selection could be made. - */ - public selectHeaderAccept(accepts: string[]): string | undefined { - if (accepts.length === 0) { - return undefined; - } + const type = contentTypes.find((x: string) => this.isJsonMime(x)); + if (type === undefined) { + return contentTypes[0]; + } + return type; + } - const type = accepts.find((x: string) => this.isJsonMime(x)); - if (type === undefined) { - return accepts[0]; - } - return type; + /** + * Select the correct accept content-type to use for a request. + * Uses {@link Configuration#isJsonMime} to determine the correct accept content-type. + * If no content type is found return the first found type if the contentTypes is not empty + * @param accepts - the array of content types that are available for selection. + * @returns the selected content-type or undefined if no selection could be made. + */ + public selectHeaderAccept(accepts: string[]): string | undefined { + if (accepts.length === 0) { + return undefined; } - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + const type = accepts.find((x: string) => this.isJsonMime(x)); + if (type === undefined) { + return accepts[0]; } + return type; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp( + '^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$', + 'i' + ); + return ( + mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json') + ); + } } diff --git a/libs/perun/openapi/src/lib/encoder.ts b/libs/perun/openapi/src/lib/encoder.ts index cbefb4a6d..889ef00dd 100644 --- a/libs/perun/openapi/src/lib/encoder.ts +++ b/libs/perun/openapi/src/lib/encoder.ts @@ -5,17 +5,16 @@ import { HttpParameterCodec } from '@angular/common/http'; * Workaround for https://github.com/angular/angular/issues/18261 */ export class CustomHttpParameterCodec implements HttpParameterCodec { - encodeKey(k: string): string { - return encodeURIComponent(k); - } - encodeValue(v: string): string { - return encodeURIComponent(v); - } - decodeKey(k: string): string { - return decodeURIComponent(k); - } - decodeValue(v: string): string { - return decodeURIComponent(v); - } + encodeKey(k: string): string { + return encodeURIComponent(k); + } + encodeValue(v: string): string { + return encodeURIComponent(v); + } + decodeKey(k: string): string { + return decodeURIComponent(k); + } + decodeValue(v: string): string { + return decodeURIComponent(v); + } } - diff --git a/libs/perun/openapi/src/lib/index.ts b/libs/perun/openapi/src/lib/index.ts index c312b70fa..410623f1c 100644 --- a/libs/perun/openapi/src/lib/index.ts +++ b/libs/perun/openapi/src/lib/index.ts @@ -2,4 +2,4 @@ export * from './api/api'; export * from './model/models'; export * from './variables'; export * from './configuration'; -export * from './api.module'; \ No newline at end of file +export * from './api.module'; diff --git a/libs/perun/openapi/src/lib/model/actionType.ts b/libs/perun/openapi/src/lib/model/actionType.ts index df486e768..7de98752a 100644 --- a/libs/perun/openapi/src/lib/model/actionType.ts +++ b/libs/perun/openapi/src/lib/model/actionType.ts @@ -10,18 +10,16 @@ * Do not edit the class manually. */ - /** * Action types for attributes. */ export type ActionType = 'WRITE' | 'WRITE_VO' | 'WRITE_PUBLIC' | 'READ' | 'READ_VO' | 'READ_PUBLIC'; export const ActionType = { - WRITE: 'WRITE' as ActionType, - WRITEVO: 'WRITE_VO' as ActionType, - WRITEPUBLIC: 'WRITE_PUBLIC' as ActionType, - READ: 'READ' as ActionType, - READVO: 'READ_VO' as ActionType, - READPUBLIC: 'READ_PUBLIC' as ActionType + WRITE: 'WRITE' as ActionType, + WRITEVO: 'WRITE_VO' as ActionType, + WRITEPUBLIC: 'WRITE_PUBLIC' as ActionType, + READ: 'READ' as ActionType, + READVO: 'READ_VO' as ActionType, + READPUBLIC: 'READ_PUBLIC' as ActionType, }; - diff --git a/libs/perun/openapi/src/lib/model/addUserExtSourceInput.ts b/libs/perun/openapi/src/lib/model/addUserExtSourceInput.ts index 1478d73a2..af7caab3c 100644 --- a/libs/perun/openapi/src/lib/model/addUserExtSourceInput.ts +++ b/libs/perun/openapi/src/lib/model/addUserExtSourceInput.ts @@ -11,12 +11,10 @@ */ import { UserExtSource } from './userExtSource'; - /** * input to addUserExtSource */ -export interface AddUserExtSourceInput { - user: number; - userExtSource: UserExtSource; +export interface AddUserExtSourceInput { + user: number; + userExtSource: UserExtSource; } - diff --git a/libs/perun/openapi/src/lib/model/appState.ts b/libs/perun/openapi/src/lib/model/appState.ts index a7e5d87db..78507cd5c 100644 --- a/libs/perun/openapi/src/lib/model/appState.ts +++ b/libs/perun/openapi/src/lib/model/appState.ts @@ -10,13 +10,11 @@ * Do not edit the class manually. */ - export type AppState = 'NEW' | 'VERIFIED' | 'APPROVED' | 'REJECTED'; export const AppState = { - NEW: 'NEW' as AppState, - VERIFIED: 'VERIFIED' as AppState, - APPROVED: 'APPROVED' as AppState, - REJECTED: 'REJECTED' as AppState + NEW: 'NEW' as AppState, + VERIFIED: 'VERIFIED' as AppState, + APPROVED: 'APPROVED' as AppState, + REJECTED: 'REJECTED' as AppState, }; - diff --git a/libs/perun/openapi/src/lib/model/appType.ts b/libs/perun/openapi/src/lib/model/appType.ts index 6c8140906..2c30ab3d1 100644 --- a/libs/perun/openapi/src/lib/model/appType.ts +++ b/libs/perun/openapi/src/lib/model/appType.ts @@ -10,12 +10,10 @@ * Do not edit the class manually. */ - export type AppType = 'INITIAL' | 'EXTENSION' | 'EMBEDDED'; export const AppType = { - INITIAL: 'INITIAL' as AppType, - EXTENSION: 'EXTENSION' as AppType, - EMBEDDED: 'EMBEDDED' as AppType + INITIAL: 'INITIAL' as AppType, + EXTENSION: 'EXTENSION' as AppType, + EMBEDDED: 'EMBEDDED' as AppType, }; - diff --git a/libs/perun/openapi/src/lib/model/application.ts b/libs/perun/openapi/src/lib/model/application.ts index ef7c3e001..7f92498b0 100644 --- a/libs/perun/openapi/src/lib/model/application.ts +++ b/libs/perun/openapi/src/lib/model/application.ts @@ -15,21 +15,19 @@ import { Vo } from './vo'; import { AppState } from './appState'; import { AppType } from './appType'; - -export interface Application { - id?: number; - vo?: Vo; - group?: Group; - type?: AppType; - fedInfo?: string; - state?: AppState; - extSourceName?: string; - extSourceType?: string; - extSourceLoa?: number; - user?: User; - createdBy?: string; - createdAt?: string; - modifiedBy?: string; - modifiedAt?: string; +export interface Application { + id?: number; + vo?: Vo; + group?: Group; + type?: AppType; + fedInfo?: string; + state?: AppState; + extSourceName?: string; + extSourceType?: string; + extSourceLoa?: number; + user?: User; + createdBy?: string; + createdAt?: string; + modifiedBy?: string; + modifiedAt?: string; } - diff --git a/libs/perun/openapi/src/lib/model/applicationForm.ts b/libs/perun/openapi/src/lib/model/applicationForm.ts index 2663b1089..ba637e7c4 100644 --- a/libs/perun/openapi/src/lib/model/applicationForm.ts +++ b/libs/perun/openapi/src/lib/model/applicationForm.ts @@ -12,14 +12,12 @@ import { Group } from './group'; import { Vo } from './vo'; - -export interface ApplicationForm { - id?: number; - vo?: Vo; - group?: Group; - automaticApproval?: boolean; - automaticApprovalExtension?: boolean; - automaticApprovalEmbedded?: boolean; - moduleClassName?: string; +export interface ApplicationForm { + id?: number; + vo?: Vo; + group?: Group; + automaticApproval?: boolean; + automaticApprovalExtension?: boolean; + automaticApprovalEmbedded?: boolean; + moduleClassName?: string; } - diff --git a/libs/perun/openapi/src/lib/model/applicationFormItem.ts b/libs/perun/openapi/src/lib/model/applicationFormItem.ts index d22fd7017..077965df8 100644 --- a/libs/perun/openapi/src/lib/model/applicationFormItem.ts +++ b/libs/perun/openapi/src/lib/model/applicationFormItem.ts @@ -13,41 +13,38 @@ import { ItemTexts } from './itemTexts'; import { Type } from './type'; import { AppType } from './appType'; - -export interface ApplicationFormItem { - id?: number; - shortname?: string; - required?: boolean; - updatable?: boolean; - type?: Type; - federationAttribute?: string; - perunSourceAttribute?: string; - perunDestinationAttribute?: string; - regex?: string; - applicationTypes?: Array; - ordnum?: number; - i18n?: { [key: string]: ItemTexts; }; - hiddenDependencyItemId?: number; - disabledDependencyItemId?: number; - hidden?: ApplicationFormItem.HiddenEnum; - disabled?: ApplicationFormItem.DisabledEnum; - forDelete?: boolean; +export interface ApplicationFormItem { + id?: number; + shortname?: string; + required?: boolean; + updatable?: boolean; + type?: Type; + federationAttribute?: string; + perunSourceAttribute?: string; + perunDestinationAttribute?: string; + regex?: string; + applicationTypes?: Array; + ordnum?: number; + i18n?: { [key: string]: ItemTexts }; + hiddenDependencyItemId?: number; + disabledDependencyItemId?: number; + hidden?: ApplicationFormItem.HiddenEnum; + disabled?: ApplicationFormItem.DisabledEnum; + forDelete?: boolean; } export namespace ApplicationFormItem { - export type HiddenEnum = 'NEVER' | 'ALWAYS' | 'IF_PREFILLED' | 'IF_EMPTY'; - export const HiddenEnum = { - NEVER: 'NEVER' as HiddenEnum, - ALWAYS: 'ALWAYS' as HiddenEnum, - IFPREFILLED: 'IF_PREFILLED' as HiddenEnum, - IFEMPTY: 'IF_EMPTY' as HiddenEnum - }; - export type DisabledEnum = 'NEVER' | 'ALWAYS' | 'IF_PREFILLED' | 'IF_EMPTY'; - export const DisabledEnum = { - NEVER: 'NEVER' as DisabledEnum, - ALWAYS: 'ALWAYS' as DisabledEnum, - IFPREFILLED: 'IF_PREFILLED' as DisabledEnum, - IFEMPTY: 'IF_EMPTY' as DisabledEnum - }; + export type HiddenEnum = 'NEVER' | 'ALWAYS' | 'IF_PREFILLED' | 'IF_EMPTY'; + export const HiddenEnum = { + NEVER: 'NEVER' as HiddenEnum, + ALWAYS: 'ALWAYS' as HiddenEnum, + IFPREFILLED: 'IF_PREFILLED' as HiddenEnum, + IFEMPTY: 'IF_EMPTY' as HiddenEnum, + }; + export type DisabledEnum = 'NEVER' | 'ALWAYS' | 'IF_PREFILLED' | 'IF_EMPTY'; + export const DisabledEnum = { + NEVER: 'NEVER' as DisabledEnum, + ALWAYS: 'ALWAYS' as DisabledEnum, + IFPREFILLED: 'IF_PREFILLED' as DisabledEnum, + IFEMPTY: 'IF_EMPTY' as DisabledEnum, + }; } - - diff --git a/libs/perun/openapi/src/lib/model/applicationFormItemData.ts b/libs/perun/openapi/src/lib/model/applicationFormItemData.ts index 035f17e3e..fc8e3f9b9 100644 --- a/libs/perun/openapi/src/lib/model/applicationFormItemData.ts +++ b/libs/perun/openapi/src/lib/model/applicationFormItemData.ts @@ -11,13 +11,11 @@ */ import { ApplicationFormItem } from './applicationFormItem'; - -export interface ApplicationFormItemData { - id?: number; - formItem?: ApplicationFormItem; - shortname?: string; - value?: string; - assuranceLevel?: string; - prefilledValue?: string; +export interface ApplicationFormItemData { + id?: number; + formItem?: ApplicationFormItem; + shortname?: string; + value?: string; + assuranceLevel?: string; + prefilledValue?: string; } - diff --git a/libs/perun/openapi/src/lib/model/applicationMail.ts b/libs/perun/openapi/src/lib/model/applicationMail.ts index 4a31ba989..7de4d710a 100644 --- a/libs/perun/openapi/src/lib/model/applicationMail.ts +++ b/libs/perun/openapi/src/lib/model/applicationMail.ts @@ -13,13 +13,11 @@ import { MailText } from './mailText'; import { MailType } from './mailType'; import { AppType } from './appType'; - -export interface ApplicationMail { - id?: number; - appType?: AppType; - formId?: number; - mailType?: MailType; - send?: boolean; - message?: { [key: string]: MailText; }; +export interface ApplicationMail { + id?: number; + appType?: AppType; + formId?: number; + mailType?: MailType; + send?: boolean; + message?: { [key: string]: MailText }; } - diff --git a/libs/perun/openapi/src/lib/model/applicationsOrderColumn.ts b/libs/perun/openapi/src/lib/model/applicationsOrderColumn.ts index 185c3ff06..9f53c23b0 100644 --- a/libs/perun/openapi/src/lib/model/applicationsOrderColumn.ts +++ b/libs/perun/openapi/src/lib/model/applicationsOrderColumn.ts @@ -10,16 +10,21 @@ * Do not edit the class manually. */ - -export type ApplicationsOrderColumn = 'ID' | 'DATE_CREATED' | 'TYPE' | 'STATE' | 'SUBMITTER' | 'GROUP_NAME' | 'MODIFIED_BY'; +export type ApplicationsOrderColumn = + | 'ID' + | 'DATE_CREATED' + | 'TYPE' + | 'STATE' + | 'SUBMITTER' + | 'GROUP_NAME' + | 'MODIFIED_BY'; export const ApplicationsOrderColumn = { - ID: 'ID' as ApplicationsOrderColumn, - DATECREATED: 'DATE_CREATED' as ApplicationsOrderColumn, - TYPE: 'TYPE' as ApplicationsOrderColumn, - STATE: 'STATE' as ApplicationsOrderColumn, - SUBMITTER: 'SUBMITTER' as ApplicationsOrderColumn, - GROUPNAME: 'GROUP_NAME' as ApplicationsOrderColumn, - MODIFIEDBY: 'MODIFIED_BY' as ApplicationsOrderColumn + ID: 'ID' as ApplicationsOrderColumn, + DATECREATED: 'DATE_CREATED' as ApplicationsOrderColumn, + TYPE: 'TYPE' as ApplicationsOrderColumn, + STATE: 'STATE' as ApplicationsOrderColumn, + SUBMITTER: 'SUBMITTER' as ApplicationsOrderColumn, + GROUPNAME: 'GROUP_NAME' as ApplicationsOrderColumn, + MODIFIEDBY: 'MODIFIED_BY' as ApplicationsOrderColumn, }; - diff --git a/libs/perun/openapi/src/lib/model/applicationsPageQuery.ts b/libs/perun/openapi/src/lib/model/applicationsPageQuery.ts index b33003e73..23ddf2a10 100644 --- a/libs/perun/openapi/src/lib/model/applicationsPageQuery.ts +++ b/libs/perun/openapi/src/lib/model/applicationsPageQuery.ts @@ -13,19 +13,17 @@ import { ApplicationsOrderColumn } from './applicationsOrderColumn'; import { SortingOrder } from './sortingOrder'; import { AppState } from './appState'; - -export interface ApplicationsPageQuery { - pageSize: number; - offset: number; - order: SortingOrder; - sortColumn: ApplicationsOrderColumn; - searchString?: string; - includeGroupApplications?: boolean; - getDetails?: boolean; - states?: Array; - dateFrom?: string; - dateTo?: string; - userId?: number; - groupId?: number; +export interface ApplicationsPageQuery { + pageSize: number; + offset: number; + order: SortingOrder; + sortColumn: ApplicationsOrderColumn; + searchString?: string; + includeGroupApplications?: boolean; + getDetails?: boolean; + states?: Array; + dateFrom?: string; + dateTo?: string; + userId?: number; + groupId?: number; } - diff --git a/libs/perun/openapi/src/lib/model/assignedGroup.ts b/libs/perun/openapi/src/lib/model/assignedGroup.ts index 38cf3ebc7..bb4bdb908 100644 --- a/libs/perun/openapi/src/lib/model/assignedGroup.ts +++ b/libs/perun/openapi/src/lib/model/assignedGroup.ts @@ -12,12 +12,10 @@ import { EnrichedGroup } from './enrichedGroup'; import { GroupResourceStatus } from './groupResourceStatus'; - -export interface AssignedGroup { - enrichedGroup?: EnrichedGroup; - status?: GroupResourceStatus; - sourceGroupId?: number; - failureCause?: string; - autoAssignSubgroups?: boolean; +export interface AssignedGroup { + enrichedGroup?: EnrichedGroup; + status?: GroupResourceStatus; + sourceGroupId?: number; + failureCause?: string; + autoAssignSubgroups?: boolean; } - diff --git a/libs/perun/openapi/src/lib/model/assignedMember.ts b/libs/perun/openapi/src/lib/model/assignedMember.ts index f784c513b..34b0f20df 100644 --- a/libs/perun/openapi/src/lib/model/assignedMember.ts +++ b/libs/perun/openapi/src/lib/model/assignedMember.ts @@ -12,9 +12,7 @@ import { RichMember } from './richMember'; import { GroupResourceStatus } from './groupResourceStatus'; - -export interface AssignedMember { - richMember?: RichMember; - status?: GroupResourceStatus; +export interface AssignedMember { + richMember?: RichMember; + status?: GroupResourceStatus; } - diff --git a/libs/perun/openapi/src/lib/model/assignedResource.ts b/libs/perun/openapi/src/lib/model/assignedResource.ts index 805a9f530..6fda91edf 100644 --- a/libs/perun/openapi/src/lib/model/assignedResource.ts +++ b/libs/perun/openapi/src/lib/model/assignedResource.ts @@ -14,14 +14,12 @@ import { ResourceTag } from './resourceTag'; import { Facility } from './facility'; import { GroupResourceStatus } from './groupResourceStatus'; - -export interface AssignedResource { - enrichedResource?: EnrichedResource; - status?: GroupResourceStatus; - sourceGroupId?: number; - failureCause?: string; - facility?: Facility; - resourceTags?: Array; - autoAssignSubgroups?: boolean; +export interface AssignedResource { + enrichedResource?: EnrichedResource; + status?: GroupResourceStatus; + sourceGroupId?: number; + failureCause?: string; + facility?: Facility; + resourceTags?: Array; + autoAssignSubgroups?: boolean; } - diff --git a/libs/perun/openapi/src/lib/model/attribute.ts b/libs/perun/openapi/src/lib/model/attribute.ts index 5c68c003c..d3c21a569 100644 --- a/libs/perun/openapi/src/lib/model/attribute.ts +++ b/libs/perun/openapi/src/lib/model/attribute.ts @@ -11,12 +11,10 @@ */ import { AttributeDefinition } from './attributeDefinition'; - -export interface Attribute extends AttributeDefinition { - valueCreatedAt?: string | null; - valueCreatedBy?: string | null; - valueModifiedAt?: string | null; - valueModifiedBy?: string | null; - value?: object; +export interface Attribute extends AttributeDefinition { + valueCreatedAt?: string | null; + valueCreatedBy?: string | null; + valueModifiedAt?: string | null; + valueModifiedBy?: string | null; + value?: object; } - diff --git a/libs/perun/openapi/src/lib/model/attributeAction.ts b/libs/perun/openapi/src/lib/model/attributeAction.ts index 416a20a97..0daa33114 100644 --- a/libs/perun/openapi/src/lib/model/attributeAction.ts +++ b/libs/perun/openapi/src/lib/model/attributeAction.ts @@ -10,14 +10,12 @@ * Do not edit the class manually. */ - /** * Represents types of actions that users can perform upon attributes. */ export type AttributeAction = 'WRITE' | 'READ'; export const AttributeAction = { - WRITE: 'WRITE' as AttributeAction, - READ: 'READ' as AttributeAction + WRITE: 'WRITE' as AttributeAction, + READ: 'READ' as AttributeAction, }; - diff --git a/libs/perun/openapi/src/lib/model/attributeDefinition.ts b/libs/perun/openapi/src/lib/model/attributeDefinition.ts index 50f8817a6..e849b9617 100644 --- a/libs/perun/openapi/src/lib/model/attributeDefinition.ts +++ b/libs/perun/openapi/src/lib/model/attributeDefinition.ts @@ -11,17 +11,15 @@ */ import { Auditable } from './auditable'; - -export interface AttributeDefinition extends Auditable { - friendlyName?: string; - namespace?: string; - description?: string | null; - type?: string; - displayName?: string; - writable?: boolean; - unique?: boolean; - readonly friendlyNameParameter?: string; - readonly baseFriendlyName?: string; - readonly entity?: string; +export interface AttributeDefinition extends Auditable { + friendlyName?: string; + namespace?: string; + description?: string | null; + type?: string; + displayName?: string; + writable?: boolean; + unique?: boolean; + readonly friendlyNameParameter?: string; + readonly baseFriendlyName?: string; + readonly entity?: string; } - diff --git a/libs/perun/openapi/src/lib/model/attributePolicy.ts b/libs/perun/openapi/src/lib/model/attributePolicy.ts index 5c5e20a52..0ca5e9440 100644 --- a/libs/perun/openapi/src/lib/model/attributePolicy.ts +++ b/libs/perun/openapi/src/lib/model/attributePolicy.ts @@ -11,11 +11,9 @@ */ import { RoleObject } from './roleObject'; - -export interface AttributePolicy { - id: number; - role: string; - object: RoleObject; - policyCollectionId: number; +export interface AttributePolicy { + id: number; + role: string; + object: RoleObject; + policyCollectionId: number; } - diff --git a/libs/perun/openapi/src/lib/model/attributePolicyCollection.ts b/libs/perun/openapi/src/lib/model/attributePolicyCollection.ts index 7127137aa..ecbde2b3b 100644 --- a/libs/perun/openapi/src/lib/model/attributePolicyCollection.ts +++ b/libs/perun/openapi/src/lib/model/attributePolicyCollection.ts @@ -12,11 +12,9 @@ import { AttributeAction } from './attributeAction'; import { AttributePolicy } from './attributePolicy'; - -export interface AttributePolicyCollection { - id: number; - attributeId: number; - action: AttributeAction; - policies: Array; +export interface AttributePolicyCollection { + id: number; + attributeId: number; + action: AttributeAction; + policies: Array; } - diff --git a/libs/perun/openapi/src/lib/model/attributeRights.ts b/libs/perun/openapi/src/lib/model/attributeRights.ts index e5f367df4..abf5ae70a 100644 --- a/libs/perun/openapi/src/lib/model/attributeRights.ts +++ b/libs/perun/openapi/src/lib/model/attributeRights.ts @@ -11,10 +11,8 @@ */ import { ActionType } from './actionType'; - -export interface AttributeRights { - attributeId: number; - role: string; - rights: Array; +export interface AttributeRights { + attributeId: number; + role: string; + rights: Array; } - diff --git a/libs/perun/openapi/src/lib/model/auditEvent.ts b/libs/perun/openapi/src/lib/model/auditEvent.ts index 9370908e1..2e93690bf 100644 --- a/libs/perun/openapi/src/lib/model/auditEvent.ts +++ b/libs/perun/openapi/src/lib/model/auditEvent.ts @@ -20,21 +20,19 @@ import { ExtSource } from './extSource'; import { Facility } from './facility'; import { Member } from './member'; - -export interface AuditEvent { - attribute?: AttributeDefinition; - extSource?: ExtSource; - source?: ExtSource; - facility?: Facility; - group?: Group; - parentGroup?: Group; - member?: Member; - resource?: Resource; - service?: Service; - user?: User; - userExtSource?: UserExtSource; - vo?: Vo; - name?: string; - message?: string; +export interface AuditEvent { + attribute?: AttributeDefinition; + extSource?: ExtSource; + source?: ExtSource; + facility?: Facility; + group?: Group; + parentGroup?: Group; + member?: Member; + resource?: Resource; + service?: Service; + user?: User; + userExtSource?: UserExtSource; + vo?: Vo; + name?: string; + message?: string; } - diff --git a/libs/perun/openapi/src/lib/model/auditMessage.ts b/libs/perun/openapi/src/lib/model/auditMessage.ts index d3e1d6a54..0ec62e8f5 100644 --- a/libs/perun/openapi/src/lib/model/auditMessage.ts +++ b/libs/perun/openapi/src/lib/model/auditMessage.ts @@ -11,12 +11,10 @@ */ import { AuditEvent } from './auditEvent'; - -export interface AuditMessage { - event?: AuditEvent; - id?: number; - actor?: string; - createdAt?: string; - createdByUid?: number; +export interface AuditMessage { + event?: AuditEvent; + id?: number; + actor?: string; + createdAt?: string; + createdByUid?: number; } - diff --git a/libs/perun/openapi/src/lib/model/auditMessagesPageQuery.ts b/libs/perun/openapi/src/lib/model/auditMessagesPageQuery.ts index 30e799c30..da921e467 100644 --- a/libs/perun/openapi/src/lib/model/auditMessagesPageQuery.ts +++ b/libs/perun/openapi/src/lib/model/auditMessagesPageQuery.ts @@ -11,10 +11,8 @@ */ import { SortingOrder } from './sortingOrder'; - -export interface AuditMessagesPageQuery { - pageSize: number; - offset: number; - order: SortingOrder; +export interface AuditMessagesPageQuery { + pageSize: number; + offset: number; + order: SortingOrder; } - diff --git a/libs/perun/openapi/src/lib/model/auditable.ts b/libs/perun/openapi/src/lib/model/auditable.ts index e3a0bc0b9..6ff1a369c 100644 --- a/libs/perun/openapi/src/lib/model/auditable.ts +++ b/libs/perun/openapi/src/lib/model/auditable.ts @@ -11,13 +11,11 @@ */ import { PerunBean } from './perunBean'; - -export interface Auditable extends PerunBean { - createdAt?: string | null; - createdBy?: string | null; - modifiedAt?: string | null; - modifiedBy?: string | null; - createdByUid?: number | null; - modifiedByUid?: number | null; +export interface Auditable extends PerunBean { + createdAt?: string | null; + createdBy?: string | null; + modifiedAt?: string | null; + modifiedBy?: string | null; + createdByUid?: number | null; + modifiedByUid?: number | null; } - diff --git a/libs/perun/openapi/src/lib/model/author.ts b/libs/perun/openapi/src/lib/model/author.ts index 53a006d66..1dcc23994 100644 --- a/libs/perun/openapi/src/lib/model/author.ts +++ b/libs/perun/openapi/src/lib/model/author.ts @@ -13,14 +13,12 @@ import { PerunBean } from './perunBean'; import { Authorship } from './authorship'; import { Attribute } from './attribute'; - -export interface Author extends PerunBean { - firstName?: string; - lastName?: string; - middleName?: string; - titleBefore?: string; - titleAfter?: string; - attributes?: Array; - authorships?: Array; +export interface Author extends PerunBean { + firstName?: string; + lastName?: string; + middleName?: string; + titleBefore?: string; + titleAfter?: string; + attributes?: Array; + authorships?: Array; } - diff --git a/libs/perun/openapi/src/lib/model/authorship.ts b/libs/perun/openapi/src/lib/model/authorship.ts index a005370a6..5ef0693f9 100644 --- a/libs/perun/openapi/src/lib/model/authorship.ts +++ b/libs/perun/openapi/src/lib/model/authorship.ts @@ -11,12 +11,10 @@ */ import { PerunBean } from './perunBean'; - -export interface Authorship extends PerunBean { - publicationId?: number; - userId?: number; - createdBy?: string; - createdDate?: string; - createdByUid?: number; +export interface Authorship extends PerunBean { + publicationId?: number; + userId?: number; + createdBy?: string; + createdDate?: string; + createdByUid?: number; } - diff --git a/libs/perun/openapi/src/lib/model/ban.ts b/libs/perun/openapi/src/lib/model/ban.ts index 314cdb065..db3de919e 100644 --- a/libs/perun/openapi/src/lib/model/ban.ts +++ b/libs/perun/openapi/src/lib/model/ban.ts @@ -11,9 +11,7 @@ */ import { Auditable } from './auditable'; - -export interface Ban extends Auditable { - validityTo?: string; - description?: string; +export interface Ban extends Auditable { + validityTo?: string; + description?: string; } - diff --git a/libs/perun/openapi/src/lib/model/banOnFacility.ts b/libs/perun/openapi/src/lib/model/banOnFacility.ts index fdc66e737..4ba5b21f5 100644 --- a/libs/perun/openapi/src/lib/model/banOnFacility.ts +++ b/libs/perun/openapi/src/lib/model/banOnFacility.ts @@ -11,9 +11,7 @@ */ import { Ban } from './ban'; - -export interface BanOnFacility extends Ban { - userId?: number; - facilityId?: number; +export interface BanOnFacility extends Ban { + userId?: number; + facilityId?: number; } - diff --git a/libs/perun/openapi/src/lib/model/banOnResource.ts b/libs/perun/openapi/src/lib/model/banOnResource.ts index d0b9fe890..185b0f4cc 100644 --- a/libs/perun/openapi/src/lib/model/banOnResource.ts +++ b/libs/perun/openapi/src/lib/model/banOnResource.ts @@ -11,9 +11,7 @@ */ import { Ban } from './ban'; - -export interface BanOnResource extends Ban { - memberId?: number; - resourceId?: number; +export interface BanOnResource extends Ban { + memberId?: number; + resourceId?: number; } - diff --git a/libs/perun/openapi/src/lib/model/banOnVo.ts b/libs/perun/openapi/src/lib/model/banOnVo.ts index ecb6b0fb3..7dad589dc 100644 --- a/libs/perun/openapi/src/lib/model/banOnVo.ts +++ b/libs/perun/openapi/src/lib/model/banOnVo.ts @@ -11,9 +11,7 @@ */ import { Ban } from './ban'; - -export interface BanOnVo extends Ban { - memberId?: number; - voId?: number; +export interface BanOnVo extends Ban { + memberId?: number; + voId?: number; } - diff --git a/libs/perun/openapi/src/lib/model/brand.ts b/libs/perun/openapi/src/lib/model/brand.ts index 10ae8a6d9..3c4ee833e 100644 --- a/libs/perun/openapi/src/lib/model/brand.ts +++ b/libs/perun/openapi/src/lib/model/brand.ts @@ -11,10 +11,8 @@ */ import { NewApps } from './newApps'; - -export interface Brand { - name?: string; - oldGuiDomain?: string; - newApps?: NewApps; +export interface Brand { + name?: string; + oldGuiDomain?: string; + newApps?: NewApps; } - diff --git a/libs/perun/openapi/src/lib/model/candidate.ts b/libs/perun/openapi/src/lib/model/candidate.ts index 3ba487ecc..d7cbbe35e 100644 --- a/libs/perun/openapi/src/lib/model/candidate.ts +++ b/libs/perun/openapi/src/lib/model/candidate.ts @@ -12,10 +12,8 @@ import { User } from './user'; import { UserExtSource } from './userExtSource'; - -export interface Candidate extends User { - userExtSource?: UserExtSource; - additionalUserExtSources?: Array; - attributes?: { [key: string]: string; }; +export interface Candidate extends User { + userExtSource?: UserExtSource; + additionalUserExtSources?: Array; + attributes?: { [key: string]: string }; } - diff --git a/libs/perun/openapi/src/lib/model/category.ts b/libs/perun/openapi/src/lib/model/category.ts index 7e23b29bf..040080a50 100644 --- a/libs/perun/openapi/src/lib/model/category.ts +++ b/libs/perun/openapi/src/lib/model/category.ts @@ -11,9 +11,7 @@ */ import { PerunBean } from './perunBean'; - -export interface Category extends PerunBean { - name?: string; - rank?: number; +export interface Category extends PerunBean { + name?: string; + rank?: number; } - diff --git a/libs/perun/openapi/src/lib/model/destination.ts b/libs/perun/openapi/src/lib/model/destination.ts index 85bea099c..5c09aea7c 100644 --- a/libs/perun/openapi/src/lib/model/destination.ts +++ b/libs/perun/openapi/src/lib/model/destination.ts @@ -13,10 +13,8 @@ import { Auditable } from './auditable'; import { DestinationPropagationType } from './destinationPropagationType'; import { DestinationType } from './destinationType'; - -export interface Destination extends Auditable { - destination?: string; - type?: DestinationType; - propagationType?: DestinationPropagationType; +export interface Destination extends Auditable { + destination?: string; + type?: DestinationType; + propagationType?: DestinationPropagationType; } - diff --git a/libs/perun/openapi/src/lib/model/destinationPropagationType.ts b/libs/perun/openapi/src/lib/model/destinationPropagationType.ts index 2e07b3be8..5c6de770f 100644 --- a/libs/perun/openapi/src/lib/model/destinationPropagationType.ts +++ b/libs/perun/openapi/src/lib/model/destinationPropagationType.ts @@ -10,15 +10,13 @@ * Do not edit the class manually. */ - /** * type of propagation of service settings to a destination */ export type DestinationPropagationType = 'PARALLEL' | 'SERIAL' | 'DUMMY'; export const DestinationPropagationType = { - PARALLEL: 'PARALLEL' as DestinationPropagationType, - SERIAL: 'SERIAL' as DestinationPropagationType, - DUMMY: 'DUMMY' as DestinationPropagationType + PARALLEL: 'PARALLEL' as DestinationPropagationType, + SERIAL: 'SERIAL' as DestinationPropagationType, + DUMMY: 'DUMMY' as DestinationPropagationType, }; - diff --git a/libs/perun/openapi/src/lib/model/destinationType.ts b/libs/perun/openapi/src/lib/model/destinationType.ts index 9b680a48b..fccbeffe3 100644 --- a/libs/perun/openapi/src/lib/model/destinationType.ts +++ b/libs/perun/openapi/src/lib/model/destinationType.ts @@ -10,21 +10,28 @@ * Do not edit the class manually. */ - /** * type of destination, i.e. way of delivery of service settings */ -export type DestinationType = 'host' | 'email' | 'semail' | 'url' | 'user@host' | 'user@host:port' | 'service-specific' | 'user@host-windows' | 'host-windows-proxy'; +export type DestinationType = + | 'host' + | 'email' + | 'semail' + | 'url' + | 'user@host' + | 'user@host:port' + | 'service-specific' + | 'user@host-windows' + | 'host-windows-proxy'; export const DestinationType = { - Host: 'host' as DestinationType, - Email: 'email' as DestinationType, - Semail: 'semail' as DestinationType, - Url: 'url' as DestinationType, - Userhost: 'user@host' as DestinationType, - Userhostport: 'user@host:port' as DestinationType, - ServiceSpecific: 'service-specific' as DestinationType, - UserhostWindows: 'user@host-windows' as DestinationType, - HostWindowsProxy: 'host-windows-proxy' as DestinationType + Host: 'host' as DestinationType, + Email: 'email' as DestinationType, + Semail: 'semail' as DestinationType, + Url: 'url' as DestinationType, + Userhost: 'user@host' as DestinationType, + Userhostport: 'user@host:port' as DestinationType, + ServiceSpecific: 'service-specific' as DestinationType, + UserhostWindows: 'user@host-windows' as DestinationType, + HostWindowsProxy: 'host-windows-proxy' as DestinationType, }; - diff --git a/libs/perun/openapi/src/lib/model/enrichedFacility.ts b/libs/perun/openapi/src/lib/model/enrichedFacility.ts index b8878a083..e067de5a8 100644 --- a/libs/perun/openapi/src/lib/model/enrichedFacility.ts +++ b/libs/perun/openapi/src/lib/model/enrichedFacility.ts @@ -14,11 +14,9 @@ import { Owner } from './owner'; import { Host } from './host'; import { Facility } from './facility'; - -export interface EnrichedFacility { - facility?: Facility; - owners?: Array; - destinations?: Array; - hosts?: Array; +export interface EnrichedFacility { + facility?: Facility; + owners?: Array; + destinations?: Array; + hosts?: Array; } - diff --git a/libs/perun/openapi/src/lib/model/enrichedGroup.ts b/libs/perun/openapi/src/lib/model/enrichedGroup.ts index cf13a754f..1a19bf16e 100644 --- a/libs/perun/openapi/src/lib/model/enrichedGroup.ts +++ b/libs/perun/openapi/src/lib/model/enrichedGroup.ts @@ -12,9 +12,7 @@ import { Group } from './group'; import { Attribute } from './attribute'; - -export interface EnrichedGroup { - group?: Group; - attributes?: Array; +export interface EnrichedGroup { + group?: Group; + attributes?: Array; } - diff --git a/libs/perun/openapi/src/lib/model/enrichedHost.ts b/libs/perun/openapi/src/lib/model/enrichedHost.ts index c906c37a8..b9f70a77a 100644 --- a/libs/perun/openapi/src/lib/model/enrichedHost.ts +++ b/libs/perun/openapi/src/lib/model/enrichedHost.ts @@ -12,9 +12,7 @@ import { Attribute } from './attribute'; import { Host } from './host'; - -export interface EnrichedHost { - host?: Host; - hostAttributes?: Array; +export interface EnrichedHost { + host?: Host; + hostAttributes?: Array; } - diff --git a/libs/perun/openapi/src/lib/model/enrichedResource.ts b/libs/perun/openapi/src/lib/model/enrichedResource.ts index 9c485bc58..0c1911a08 100644 --- a/libs/perun/openapi/src/lib/model/enrichedResource.ts +++ b/libs/perun/openapi/src/lib/model/enrichedResource.ts @@ -12,9 +12,7 @@ import { Attribute } from './attribute'; import { Resource } from './resource'; - -export interface EnrichedResource { - resource?: Resource; - attributes?: Array; +export interface EnrichedResource { + resource?: Resource; + attributes?: Array; } - diff --git a/libs/perun/openapi/src/lib/model/extSource.ts b/libs/perun/openapi/src/lib/model/extSource.ts index 719b1628d..6fffa059b 100644 --- a/libs/perun/openapi/src/lib/model/extSource.ts +++ b/libs/perun/openapi/src/lib/model/extSource.ts @@ -11,9 +11,7 @@ */ import { Auditable } from './auditable'; - -export interface ExtSource extends Auditable { - name?: string; - type?: string; +export interface ExtSource extends Auditable { + name?: string; + type?: string; } - diff --git a/libs/perun/openapi/src/lib/model/extSourceObject.ts b/libs/perun/openapi/src/lib/model/extSourceObject.ts index c343cb512..88f36312c 100644 --- a/libs/perun/openapi/src/lib/model/extSourceObject.ts +++ b/libs/perun/openapi/src/lib/model/extSourceObject.ts @@ -11,11 +11,9 @@ */ import { ExtSource } from './extSource'; - /** * input to createExtSourceFromExtSourceObject */ -export interface ExtSourceObject { - extSource: ExtSource; +export interface ExtSourceObject { + extSource: ExtSource; } - diff --git a/libs/perun/openapi/src/lib/model/facility.ts b/libs/perun/openapi/src/lib/model/facility.ts index 09dab5bcf..79e6c0221 100644 --- a/libs/perun/openapi/src/lib/model/facility.ts +++ b/libs/perun/openapi/src/lib/model/facility.ts @@ -11,9 +11,7 @@ */ import { Auditable } from './auditable'; - -export interface Facility extends Auditable { - name?: string; - description?: string; +export interface Facility extends Auditable { + name?: string; + description?: string; } - diff --git a/libs/perun/openapi/src/lib/model/facilityPropagationState.ts b/libs/perun/openapi/src/lib/model/facilityPropagationState.ts index 6f91e1404..4a967c215 100644 --- a/libs/perun/openapi/src/lib/model/facilityPropagationState.ts +++ b/libs/perun/openapi/src/lib/model/facilityPropagationState.ts @@ -10,13 +10,11 @@ * Do not edit the class manually. */ - export type FacilityPropagationState = 'OK' | 'ERROR' | 'PROCESSING' | 'NOT_DETERMINED'; export const FacilityPropagationState = { - OK: 'OK' as FacilityPropagationState, - ERROR: 'ERROR' as FacilityPropagationState, - PROCESSING: 'PROCESSING' as FacilityPropagationState, - NOTDETERMINED: 'NOT_DETERMINED' as FacilityPropagationState + OK: 'OK' as FacilityPropagationState, + ERROR: 'ERROR' as FacilityPropagationState, + PROCESSING: 'PROCESSING' as FacilityPropagationState, + NOTDETERMINED: 'NOT_DETERMINED' as FacilityPropagationState, }; - diff --git a/libs/perun/openapi/src/lib/model/facilityState.ts b/libs/perun/openapi/src/lib/model/facilityState.ts index 1ed911967..ddc3f1f86 100644 --- a/libs/perun/openapi/src/lib/model/facilityState.ts +++ b/libs/perun/openapi/src/lib/model/facilityState.ts @@ -12,10 +12,8 @@ import { Facility } from './facility'; import { FacilityPropagationState } from './facilityPropagationState'; - -export interface FacilityState { - facility?: Facility; - state?: FacilityPropagationState; - results?: { [key: string]: FacilityPropagationState; }; +export interface FacilityState { + facility?: Facility; + state?: FacilityPropagationState; + results?: { [key: string]: FacilityPropagationState }; } - diff --git a/libs/perun/openapi/src/lib/model/genDataNode.ts b/libs/perun/openapi/src/lib/model/genDataNode.ts index f3a7e5109..48704a203 100644 --- a/libs/perun/openapi/src/lib/model/genDataNode.ts +++ b/libs/perun/openapi/src/lib/model/genDataNode.ts @@ -12,10 +12,8 @@ import { GenMemberDataNode } from './genMemberDataNode'; import { HashedGenData } from './hashedGenData'; - -export interface GenDataNode { - h?: Array; - c?: Array; - m?: Array; +export interface GenDataNode { + h?: Array; + c?: Array; + m?: Array; } - diff --git a/libs/perun/openapi/src/lib/model/genMemberDataNode.ts b/libs/perun/openapi/src/lib/model/genMemberDataNode.ts index 59270e6cf..b3e0f0688 100644 --- a/libs/perun/openapi/src/lib/model/genMemberDataNode.ts +++ b/libs/perun/openapi/src/lib/model/genMemberDataNode.ts @@ -10,8 +10,6 @@ * Do not edit the class manually. */ - -export interface GenMemberDataNode { - h?: Array; +export interface GenMemberDataNode { + h?: Array; } - diff --git a/libs/perun/openapi/src/lib/model/group.ts b/libs/perun/openapi/src/lib/model/group.ts index 9dfe2ea0e..40d7c8618 100644 --- a/libs/perun/openapi/src/lib/model/group.ts +++ b/libs/perun/openapi/src/lib/model/group.ts @@ -11,13 +11,11 @@ */ import { Auditable } from './auditable'; - -export interface Group extends Auditable { - name?: string; - shortName?: string; - description?: string | null; - voId?: number; - parentGroupId?: number | null; - uuid?: string; +export interface Group extends Auditable { + name?: string; + shortName?: string; + description?: string | null; + voId?: number; + parentGroupId?: number | null; + uuid?: string; } - diff --git a/libs/perun/openapi/src/lib/model/groupMemberData.ts b/libs/perun/openapi/src/lib/model/groupMemberData.ts index 15213e61e..d0caa9c8c 100644 --- a/libs/perun/openapi/src/lib/model/groupMemberData.ts +++ b/libs/perun/openapi/src/lib/model/groupMemberData.ts @@ -12,9 +12,7 @@ import { Attribute } from './attribute'; import { GroupMemberRelation } from './groupMemberRelation'; - -export interface GroupMemberData { - relations?: Array; - groupMemberAttributes?: { [key: string]: { [key: string]: Array; }; }; +export interface GroupMemberData { + relations?: Array; + groupMemberAttributes?: { [key: string]: { [key: string]: Array } }; } - diff --git a/libs/perun/openapi/src/lib/model/groupMemberRelation.ts b/libs/perun/openapi/src/lib/model/groupMemberRelation.ts index 6230cdf0b..09166af69 100644 --- a/libs/perun/openapi/src/lib/model/groupMemberRelation.ts +++ b/libs/perun/openapi/src/lib/model/groupMemberRelation.ts @@ -10,27 +10,25 @@ * Do not edit the class manually. */ - -export interface GroupMemberRelation { - /** - * member id - */ - m?: number; - /** - * group id - */ - g?: number; - /** - * source group id - */ - sg?: number; - /** - * source group status - */ - s?: string; - /** - * membership type - */ - t?: string; +export interface GroupMemberRelation { + /** + * member id + */ + m?: number; + /** + * group id + */ + g?: number; + /** + * source group id + */ + sg?: number; + /** + * source group status + */ + s?: string; + /** + * membership type + */ + t?: string; } - diff --git a/libs/perun/openapi/src/lib/model/groupResourceStatus.ts b/libs/perun/openapi/src/lib/model/groupResourceStatus.ts index e225745b2..02efa1f60 100644 --- a/libs/perun/openapi/src/lib/model/groupResourceStatus.ts +++ b/libs/perun/openapi/src/lib/model/groupResourceStatus.ts @@ -10,16 +10,14 @@ * Do not edit the class manually. */ - /** * status of the group-resource assignment */ export type GroupResourceStatus = 'ACTIVE' | 'INACTIVE' | 'FAILED' | 'PROCESSING'; export const GroupResourceStatus = { - ACTIVE: 'ACTIVE' as GroupResourceStatus, - INACTIVE: 'INACTIVE' as GroupResourceStatus, - FAILED: 'FAILED' as GroupResourceStatus, - PROCESSING: 'PROCESSING' as GroupResourceStatus + ACTIVE: 'ACTIVE' as GroupResourceStatus, + INACTIVE: 'INACTIVE' as GroupResourceStatus, + FAILED: 'FAILED' as GroupResourceStatus, + PROCESSING: 'PROCESSING' as GroupResourceStatus, }; - diff --git a/libs/perun/openapi/src/lib/model/groupsOrderColumn.ts b/libs/perun/openapi/src/lib/model/groupsOrderColumn.ts index e37b0015c..aa8d492bc 100644 --- a/libs/perun/openapi/src/lib/model/groupsOrderColumn.ts +++ b/libs/perun/openapi/src/lib/model/groupsOrderColumn.ts @@ -10,12 +10,10 @@ * Do not edit the class manually. */ - export type GroupsOrderColumn = 'ID' | 'NAME' | 'DESCRIPTION'; export const GroupsOrderColumn = { - ID: 'ID' as GroupsOrderColumn, - NAME: 'NAME' as GroupsOrderColumn, - DESCRIPTION: 'DESCRIPTION' as GroupsOrderColumn + ID: 'ID' as GroupsOrderColumn, + NAME: 'NAME' as GroupsOrderColumn, + DESCRIPTION: 'DESCRIPTION' as GroupsOrderColumn, }; - diff --git a/libs/perun/openapi/src/lib/model/groupsPageQuery.ts b/libs/perun/openapi/src/lib/model/groupsPageQuery.ts index a3a17a4da..27b8cd45a 100644 --- a/libs/perun/openapi/src/lib/model/groupsPageQuery.ts +++ b/libs/perun/openapi/src/lib/model/groupsPageQuery.ts @@ -12,13 +12,11 @@ import { GroupsOrderColumn } from './groupsOrderColumn'; import { SortingOrder } from './sortingOrder'; - -export interface GroupsPageQuery { - pageSize: number; - offset: number; - order: SortingOrder; - sortColumn: GroupsOrderColumn; - memberId?: number; - searchString?: string; +export interface GroupsPageQuery { + pageSize: number; + offset: number; + order: SortingOrder; + sortColumn: GroupsOrderColumn; + memberId?: number; + searchString?: string; } - diff --git a/libs/perun/openapi/src/lib/model/hashedGenData.ts b/libs/perun/openapi/src/lib/model/hashedGenData.ts index 48e0a2645..4a731f02b 100644 --- a/libs/perun/openapi/src/lib/model/hashedGenData.ts +++ b/libs/perun/openapi/src/lib/model/hashedGenData.ts @@ -12,9 +12,7 @@ import { Attribute } from './attribute'; import { GenDataNode } from './genDataNode'; - -export interface HashedGenData { - attributes?: { [key: string]: Array; }; - hierarchy?: GenDataNode; +export interface HashedGenData { + attributes?: { [key: string]: Array }; + hierarchy?: GenDataNode; } - diff --git a/libs/perun/openapi/src/lib/model/host.ts b/libs/perun/openapi/src/lib/model/host.ts index 7ec0d10e3..81233ad4b 100644 --- a/libs/perun/openapi/src/lib/model/host.ts +++ b/libs/perun/openapi/src/lib/model/host.ts @@ -11,8 +11,6 @@ */ import { Auditable } from './auditable'; - -export interface Host extends Auditable { - hostname?: string; +export interface Host extends Auditable { + hostname?: string; } - diff --git a/libs/perun/openapi/src/lib/model/identity.ts b/libs/perun/openapi/src/lib/model/identity.ts index 35d27b406..a52713a2b 100644 --- a/libs/perun/openapi/src/lib/model/identity.ts +++ b/libs/perun/openapi/src/lib/model/identity.ts @@ -11,12 +11,10 @@ */ import { ExtSource } from './extSource'; - -export interface Identity { - id?: number; - name?: string; - organization?: string; - email?: string; - identities?: Array; +export interface Identity { + id?: number; + name?: string; + organization?: string; + email?: string; + identities?: Array; } - diff --git a/libs/perun/openapi/src/lib/model/inlineResponse200.ts b/libs/perun/openapi/src/lib/model/inlineResponse200.ts index 2e0fdc3bb..60dfa3ad3 100644 --- a/libs/perun/openapi/src/lib/model/inlineResponse200.ts +++ b/libs/perun/openapi/src/lib/model/inlineResponse200.ts @@ -10,17 +10,14 @@ * Do not edit the class manually. */ - -export interface InlineResponse200 { - graph?: string; - format?: InlineResponse200.FormatEnum; +export interface InlineResponse200 { + graph?: string; + format?: InlineResponse200.FormatEnum; } export namespace InlineResponse200 { - export type FormatEnum = 'DOT' | 'TGF'; - export const FormatEnum = { - DOT: 'DOT' as FormatEnum, - TGF: 'TGF' as FormatEnum - }; + export type FormatEnum = 'DOT' | 'TGF'; + export const FormatEnum = { + DOT: 'DOT' as FormatEnum, + TGF: 'TGF' as FormatEnum, + }; } - - diff --git a/libs/perun/openapi/src/lib/model/inputAddApplicationMailForGroup.ts b/libs/perun/openapi/src/lib/model/inputAddApplicationMailForGroup.ts index a7ddd6f52..7c6da60ed 100644 --- a/libs/perun/openapi/src/lib/model/inputAddApplicationMailForGroup.ts +++ b/libs/perun/openapi/src/lib/model/inputAddApplicationMailForGroup.ts @@ -11,12 +11,10 @@ */ import { ApplicationMail } from './applicationMail'; - /** * input to addApplicationMailForGroup */ -export interface InputAddApplicationMailForGroup { - group: number; - mail: ApplicationMail; +export interface InputAddApplicationMailForGroup { + group: number; + mail: ApplicationMail; } - diff --git a/libs/perun/openapi/src/lib/model/inputAddApplicationMailForVo.ts b/libs/perun/openapi/src/lib/model/inputAddApplicationMailForVo.ts index 5e49ed737..e370d2d51 100644 --- a/libs/perun/openapi/src/lib/model/inputAddApplicationMailForVo.ts +++ b/libs/perun/openapi/src/lib/model/inputAddApplicationMailForVo.ts @@ -11,12 +11,10 @@ */ import { ApplicationMail } from './applicationMail'; - /** * input to addApplicationMailForVo */ -export interface InputAddApplicationMailForVo { - vo: number; - mail: ApplicationMail; +export interface InputAddApplicationMailForVo { + vo: number; + mail: ApplicationMail; } - diff --git a/libs/perun/openapi/src/lib/model/inputAddDestinationToMultipleServices.ts b/libs/perun/openapi/src/lib/model/inputAddDestinationToMultipleServices.ts index 0b012eb8e..c9876bcc5 100644 --- a/libs/perun/openapi/src/lib/model/inputAddDestinationToMultipleServices.ts +++ b/libs/perun/openapi/src/lib/model/inputAddDestinationToMultipleServices.ts @@ -13,15 +13,13 @@ import { DestinationPropagationType } from './destinationPropagationType'; import { Service } from './service'; import { DestinationType } from './destinationType'; - /** * input to addDestinationToMultipleServices */ -export interface InputAddDestinationToMultipleServices { - services: Array; - facility: number; - destination: string; - type: DestinationType; - propagationType?: DestinationPropagationType; +export interface InputAddDestinationToMultipleServices { + services: Array; + facility: number; + destination: string; + type: DestinationType; + propagationType?: DestinationPropagationType; } - diff --git a/libs/perun/openapi/src/lib/model/inputAddDestinationsDefinedByHostsOnFacility.ts b/libs/perun/openapi/src/lib/model/inputAddDestinationsDefinedByHostsOnFacility.ts index c9a5a1ae6..2e482f156 100644 --- a/libs/perun/openapi/src/lib/model/inputAddDestinationsDefinedByHostsOnFacility.ts +++ b/libs/perun/openapi/src/lib/model/inputAddDestinationsDefinedByHostsOnFacility.ts @@ -11,12 +11,10 @@ */ import { Service } from './service'; - /** * input to addDestinationsDefinedByHostsOnFacility */ -export interface InputAddDestinationsDefinedByHostsOnFacility { - services: Array; - facility: number; +export interface InputAddDestinationsDefinedByHostsOnFacility { + services: Array; + facility: number; } - diff --git a/libs/perun/openapi/src/lib/model/inputAssignResourceTagToResource.ts b/libs/perun/openapi/src/lib/model/inputAssignResourceTagToResource.ts index 9ca6878a0..19d092c43 100644 --- a/libs/perun/openapi/src/lib/model/inputAssignResourceTagToResource.ts +++ b/libs/perun/openapi/src/lib/model/inputAssignResourceTagToResource.ts @@ -11,15 +11,13 @@ */ import { ResourceTag } from './resourceTag'; - /** * input to assignResourceTagToResource */ -export interface InputAssignResourceTagToResource { - /** - * resource id - */ - resource: number; - resourceTag: ResourceTag; +export interface InputAssignResourceTagToResource { + /** + * resource id + */ + resource: number; + resourceTag: ResourceTag; } - diff --git a/libs/perun/openapi/src/lib/model/inputAttributeDefinition.ts b/libs/perun/openapi/src/lib/model/inputAttributeDefinition.ts index 37c02623c..f815f1c03 100644 --- a/libs/perun/openapi/src/lib/model/inputAttributeDefinition.ts +++ b/libs/perun/openapi/src/lib/model/inputAttributeDefinition.ts @@ -11,11 +11,9 @@ */ import { AttributeDefinition } from './attributeDefinition'; - /** * Input to updateAttributeDefinition */ -export interface InputAttributeDefinition { - attributeDefinition: AttributeDefinition; +export interface InputAttributeDefinition { + attributeDefinition: AttributeDefinition; } - diff --git a/libs/perun/openapi/src/lib/model/inputAttributePolicyCollections.ts b/libs/perun/openapi/src/lib/model/inputAttributePolicyCollections.ts index ad37acfda..deda38f19 100644 --- a/libs/perun/openapi/src/lib/model/inputAttributePolicyCollections.ts +++ b/libs/perun/openapi/src/lib/model/inputAttributePolicyCollections.ts @@ -11,11 +11,9 @@ */ import { AttributePolicyCollection } from './attributePolicyCollection'; - /** * Input to setAttributePolicyCollections */ -export interface InputAttributePolicyCollections { - policyCollections: Array; +export interface InputAttributePolicyCollections { + policyCollections: Array; } - diff --git a/libs/perun/openapi/src/lib/model/inputAttributeRights.ts b/libs/perun/openapi/src/lib/model/inputAttributeRights.ts index 9dbacb9a9..815d58468 100644 --- a/libs/perun/openapi/src/lib/model/inputAttributeRights.ts +++ b/libs/perun/openapi/src/lib/model/inputAttributeRights.ts @@ -11,11 +11,9 @@ */ import { AttributeRights } from './attributeRights'; - /** * Input to setAttributeRights */ -export interface InputAttributeRights { - rights: Array; +export interface InputAttributeRights { + rights: Array; } - diff --git a/libs/perun/openapi/src/lib/model/inputCopyResource.ts b/libs/perun/openapi/src/lib/model/inputCopyResource.ts index 38acfb0b0..f9ff12c9a 100644 --- a/libs/perun/openapi/src/lib/model/inputCopyResource.ts +++ b/libs/perun/openapi/src/lib/model/inputCopyResource.ts @@ -11,16 +11,14 @@ */ import { Resource } from './resource'; - /** * input to copyResource */ -export interface InputCopyResource { - templateResource: Resource; - destinationResource: Resource; - /** - * if copy the resource with group - */ - withGroups: boolean; +export interface InputCopyResource { + templateResource: Resource; + destinationResource: Resource; + /** + * if copy the resource with group + */ + withGroups: boolean; } - diff --git a/libs/perun/openapi/src/lib/model/inputCreateAttributeDefinition.ts b/libs/perun/openapi/src/lib/model/inputCreateAttributeDefinition.ts index 9bebe688b..e283aec86 100644 --- a/libs/perun/openapi/src/lib/model/inputCreateAttributeDefinition.ts +++ b/libs/perun/openapi/src/lib/model/inputCreateAttributeDefinition.ts @@ -11,11 +11,9 @@ */ import { AttributeDefinition } from './attributeDefinition'; - /** * input to createAttributeDefinition */ -export interface InputCreateAttributeDefinition { - attribute: AttributeDefinition; +export interface InputCreateAttributeDefinition { + attribute: AttributeDefinition; } - diff --git a/libs/perun/openapi/src/lib/model/inputCreateAuthorship.ts b/libs/perun/openapi/src/lib/model/inputCreateAuthorship.ts index 10024b2bf..9b6a83061 100644 --- a/libs/perun/openapi/src/lib/model/inputCreateAuthorship.ts +++ b/libs/perun/openapi/src/lib/model/inputCreateAuthorship.ts @@ -11,11 +11,9 @@ */ import { Authorship } from './authorship'; - /** * input to createAuthorship */ -export interface InputCreateAuthorship { - authorship: Authorship; +export interface InputCreateAuthorship { + authorship: Authorship; } - diff --git a/libs/perun/openapi/src/lib/model/inputCreateCategory.ts b/libs/perun/openapi/src/lib/model/inputCreateCategory.ts index e2ead65d6..460d6c8b7 100644 --- a/libs/perun/openapi/src/lib/model/inputCreateCategory.ts +++ b/libs/perun/openapi/src/lib/model/inputCreateCategory.ts @@ -11,11 +11,9 @@ */ import { Category } from './category'; - /** * input to createCategory */ -export interface InputCreateCategory { - category: Category; +export interface InputCreateCategory { + category: Category; } - diff --git a/libs/perun/openapi/src/lib/model/inputCreateCategory1.ts b/libs/perun/openapi/src/lib/model/inputCreateCategory1.ts index 4b63fa7c8..07c6c2d6c 100644 --- a/libs/perun/openapi/src/lib/model/inputCreateCategory1.ts +++ b/libs/perun/openapi/src/lib/model/inputCreateCategory1.ts @@ -10,18 +10,16 @@ * Do not edit the class manually. */ - /** * input to createCategory */ -export interface InputCreateCategory1 { - /** - * name of the category - */ - name: string; - /** - * the rank of the category - */ - rank: number; +export interface InputCreateCategory1 { + /** + * name of the category + */ + name: string; + /** + * the rank of the category + */ + rank: number; } - diff --git a/libs/perun/openapi/src/lib/model/inputCreateMemberForCandidate.ts b/libs/perun/openapi/src/lib/model/inputCreateMemberForCandidate.ts index e8ff005f0..65eaa9582 100644 --- a/libs/perun/openapi/src/lib/model/inputCreateMemberForCandidate.ts +++ b/libs/perun/openapi/src/lib/model/inputCreateMemberForCandidate.ts @@ -12,13 +12,11 @@ import { Candidate } from './candidate'; import { Group } from './group'; - /** * input to create member for candidate */ -export interface InputCreateMemberForCandidate { - vo: number; - candidate: Candidate; - groups?: Array; +export interface InputCreateMemberForCandidate { + vo: number; + candidate: Candidate; + groups?: Array; } - diff --git a/libs/perun/openapi/src/lib/model/inputCreateMemberForUser.ts b/libs/perun/openapi/src/lib/model/inputCreateMemberForUser.ts index 9f5f5a306..de9cdfd99 100644 --- a/libs/perun/openapi/src/lib/model/inputCreateMemberForUser.ts +++ b/libs/perun/openapi/src/lib/model/inputCreateMemberForUser.ts @@ -11,13 +11,11 @@ */ import { Group } from './group'; - /** * input to create member for user */ -export interface InputCreateMemberForUser { - vo: number; - user: number; - groups?: Array; +export interface InputCreateMemberForUser { + vo: number; + user: number; + groups?: Array; } - diff --git a/libs/perun/openapi/src/lib/model/inputCreateMemberFromExtSource.ts b/libs/perun/openapi/src/lib/model/inputCreateMemberFromExtSource.ts index 8626f3798..7a9cdb6ed 100644 --- a/libs/perun/openapi/src/lib/model/inputCreateMemberFromExtSource.ts +++ b/libs/perun/openapi/src/lib/model/inputCreateMemberFromExtSource.ts @@ -12,16 +12,14 @@ import { Candidate } from './candidate'; import { Group } from './group'; - /** * input to create member from extSource */ -export interface InputCreateMemberFromExtSource { - vo: number; - extSourceName: string; - extSourceType: string; - login: string; - candidate: Candidate; - groups?: Array; +export interface InputCreateMemberFromExtSource { + vo: number; + extSourceName: string; + extSourceType: string; + login: string; + candidate: Candidate; + groups?: Array; } - diff --git a/libs/perun/openapi/src/lib/model/inputCreateOwner.ts b/libs/perun/openapi/src/lib/model/inputCreateOwner.ts index 60b8cd2e2..0fcc11cde 100644 --- a/libs/perun/openapi/src/lib/model/inputCreateOwner.ts +++ b/libs/perun/openapi/src/lib/model/inputCreateOwner.ts @@ -10,30 +10,27 @@ * Do not edit the class manually. */ - /** * input to createOwner, no id, numeric ownerType instead of string type */ -export interface InputCreateOwner { - /** - * name of contact, e.g. John Doe or NSA - */ - name: string; - /** - * email address - */ - contact: string; - /** - * 0 - technical, 1 - administrative - */ - ownerType: InputCreateOwner.OwnerTypeEnum; +export interface InputCreateOwner { + /** + * name of contact, e.g. John Doe or NSA + */ + name: string; + /** + * email address + */ + contact: string; + /** + * 0 - technical, 1 - administrative + */ + ownerType: InputCreateOwner.OwnerTypeEnum; } export namespace InputCreateOwner { - export type OwnerTypeEnum = 0 | 1; - export const OwnerTypeEnum = { - NUMBER_0: 0 as OwnerTypeEnum, - NUMBER_1: 1 as OwnerTypeEnum - }; + export type OwnerTypeEnum = 0 | 1; + export const OwnerTypeEnum = { + NUMBER_0: 0 as OwnerTypeEnum, + NUMBER_1: 1 as OwnerTypeEnum, + }; } - - diff --git a/libs/perun/openapi/src/lib/model/inputCreatePublication.ts b/libs/perun/openapi/src/lib/model/inputCreatePublication.ts index 24cafd819..1f62f5206 100644 --- a/libs/perun/openapi/src/lib/model/inputCreatePublication.ts +++ b/libs/perun/openapi/src/lib/model/inputCreatePublication.ts @@ -11,11 +11,9 @@ */ import { Publication } from './publication'; - /** * input to createPublication */ -export interface InputCreatePublication { - publication: Publication; +export interface InputCreatePublication { + publication: Publication; } - diff --git a/libs/perun/openapi/src/lib/model/inputCreatePublicationSystem.ts b/libs/perun/openapi/src/lib/model/inputCreatePublicationSystem.ts index 07b9705d4..a28189578 100644 --- a/libs/perun/openapi/src/lib/model/inputCreatePublicationSystem.ts +++ b/libs/perun/openapi/src/lib/model/inputCreatePublicationSystem.ts @@ -11,11 +11,9 @@ */ import { PublicationSystem } from './publicationSystem'; - /** * input to createPublicationSystem */ -export interface InputCreatePublicationSystem { - pubsys: PublicationSystem; +export interface InputCreatePublicationSystem { + pubsys: PublicationSystem; } - diff --git a/libs/perun/openapi/src/lib/model/inputCreateResourceTagWithResourceTag.ts b/libs/perun/openapi/src/lib/model/inputCreateResourceTagWithResourceTag.ts index 26cf094e3..ce0008c7f 100644 --- a/libs/perun/openapi/src/lib/model/inputCreateResourceTagWithResourceTag.ts +++ b/libs/perun/openapi/src/lib/model/inputCreateResourceTagWithResourceTag.ts @@ -11,15 +11,13 @@ */ import { ResourceTag } from './resourceTag'; - /** * input to createResourceTagWithResourceTag */ -export interface InputCreateResourceTagWithResourceTag { - resourceTag: ResourceTag; - /** - * vo id - */ - vo: number; +export interface InputCreateResourceTagWithResourceTag { + resourceTag: ResourceTag; + /** + * vo id + */ + vo: number; } - diff --git a/libs/perun/openapi/src/lib/model/inputCreateService.ts b/libs/perun/openapi/src/lib/model/inputCreateService.ts index 0474a6b60..26ab0ceec 100644 --- a/libs/perun/openapi/src/lib/model/inputCreateService.ts +++ b/libs/perun/openapi/src/lib/model/inputCreateService.ts @@ -11,11 +11,9 @@ */ import { Service } from './service'; - /** * input to createService */ -export interface InputCreateService { - service: Service; +export interface InputCreateService { + service: Service; } - diff --git a/libs/perun/openapi/src/lib/model/inputCreateServiceUser.ts b/libs/perun/openapi/src/lib/model/inputCreateServiceUser.ts index af4104a67..c4cff10ed 100644 --- a/libs/perun/openapi/src/lib/model/inputCreateServiceUser.ts +++ b/libs/perun/openapi/src/lib/model/inputCreateServiceUser.ts @@ -12,12 +12,10 @@ import { Candidate } from './candidate'; import { User } from './user'; - /** * input to createServiceUser */ -export interface InputCreateServiceUser { - candidate: Candidate; - specificUserOwners: Array; +export interface InputCreateServiceUser { + candidate: Candidate; + specificUserOwners: Array; } - diff --git a/libs/perun/openapi/src/lib/model/inputCreateServicesPackage.ts b/libs/perun/openapi/src/lib/model/inputCreateServicesPackage.ts index ec7581d61..0f5550815 100644 --- a/libs/perun/openapi/src/lib/model/inputCreateServicesPackage.ts +++ b/libs/perun/openapi/src/lib/model/inputCreateServicesPackage.ts @@ -11,11 +11,9 @@ */ import { ServicesPackage } from './servicesPackage'; - /** * Input to createServicesPackage */ -export interface InputCreateServicesPackage { - servicesPackage: ServicesPackage; +export interface InputCreateServicesPackage { + servicesPackage: ServicesPackage; } - diff --git a/libs/perun/openapi/src/lib/model/inputCreateSponsoredMember.ts b/libs/perun/openapi/src/lib/model/inputCreateSponsoredMember.ts index 7d7131332..f013ef026 100644 --- a/libs/perun/openapi/src/lib/model/inputCreateSponsoredMember.ts +++ b/libs/perun/openapi/src/lib/model/inputCreateSponsoredMember.ts @@ -11,15 +11,13 @@ */ import { SponsoredUserData } from './sponsoredUserData'; - /** * input for createSponsoredMember */ -export interface InputCreateSponsoredMember { - vo: number; - validityTo?: string; - sponsor: number; - sendActivationLink?: boolean; - userData: SponsoredUserData; +export interface InputCreateSponsoredMember { + vo: number; + validityTo?: string; + sponsor: number; + sendActivationLink?: boolean; + userData: SponsoredUserData; } - diff --git a/libs/perun/openapi/src/lib/model/inputCreateSponsoredMember1.ts b/libs/perun/openapi/src/lib/model/inputCreateSponsoredMember1.ts index 83ee99091..b355c4319 100644 --- a/libs/perun/openapi/src/lib/model/inputCreateSponsoredMember1.ts +++ b/libs/perun/openapi/src/lib/model/inputCreateSponsoredMember1.ts @@ -10,20 +10,18 @@ * Do not edit the class manually. */ - /** * input for createSponsoredMember */ -export interface InputCreateSponsoredMember1 { - /** - * names of members to create, single name should have the format {firstName};{lastName} to be parsed well - */ - guestNames: Array; - vo: number; - sponsor: number; - namespace: string; - validityTo?: string; - email?: string; - sendActivationLink?: boolean; +export interface InputCreateSponsoredMember1 { + /** + * names of members to create, single name should have the format {firstName};{lastName} to be parsed well + */ + guestNames: Array; + vo: number; + sponsor: number; + namespace: string; + validityTo?: string; + email?: string; + sendActivationLink?: boolean; } - diff --git a/libs/perun/openapi/src/lib/model/inputCreateSponsoredMemberFromCSV.ts b/libs/perun/openapi/src/lib/model/inputCreateSponsoredMemberFromCSV.ts index 50bcab080..953652caa 100644 --- a/libs/perun/openapi/src/lib/model/inputCreateSponsoredMemberFromCSV.ts +++ b/libs/perun/openapi/src/lib/model/inputCreateSponsoredMemberFromCSV.ts @@ -10,27 +10,25 @@ * Do not edit the class manually. */ - /** * input for createSponsoredMembersFromCSV */ -export interface InputCreateSponsoredMemberFromCSV { - /** - * values separated with semicolons - */ - data: Array; - /** - * csv header for the given data, values are also split with semicolons - */ - header: string; - vo: number; - sponsor: number; - namespace: string; - validityTo?: string; - sendActivationLinks?: boolean; - /** - * groups to which should be the created users assigned - */ - groups?: Array; +export interface InputCreateSponsoredMemberFromCSV { + /** + * values separated with semicolons + */ + data: Array; + /** + * csv header for the given data, values are also split with semicolons + */ + header: string; + vo: number; + sponsor: number; + namespace: string; + validityTo?: string; + sendActivationLinks?: boolean; + /** + * groups to which should be the created users assigned + */ + groups?: Array; } - diff --git a/libs/perun/openapi/src/lib/model/inputCreateThanks.ts b/libs/perun/openapi/src/lib/model/inputCreateThanks.ts index c93fdca11..f6e44f023 100644 --- a/libs/perun/openapi/src/lib/model/inputCreateThanks.ts +++ b/libs/perun/openapi/src/lib/model/inputCreateThanks.ts @@ -11,11 +11,9 @@ */ import { Thanks } from './thanks'; - /** * input to createThanks */ -export interface InputCreateThanks { - thanks?: Thanks; +export interface InputCreateThanks { + thanks?: Thanks; } - diff --git a/libs/perun/openapi/src/lib/model/inputCreateVoWithVo.ts b/libs/perun/openapi/src/lib/model/inputCreateVoWithVo.ts index 633ef352f..3d61bd391 100644 --- a/libs/perun/openapi/src/lib/model/inputCreateVoWithVo.ts +++ b/libs/perun/openapi/src/lib/model/inputCreateVoWithVo.ts @@ -11,11 +11,9 @@ */ import { Vo } from './vo'; - /** * input to createVoWithVo */ -export interface InputCreateVoWithVo { - vo: Vo; +export interface InputCreateVoWithVo { + vo: Vo; } - diff --git a/libs/perun/openapi/src/lib/model/inputDeleteGroups.ts b/libs/perun/openapi/src/lib/model/inputDeleteGroups.ts index 2785edabf..5ce329aa1 100644 --- a/libs/perun/openapi/src/lib/model/inputDeleteGroups.ts +++ b/libs/perun/openapi/src/lib/model/inputDeleteGroups.ts @@ -10,15 +10,13 @@ * Do not edit the class manually. */ - /** * input to deleteGroup */ -export interface InputDeleteGroups { - groups: Array; - /** - * boolean for force delete - */ - forceDelete: boolean; +export interface InputDeleteGroups { + groups: Array; + /** + * boolean for force delete + */ + forceDelete: boolean; } - diff --git a/libs/perun/openapi/src/lib/model/inputDeleteResourceTag.ts b/libs/perun/openapi/src/lib/model/inputDeleteResourceTag.ts index d6d21f1f9..d0bb017cb 100644 --- a/libs/perun/openapi/src/lib/model/inputDeleteResourceTag.ts +++ b/libs/perun/openapi/src/lib/model/inputDeleteResourceTag.ts @@ -11,11 +11,9 @@ */ import { ResourceTag } from './resourceTag'; - /** * input to deleteResourceTag */ -export interface InputDeleteResourceTag { - resourceTag: ResourceTag; +export interface InputDeleteResourceTag { + resourceTag: ResourceTag; } - diff --git a/libs/perun/openapi/src/lib/model/inputEntitylessAttribute.ts b/libs/perun/openapi/src/lib/model/inputEntitylessAttribute.ts index d7426530e..009cbe321 100644 --- a/libs/perun/openapi/src/lib/model/inputEntitylessAttribute.ts +++ b/libs/perun/openapi/src/lib/model/inputEntitylessAttribute.ts @@ -11,15 +11,13 @@ */ import { Attribute } from './attribute'; - /** * input to setEntitylessAttribute */ -export interface InputEntitylessAttribute { - /** - * key for entityless attribute - */ - key: string; - attribute: Attribute; +export interface InputEntitylessAttribute { + /** + * key for entityless attribute + */ + key: string; + attribute: Attribute; } - diff --git a/libs/perun/openapi/src/lib/model/inputFormItemData.ts b/libs/perun/openapi/src/lib/model/inputFormItemData.ts index ff4406fca..1aa3bd4da 100644 --- a/libs/perun/openapi/src/lib/model/inputFormItemData.ts +++ b/libs/perun/openapi/src/lib/model/inputFormItemData.ts @@ -11,15 +11,13 @@ */ import { ApplicationFormItemData } from './applicationFormItemData'; - /** * input to updateFormItemData */ -export interface InputFormItemData { - /** - * application id - */ - appId: number; - data: ApplicationFormItemData; +export interface InputFormItemData { + /** + * application id + */ + appId: number; + data: ApplicationFormItemData; } - diff --git a/libs/perun/openapi/src/lib/model/inputFormItemData1.ts b/libs/perun/openapi/src/lib/model/inputFormItemData1.ts index 2f3762f02..b0b2597d5 100644 --- a/libs/perun/openapi/src/lib/model/inputFormItemData1.ts +++ b/libs/perun/openapi/src/lib/model/inputFormItemData1.ts @@ -11,15 +11,13 @@ */ import { ApplicationFormItemData } from './applicationFormItemData'; - /** * input to updateFormItemsData */ -export interface InputFormItemData1 { - /** - * application id - */ - appId: number; - data: Array; +export interface InputFormItemData1 { + /** + * application id + */ + appId: number; + data: Array; } - diff --git a/libs/perun/openapi/src/lib/model/inputGetAllResourcesByResourceTag.ts b/libs/perun/openapi/src/lib/model/inputGetAllResourcesByResourceTag.ts index 054ef1c13..a73c3e990 100644 --- a/libs/perun/openapi/src/lib/model/inputGetAllResourcesByResourceTag.ts +++ b/libs/perun/openapi/src/lib/model/inputGetAllResourcesByResourceTag.ts @@ -11,15 +11,13 @@ */ import { ResourceTag } from './resourceTag'; - /** * input to getAllResourcesByResourceTag */ -export interface InputGetAllResourcesByResourceTag { - /** - * resource id - */ - resource?: number; - resourceTag: ResourceTag; +export interface InputGetAllResourcesByResourceTag { + /** + * resource id + */ + resource?: number; + resourceTag: ResourceTag; } - diff --git a/libs/perun/openapi/src/lib/model/inputGetMessagesPage.ts b/libs/perun/openapi/src/lib/model/inputGetMessagesPage.ts index 06eb83482..fa41176ad 100644 --- a/libs/perun/openapi/src/lib/model/inputGetMessagesPage.ts +++ b/libs/perun/openapi/src/lib/model/inputGetMessagesPage.ts @@ -11,11 +11,9 @@ */ import { AuditMessagesPageQuery } from './auditMessagesPageQuery'; - /** * input to get messages page */ -export interface InputGetMessagesPage { - query: AuditMessagesPageQuery; +export interface InputGetMessagesPage { + query: AuditMessagesPageQuery; } - diff --git a/libs/perun/openapi/src/lib/model/inputGetPaginatedApplications.ts b/libs/perun/openapi/src/lib/model/inputGetPaginatedApplications.ts index 7b8bdd8a2..89208e3a1 100644 --- a/libs/perun/openapi/src/lib/model/inputGetPaginatedApplications.ts +++ b/libs/perun/openapi/src/lib/model/inputGetPaginatedApplications.ts @@ -11,12 +11,10 @@ */ import { ApplicationsPageQuery } from './applicationsPageQuery'; - /** * input to getPaginatedApplications */ -export interface InputGetPaginatedApplications { - vo: number; - query: ApplicationsPageQuery; +export interface InputGetPaginatedApplications { + vo: number; + query: ApplicationsPageQuery; } - diff --git a/libs/perun/openapi/src/lib/model/inputGetPaginatedGroups.ts b/libs/perun/openapi/src/lib/model/inputGetPaginatedGroups.ts index 503814dca..1287f4f3b 100644 --- a/libs/perun/openapi/src/lib/model/inputGetPaginatedGroups.ts +++ b/libs/perun/openapi/src/lib/model/inputGetPaginatedGroups.ts @@ -11,13 +11,11 @@ */ import { GroupsPageQuery } from './groupsPageQuery'; - /** * input to getPaginatedGroups */ -export interface InputGetPaginatedGroups { - vo: number; - attrNames: Array; - query: GroupsPageQuery; +export interface InputGetPaginatedGroups { + vo: number; + attrNames: Array; + query: GroupsPageQuery; } - diff --git a/libs/perun/openapi/src/lib/model/inputGetPaginatedMembers.ts b/libs/perun/openapi/src/lib/model/inputGetPaginatedMembers.ts index 0b2632d68..7a7e39042 100644 --- a/libs/perun/openapi/src/lib/model/inputGetPaginatedMembers.ts +++ b/libs/perun/openapi/src/lib/model/inputGetPaginatedMembers.ts @@ -11,13 +11,11 @@ */ import { MembersPageQuery } from './membersPageQuery'; - /** * input to getPaginatedMembers */ -export interface InputGetPaginatedMembers { - vo: number; - attrNames: Array; - query: MembersPageQuery; +export interface InputGetPaginatedMembers { + vo: number; + attrNames: Array; + query: MembersPageQuery; } - diff --git a/libs/perun/openapi/src/lib/model/inputGetPaginatedSubgroups.ts b/libs/perun/openapi/src/lib/model/inputGetPaginatedSubgroups.ts index 7c76bb115..5cf0b3ff2 100644 --- a/libs/perun/openapi/src/lib/model/inputGetPaginatedSubgroups.ts +++ b/libs/perun/openapi/src/lib/model/inputGetPaginatedSubgroups.ts @@ -11,13 +11,11 @@ */ import { GroupsPageQuery } from './groupsPageQuery'; - /** * input to getSubgroupsPage */ -export interface InputGetPaginatedSubgroups { - group: number; - attrNames: Array; - query: GroupsPageQuery; +export interface InputGetPaginatedSubgroups { + group: number; + attrNames: Array; + query: GroupsPageQuery; } - diff --git a/libs/perun/openapi/src/lib/model/inputGetPaginatedUsers.ts b/libs/perun/openapi/src/lib/model/inputGetPaginatedUsers.ts index 7aa376c63..7bf6f81d7 100644 --- a/libs/perun/openapi/src/lib/model/inputGetPaginatedUsers.ts +++ b/libs/perun/openapi/src/lib/model/inputGetPaginatedUsers.ts @@ -11,12 +11,10 @@ */ import { UsersPageQuery } from './usersPageQuery'; - /** * input to getPaginatedUsers */ -export interface InputGetPaginatedUsers { - attrNames: Array; - query: UsersPageQuery; +export interface InputGetPaginatedUsers { + attrNames: Array; + query: UsersPageQuery; } - diff --git a/libs/perun/openapi/src/lib/model/inputLockPublications.ts b/libs/perun/openapi/src/lib/model/inputLockPublications.ts index 89eabd034..9c6bce44c 100644 --- a/libs/perun/openapi/src/lib/model/inputLockPublications.ts +++ b/libs/perun/openapi/src/lib/model/inputLockPublications.ts @@ -11,12 +11,10 @@ */ import { Publication } from './publication'; - /** * input to lockPublications */ -export interface InputLockPublications { - publications: Array; - lock: boolean; +export interface InputLockPublications { + publications: Array; + lock: boolean; } - diff --git a/libs/perun/openapi/src/lib/model/inputRemoveResourceTagFromResource.ts b/libs/perun/openapi/src/lib/model/inputRemoveResourceTagFromResource.ts index c133c7d28..95ae081e8 100644 --- a/libs/perun/openapi/src/lib/model/inputRemoveResourceTagFromResource.ts +++ b/libs/perun/openapi/src/lib/model/inputRemoveResourceTagFromResource.ts @@ -11,15 +11,13 @@ */ import { ResourceTag } from './resourceTag'; - /** * input to removeResourceTagFromResource */ -export interface InputRemoveResourceTagFromResource { - /** - * resource id - */ - resource: number; - resourceTag: ResourceTag; +export interface InputRemoveResourceTagFromResource { + /** + * resource id + */ + resource: number; + resourceTag: ResourceTag; } - diff --git a/libs/perun/openapi/src/lib/model/inputSendMessage.ts b/libs/perun/openapi/src/lib/model/inputSendMessage.ts index e768d5b11..7253998ad 100644 --- a/libs/perun/openapi/src/lib/model/inputSendMessage.ts +++ b/libs/perun/openapi/src/lib/model/inputSendMessage.ts @@ -11,19 +11,17 @@ */ import { MailType } from './mailType'; - /** * input to sendMessage */ -export interface InputSendMessage { - mailType: MailType; - /** - * application id - */ - appId: number; - /** - * you can specify reason for case: mailType == APP_REJECTED_USER - */ - reason?: string; +export interface InputSendMessage { + mailType: MailType; + /** + * application id + */ + appId: number; + /** + * you can specify reason for case: mailType == APP_REJECTED_USER + */ + reason?: string; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetBan.ts b/libs/perun/openapi/src/lib/model/inputSetBan.ts index ced958602..44ea248dd 100644 --- a/libs/perun/openapi/src/lib/model/inputSetBan.ts +++ b/libs/perun/openapi/src/lib/model/inputSetBan.ts @@ -11,11 +11,9 @@ */ import { BanOnResource } from './banOnResource'; - /** * input to setBan */ -export interface InputSetBan { - banOnResource: BanOnResource; +export interface InputSetBan { + banOnResource: BanOnResource; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetBanForUserOnFacility.ts b/libs/perun/openapi/src/lib/model/inputSetBanForUserOnFacility.ts index fd7daeca2..ef8254b4a 100644 --- a/libs/perun/openapi/src/lib/model/inputSetBanForUserOnFacility.ts +++ b/libs/perun/openapi/src/lib/model/inputSetBanForUserOnFacility.ts @@ -11,11 +11,9 @@ */ import { BanOnFacility } from './banOnFacility'; - /** * input to setBanForUserOnFacility */ -export interface InputSetBanForUserOnFacility { - banOnFacility: BanOnFacility; +export interface InputSetBanForUserOnFacility { + banOnFacility: BanOnFacility; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetFacilityAttribute.ts b/libs/perun/openapi/src/lib/model/inputSetFacilityAttribute.ts index 93c6385a2..7bd5a2655 100644 --- a/libs/perun/openapi/src/lib/model/inputSetFacilityAttribute.ts +++ b/libs/perun/openapi/src/lib/model/inputSetFacilityAttribute.ts @@ -11,15 +11,13 @@ */ import { Attribute } from './attribute'; - /** * input to setFacilityAttribute */ -export interface InputSetFacilityAttribute { - /** - * facility id - */ - facility: number; - attribute: Attribute; +export interface InputSetFacilityAttribute { + /** + * facility id + */ + facility: number; + attribute: Attribute; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetFacilityAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetFacilityAttributes.ts index e51d31da2..ace2bfe22 100644 --- a/libs/perun/openapi/src/lib/model/inputSetFacilityAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetFacilityAttributes.ts @@ -11,15 +11,13 @@ */ import { Attribute } from './attribute'; - /** * input to setFacilityAttributes */ -export interface InputSetFacilityAttributes { - /** - * facility id - */ - facility?: number; - attributes?: Array; +export interface InputSetFacilityAttributes { + /** + * facility id + */ + facility?: number; + attributes?: Array; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetFacilityResourceGroupUserMemberAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetFacilityResourceGroupUserMemberAttributes.ts index fb3c0abe5..270f1271d 100644 --- a/libs/perun/openapi/src/lib/model/inputSetFacilityResourceGroupUserMemberAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetFacilityResourceGroupUserMemberAttributes.ts @@ -11,31 +11,29 @@ */ import { Attribute } from './attribute'; - /** * input to setFacilityResourceGroupUserMemberAttributes */ -export interface InputSetFacilityResourceGroupUserMemberAttributes { - /** - * facility id - */ - facility: number; - /** - * resource id - */ - resource: number; - /** - * group id - */ - group: number; - /** - * user id - */ - user: number; - /** - * member id - */ - member: number; - attributes: Array; +export interface InputSetFacilityResourceGroupUserMemberAttributes { + /** + * facility id + */ + facility: number; + /** + * resource id + */ + resource: number; + /** + * group id + */ + group: number; + /** + * user id + */ + user: number; + /** + * member id + */ + member: number; + attributes: Array; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetFacilityResourceUserMemberAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetFacilityResourceUserMemberAttributes.ts index a4fc36848..6d9bd8627 100644 --- a/libs/perun/openapi/src/lib/model/inputSetFacilityResourceUserMemberAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetFacilityResourceUserMemberAttributes.ts @@ -11,27 +11,25 @@ */ import { Attribute } from './attribute'; - /** * input to setFacilityResourceUserMemberAttributes */ -export interface InputSetFacilityResourceUserMemberAttributes { - /** - * facility id - */ - facility?: number; - /** - * resource id - */ - resource?: number; - /** - * user id - */ - user?: number; - /** - * member id - */ - member?: number; - attributes?: Array; +export interface InputSetFacilityResourceUserMemberAttributes { + /** + * facility id + */ + facility?: number; + /** + * resource id + */ + resource?: number; + /** + * user id + */ + user?: number; + /** + * member id + */ + member?: number; + attributes?: Array; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetFacilityUserAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetFacilityUserAttributes.ts index 11626eefc..f2f97118b 100644 --- a/libs/perun/openapi/src/lib/model/inputSetFacilityUserAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetFacilityUserAttributes.ts @@ -11,19 +11,17 @@ */ import { Attribute } from './attribute'; - /** * input to setFacilityUserAttributes */ -export interface InputSetFacilityUserAttributes { - /** - * facility id - */ - facility?: number; - /** - * user id - */ - user?: number; - attributes?: Array; +export interface InputSetFacilityUserAttributes { + /** + * facility id + */ + facility?: number; + /** + * user id + */ + user?: number; + attributes?: Array; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetGroupAttribute.ts b/libs/perun/openapi/src/lib/model/inputSetGroupAttribute.ts index d7519f325..d88b8d9f3 100644 --- a/libs/perun/openapi/src/lib/model/inputSetGroupAttribute.ts +++ b/libs/perun/openapi/src/lib/model/inputSetGroupAttribute.ts @@ -11,15 +11,13 @@ */ import { Attribute } from './attribute'; - /** * input to setGroupAttribute */ -export interface InputSetGroupAttribute { - /** - * group id - */ - group: number; - attribute: Attribute; +export interface InputSetGroupAttribute { + /** + * group id + */ + group: number; + attribute: Attribute; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetGroupAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetGroupAttributes.ts index 780445a9b..2a322d64e 100644 --- a/libs/perun/openapi/src/lib/model/inputSetGroupAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetGroupAttributes.ts @@ -11,15 +11,13 @@ */ import { Attribute } from './attribute'; - /** * input to setGroupAttributes */ -export interface InputSetGroupAttributes { - /** - * group id - */ - group: number; - attributes: Array; +export interface InputSetGroupAttributes { + /** + * group id + */ + group: number; + attributes: Array; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetGroupResourceAttribute.ts b/libs/perun/openapi/src/lib/model/inputSetGroupResourceAttribute.ts index fa6091b7b..12afe18e3 100644 --- a/libs/perun/openapi/src/lib/model/inputSetGroupResourceAttribute.ts +++ b/libs/perun/openapi/src/lib/model/inputSetGroupResourceAttribute.ts @@ -11,19 +11,17 @@ */ import { Attribute } from './attribute'; - /** * input to setGroupResourceAttribute */ -export interface InputSetGroupResourceAttribute { - /** - * group id - */ - group: number; - /** - * resource id - */ - resource: number; - attribute: Attribute; +export interface InputSetGroupResourceAttribute { + /** + * group id + */ + group: number; + /** + * resource id + */ + resource: number; + attribute: Attribute; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetGroupResourceAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetGroupResourceAttributes.ts index 5c1313dff..92f92114a 100644 --- a/libs/perun/openapi/src/lib/model/inputSetGroupResourceAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetGroupResourceAttributes.ts @@ -11,19 +11,17 @@ */ import { Attribute } from './attribute'; - /** * input to setGroupResourceAttributes */ -export interface InputSetGroupResourceAttributes { - /** - * group id - */ - group: number; - /** - * resource id - */ - resource: number; - attributes: Array; +export interface InputSetGroupResourceAttributes { + /** + * group id + */ + group: number; + /** + * resource id + */ + resource: number; + attributes: Array; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetHostAttribute.ts b/libs/perun/openapi/src/lib/model/inputSetHostAttribute.ts index 6dd109856..c98a924c2 100644 --- a/libs/perun/openapi/src/lib/model/inputSetHostAttribute.ts +++ b/libs/perun/openapi/src/lib/model/inputSetHostAttribute.ts @@ -11,15 +11,13 @@ */ import { Attribute } from './attribute'; - /** * input to setHostAttribute */ -export interface InputSetHostAttribute { - /** - * host id - */ - host: number; - attribute: Attribute; +export interface InputSetHostAttribute { + /** + * host id + */ + host: number; + attribute: Attribute; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetHostAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetHostAttributes.ts index ca1353d24..fa1513a66 100644 --- a/libs/perun/openapi/src/lib/model/inputSetHostAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetHostAttributes.ts @@ -11,15 +11,13 @@ */ import { Attribute } from './attribute'; - /** * input to setHostAttributes */ -export interface InputSetHostAttributes { - /** - * host id - */ - host: number; - attributes: Array; +export interface InputSetHostAttributes { + /** + * host id + */ + host: number; + attributes: Array; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetMemberAttribute.ts b/libs/perun/openapi/src/lib/model/inputSetMemberAttribute.ts index d9f51c613..13268bfc1 100644 --- a/libs/perun/openapi/src/lib/model/inputSetMemberAttribute.ts +++ b/libs/perun/openapi/src/lib/model/inputSetMemberAttribute.ts @@ -11,15 +11,13 @@ */ import { Attribute } from './attribute'; - /** * input to setMemberAttribute */ -export interface InputSetMemberAttribute { - /** - * member id - */ - member: number; - attribute: Attribute; +export interface InputSetMemberAttribute { + /** + * member id + */ + member: number; + attribute: Attribute; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetMemberAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetMemberAttributes.ts index ca4b162fe..9e6be43c4 100644 --- a/libs/perun/openapi/src/lib/model/inputSetMemberAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetMemberAttributes.ts @@ -11,15 +11,13 @@ */ import { Attribute } from './attribute'; - /** * input to setMemberAttributes */ -export interface InputSetMemberAttributes { - /** - * member id - */ - member: number; - attributes: Array; +export interface InputSetMemberAttributes { + /** + * member id + */ + member: number; + attributes: Array; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetMemberGroupAttribute.ts b/libs/perun/openapi/src/lib/model/inputSetMemberGroupAttribute.ts index 9d96855e0..e7e6c8c5c 100644 --- a/libs/perun/openapi/src/lib/model/inputSetMemberGroupAttribute.ts +++ b/libs/perun/openapi/src/lib/model/inputSetMemberGroupAttribute.ts @@ -11,19 +11,17 @@ */ import { Attribute } from './attribute'; - /** * input to setMemberGroupAttribute */ -export interface InputSetMemberGroupAttribute { - /** - * member id - */ - member: number; - /** - * group id - */ - group: number; - attribute: Attribute; +export interface InputSetMemberGroupAttribute { + /** + * member id + */ + member: number; + /** + * group id + */ + group: number; + attribute: Attribute; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetMemberGroupAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetMemberGroupAttributes.ts index 716bc961c..9dfd1e310 100644 --- a/libs/perun/openapi/src/lib/model/inputSetMemberGroupAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetMemberGroupAttributes.ts @@ -11,19 +11,17 @@ */ import { Attribute } from './attribute'; - /** * input to setMemberGroupAttributes */ -export interface InputSetMemberGroupAttributes { - /** - * member id - */ - member: number; - /** - * group id - */ - group: number; - attributes: Array; +export interface InputSetMemberGroupAttributes { + /** + * member id + */ + member: number; + /** + * group id + */ + group: number; + attributes: Array; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetMemberGroupWithUserAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetMemberGroupWithUserAttributes.ts index 4a7451eda..b67206633 100644 --- a/libs/perun/openapi/src/lib/model/inputSetMemberGroupWithUserAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetMemberGroupWithUserAttributes.ts @@ -11,20 +11,18 @@ */ import { Attribute } from './attribute'; - /** * input to setMemberGroupWithUserAttributes */ -export interface InputSetMemberGroupWithUserAttributes { - /** - * member id - */ - member: number; - /** - * group id - */ - group: number; - attributes: Array; - workWithUserAttributes: boolean; +export interface InputSetMemberGroupWithUserAttributes { + /** + * member id + */ + member: number; + /** + * group id + */ + group: number; + attributes: Array; + workWithUserAttributes: boolean; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetMemberResourceAndUserAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetMemberResourceAndUserAttributes.ts index f5f51f782..f7d849be2 100644 --- a/libs/perun/openapi/src/lib/model/inputSetMemberResourceAndUserAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetMemberResourceAndUserAttributes.ts @@ -11,20 +11,18 @@ */ import { Attribute } from './attribute'; - /** * input to setMemberResourceAndUserAttributes */ -export interface InputSetMemberResourceAndUserAttributes { - /** - * member id - */ - member: number; - /** - * resource id - */ - resource: number; - attributes: Array; - workWithUserAttributes: boolean; +export interface InputSetMemberResourceAndUserAttributes { + /** + * member id + */ + member: number; + /** + * resource id + */ + resource: number; + attributes: Array; + workWithUserAttributes: boolean; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetMemberResourceAttribute.ts b/libs/perun/openapi/src/lib/model/inputSetMemberResourceAttribute.ts index 52ff89b2c..25fe0882f 100644 --- a/libs/perun/openapi/src/lib/model/inputSetMemberResourceAttribute.ts +++ b/libs/perun/openapi/src/lib/model/inputSetMemberResourceAttribute.ts @@ -11,19 +11,17 @@ */ import { Attribute } from './attribute'; - /** * input to setMemberResourceAttribute */ -export interface InputSetMemberResourceAttribute { - /** - * member id - */ - member: number; - /** - * resource id - */ - resource: number; - attribute: Attribute; +export interface InputSetMemberResourceAttribute { + /** + * member id + */ + member: number; + /** + * resource id + */ + resource: number; + attribute: Attribute; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetMemberResourceAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetMemberResourceAttributes.ts index 7e66703e7..98491dcbe 100644 --- a/libs/perun/openapi/src/lib/model/inputSetMemberResourceAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetMemberResourceAttributes.ts @@ -11,19 +11,17 @@ */ import { Attribute } from './attribute'; - /** * input to setMemberResourceAttributes */ -export interface InputSetMemberResourceAttributes { - /** - * member id - */ - member: number; - /** - * resource id - */ - resource: number; - attributes: Array; +export interface InputSetMemberResourceAttributes { + /** + * member id + */ + member: number; + /** + * resource id + */ + resource: number; + attributes: Array; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetMemberWithUserAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetMemberWithUserAttributes.ts index 81bf3c2d3..4956bb814 100644 --- a/libs/perun/openapi/src/lib/model/inputSetMemberWithUserAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetMemberWithUserAttributes.ts @@ -11,16 +11,14 @@ */ import { Attribute } from './attribute'; - /** * input to setMemberWithUserAttributes */ -export interface InputSetMemberWithUserAttributes { - /** - * member id - */ - member: number; - attributes: Array; - workWithUserAttributes: boolean; +export interface InputSetMemberWithUserAttributes { + /** + * member id + */ + member: number; + attributes: Array; + workWithUserAttributes: boolean; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetResourceAttribute.ts b/libs/perun/openapi/src/lib/model/inputSetResourceAttribute.ts index c45d13904..d56ed02ca 100644 --- a/libs/perun/openapi/src/lib/model/inputSetResourceAttribute.ts +++ b/libs/perun/openapi/src/lib/model/inputSetResourceAttribute.ts @@ -11,15 +11,13 @@ */ import { Attribute } from './attribute'; - /** * input to setResourceAttribute */ -export interface InputSetResourceAttribute { - /** - * resource id - */ - resource: number; - attribute: Attribute; +export interface InputSetResourceAttribute { + /** + * resource id + */ + resource: number; + attribute: Attribute; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetResourceAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetResourceAttributes.ts index 52a58cfdf..896f6557c 100644 --- a/libs/perun/openapi/src/lib/model/inputSetResourceAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetResourceAttributes.ts @@ -11,15 +11,13 @@ */ import { Attribute } from './attribute'; - /** * input to setResourceAttributes */ -export interface InputSetResourceAttributes { - /** - * resource id - */ - resource: number; - attributes: Array; +export interface InputSetResourceAttributes { + /** + * resource id + */ + resource: number; + attributes: Array; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetResourceGroupAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetResourceGroupAttributes.ts index e152d4ddc..5087ebaa3 100644 --- a/libs/perun/openapi/src/lib/model/inputSetResourceGroupAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetResourceGroupAttributes.ts @@ -11,19 +11,17 @@ */ import { Attribute } from './attribute'; - /** * input to setResourceGroupAttributes */ -export interface InputSetResourceGroupAttributes { - /** - * resource id - */ - resource: number; - /** - * group id - */ - group: number; - attributes: Array; +export interface InputSetResourceGroupAttributes { + /** + * resource id + */ + resource: number; + /** + * group id + */ + group: number; + attributes: Array; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetResourceGroupWithGroupAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetResourceGroupWithGroupAttributes.ts index a40f34914..f43cb58cf 100644 --- a/libs/perun/openapi/src/lib/model/inputSetResourceGroupWithGroupAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetResourceGroupWithGroupAttributes.ts @@ -11,20 +11,18 @@ */ import { Attribute } from './attribute'; - /** * input to setResourceGroupWithGroupAttributes */ -export interface InputSetResourceGroupWithGroupAttributes { - /** - * resource id - */ - resource: number; - /** - * group id - */ - group: number; - attributes: Array; - workWithGroupAttributes: boolean; +export interface InputSetResourceGroupWithGroupAttributes { + /** + * resource id + */ + resource: number; + /** + * group id + */ + group: number; + attributes: Array; + workWithGroupAttributes: boolean; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetSendingEnabled.ts b/libs/perun/openapi/src/lib/model/inputSetSendingEnabled.ts index 4df1660da..3b4659814 100644 --- a/libs/perun/openapi/src/lib/model/inputSetSendingEnabled.ts +++ b/libs/perun/openapi/src/lib/model/inputSetSendingEnabled.ts @@ -11,12 +11,10 @@ */ import { ApplicationMail } from './applicationMail'; - /** * input to setSendingEnabled */ -export interface InputSetSendingEnabled { - mails: Array; - enabled: boolean; +export interface InputSetSendingEnabled { + mails: Array; + enabled: boolean; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetSponsoredMember.ts b/libs/perun/openapi/src/lib/model/inputSetSponsoredMember.ts index 44ae7b57e..ab6cc7d5b 100644 --- a/libs/perun/openapi/src/lib/model/inputSetSponsoredMember.ts +++ b/libs/perun/openapi/src/lib/model/inputSetSponsoredMember.ts @@ -10,16 +10,14 @@ * Do not edit the class manually. */ - /** * input for setSponsoredMember */ -export interface InputSetSponsoredMember { - userToBeSponsored: number; - password: string; - vo: number; - sponsor?: number; - namespace: string; - validityTo?: string; +export interface InputSetSponsoredMember { + userToBeSponsored: number; + password: string; + vo: number; + sponsor?: number; + namespace: string; + validityTo?: string; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetUserAttribute.ts b/libs/perun/openapi/src/lib/model/inputSetUserAttribute.ts index c8f74e462..c9af1143f 100644 --- a/libs/perun/openapi/src/lib/model/inputSetUserAttribute.ts +++ b/libs/perun/openapi/src/lib/model/inputSetUserAttribute.ts @@ -11,15 +11,13 @@ */ import { Attribute } from './attribute'; - /** * input to setUserAttribute */ -export interface InputSetUserAttribute { - /** - * user id - */ - user: number; - attribute: Attribute; +export interface InputSetUserAttribute { + /** + * user id + */ + user: number; + attribute: Attribute; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetUserAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetUserAttributes.ts index 5b3094807..65b08a735 100644 --- a/libs/perun/openapi/src/lib/model/inputSetUserAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetUserAttributes.ts @@ -11,15 +11,13 @@ */ import { Attribute } from './attribute'; - /** * input to setUserAttributes */ -export interface InputSetUserAttributes { - /** - * user id - */ - user: number; - attributes: Array; +export interface InputSetUserAttributes { + /** + * user id + */ + user: number; + attributes: Array; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetUserExtSourceAttribute.ts b/libs/perun/openapi/src/lib/model/inputSetUserExtSourceAttribute.ts index 7dfea29a9..fc65be09a 100644 --- a/libs/perun/openapi/src/lib/model/inputSetUserExtSourceAttribute.ts +++ b/libs/perun/openapi/src/lib/model/inputSetUserExtSourceAttribute.ts @@ -11,15 +11,13 @@ */ import { Attribute } from './attribute'; - /** * input to setUserExtSourceAttribute */ -export interface InputSetUserExtSourceAttribute { - /** - * userExtSource id - */ - userExtSource: number; - attribute: Attribute; +export interface InputSetUserExtSourceAttribute { + /** + * userExtSource id + */ + userExtSource: number; + attribute: Attribute; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetUserExtSourceAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetUserExtSourceAttributes.ts index ad80db720..ef70e6325 100644 --- a/libs/perun/openapi/src/lib/model/inputSetUserExtSourceAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetUserExtSourceAttributes.ts @@ -11,15 +11,13 @@ */ import { Attribute } from './attribute'; - /** * input to setUserExtSourceAttributes */ -export interface InputSetUserExtSourceAttributes { - /** - * userExtSource id - */ - userExtSource: number; - attributes: Array; +export interface InputSetUserExtSourceAttributes { + /** + * userExtSource id + */ + userExtSource: number; + attributes: Array; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetUserFacilityAttribute.ts b/libs/perun/openapi/src/lib/model/inputSetUserFacilityAttribute.ts index f89cb0ca6..34310cde6 100644 --- a/libs/perun/openapi/src/lib/model/inputSetUserFacilityAttribute.ts +++ b/libs/perun/openapi/src/lib/model/inputSetUserFacilityAttribute.ts @@ -11,19 +11,17 @@ */ import { Attribute } from './attribute'; - /** * input to setUserFacilityAttribute */ -export interface InputSetUserFacilityAttribute { - /** - * user id - */ - user: number; - /** - * facility id - */ - facility: number; - attribute: Attribute; +export interface InputSetUserFacilityAttribute { + /** + * user id + */ + user: number; + /** + * facility id + */ + facility: number; + attribute: Attribute; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetUserFacilityAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetUserFacilityAttributes.ts index 689b866fe..e2a647937 100644 --- a/libs/perun/openapi/src/lib/model/inputSetUserFacilityAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetUserFacilityAttributes.ts @@ -11,19 +11,17 @@ */ import { Attribute } from './attribute'; - /** * input to setUserFacilityAttributes */ -export interface InputSetUserFacilityAttributes { - /** - * user id - */ - user: number; - /** - * facility id - */ - facility: number; - attributes: Array; +export interface InputSetUserFacilityAttributes { + /** + * user id + */ + user: number; + /** + * facility id + */ + facility: number; + attributes: Array; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetVoAttribute.ts b/libs/perun/openapi/src/lib/model/inputSetVoAttribute.ts index 2a23dc153..d4252ce5c 100644 --- a/libs/perun/openapi/src/lib/model/inputSetVoAttribute.ts +++ b/libs/perun/openapi/src/lib/model/inputSetVoAttribute.ts @@ -11,15 +11,13 @@ */ import { Attribute } from './attribute'; - /** * input to setVoAttribute */ -export interface InputSetVoAttribute { - /** - * vo id - */ - vo: number; - attribute: Attribute; +export interface InputSetVoAttribute { + /** + * vo id + */ + vo: number; + attribute: Attribute; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetVoAttributes.ts b/libs/perun/openapi/src/lib/model/inputSetVoAttributes.ts index 22ecf09f9..0647aa6fa 100644 --- a/libs/perun/openapi/src/lib/model/inputSetVoAttributes.ts +++ b/libs/perun/openapi/src/lib/model/inputSetVoAttributes.ts @@ -11,15 +11,13 @@ */ import { Attribute } from './attribute'; - /** * input to setVoAttributes */ -export interface InputSetVoAttributes { - /** - * vo id - */ - vo?: number; - attributes?: Array; +export interface InputSetVoAttributes { + /** + * vo id + */ + vo?: number; + attributes?: Array; } - diff --git a/libs/perun/openapi/src/lib/model/inputSetVoBan.ts b/libs/perun/openapi/src/lib/model/inputSetVoBan.ts index da9d64da6..4fd1afc82 100644 --- a/libs/perun/openapi/src/lib/model/inputSetVoBan.ts +++ b/libs/perun/openapi/src/lib/model/inputSetVoBan.ts @@ -11,11 +11,9 @@ */ import { BanOnVo } from './banOnVo'; - /** * input to set vo ban */ -export interface InputSetVoBan { - banOnVo: BanOnVo; +export interface InputSetVoBan { + banOnVo: BanOnVo; } - diff --git a/libs/perun/openapi/src/lib/model/inputSpecificMember.ts b/libs/perun/openapi/src/lib/model/inputSpecificMember.ts index b708f4ab3..b6f040327 100644 --- a/libs/perun/openapi/src/lib/model/inputSpecificMember.ts +++ b/libs/perun/openapi/src/lib/model/inputSpecificMember.ts @@ -12,14 +12,12 @@ import { Candidate } from './candidate'; import { User } from './user'; - /** * input to createSpecificMember */ -export interface InputSpecificMember { - candidate: Candidate; - vo: number; - specificUserType: string; - specificUserOwners: Array; +export interface InputSpecificMember { + candidate: Candidate; + vo: number; + specificUserType: string; + specificUserOwners: Array; } - diff --git a/libs/perun/openapi/src/lib/model/inputSubmitApplication.ts b/libs/perun/openapi/src/lib/model/inputSubmitApplication.ts index f8ab2f173..cc633f47e 100644 --- a/libs/perun/openapi/src/lib/model/inputSubmitApplication.ts +++ b/libs/perun/openapi/src/lib/model/inputSubmitApplication.ts @@ -12,12 +12,10 @@ import { ApplicationFormItemData } from './applicationFormItemData'; import { Application } from './application'; - /** * input to submitApplication */ -export interface InputSubmitApplication { - app: Application; - data: Array; +export interface InputSubmitApplication { + app: Application; + data: Array; } - diff --git a/libs/perun/openapi/src/lib/model/inputUpdateApplicationMail.ts b/libs/perun/openapi/src/lib/model/inputUpdateApplicationMail.ts index 886faa667..39d7c518d 100644 --- a/libs/perun/openapi/src/lib/model/inputUpdateApplicationMail.ts +++ b/libs/perun/openapi/src/lib/model/inputUpdateApplicationMail.ts @@ -11,11 +11,9 @@ */ import { ApplicationMail } from './applicationMail'; - /** * input to updateApplicationMail */ -export interface InputUpdateApplicationMail { - mail: ApplicationMail; +export interface InputUpdateApplicationMail { + mail: ApplicationMail; } - diff --git a/libs/perun/openapi/src/lib/model/inputUpdateBan.ts b/libs/perun/openapi/src/lib/model/inputUpdateBan.ts index 42f0fd934..66ed0fddd 100644 --- a/libs/perun/openapi/src/lib/model/inputUpdateBan.ts +++ b/libs/perun/openapi/src/lib/model/inputUpdateBan.ts @@ -11,11 +11,9 @@ */ import { BanOnResource } from './banOnResource'; - /** * input to updateBan */ -export interface InputUpdateBan { - banOnResource: BanOnResource; +export interface InputUpdateBan { + banOnResource: BanOnResource; } - diff --git a/libs/perun/openapi/src/lib/model/inputUpdateBanForFacility.ts b/libs/perun/openapi/src/lib/model/inputUpdateBanForFacility.ts index 3c7be2475..db622bb99 100644 --- a/libs/perun/openapi/src/lib/model/inputUpdateBanForFacility.ts +++ b/libs/perun/openapi/src/lib/model/inputUpdateBanForFacility.ts @@ -11,11 +11,9 @@ */ import { BanOnFacility } from './banOnFacility'; - /** * input to updateBanForFacility */ -export interface InputUpdateBanForFacility { - banOnFacility: BanOnFacility; +export interface InputUpdateBanForFacility { + banOnFacility: BanOnFacility; } - diff --git a/libs/perun/openapi/src/lib/model/inputUpdateCategory.ts b/libs/perun/openapi/src/lib/model/inputUpdateCategory.ts index ebb032fe5..b6e64c5fc 100644 --- a/libs/perun/openapi/src/lib/model/inputUpdateCategory.ts +++ b/libs/perun/openapi/src/lib/model/inputUpdateCategory.ts @@ -11,11 +11,9 @@ */ import { Category } from './category'; - /** * input to updateCategory */ -export interface InputUpdateCategory { - category: Category; +export interface InputUpdateCategory { + category: Category; } - diff --git a/libs/perun/openapi/src/lib/model/inputUpdateFacility.ts b/libs/perun/openapi/src/lib/model/inputUpdateFacility.ts index a68e27103..7b1986070 100644 --- a/libs/perun/openapi/src/lib/model/inputUpdateFacility.ts +++ b/libs/perun/openapi/src/lib/model/inputUpdateFacility.ts @@ -11,11 +11,9 @@ */ import { Facility } from './facility'; - /** * input to updateFacility */ -export interface InputUpdateFacility { - facility: Facility; +export interface InputUpdateFacility { + facility: Facility; } - diff --git a/libs/perun/openapi/src/lib/model/inputUpdateForm.ts b/libs/perun/openapi/src/lib/model/inputUpdateForm.ts index 2cb7afa10..a48d5c81e 100644 --- a/libs/perun/openapi/src/lib/model/inputUpdateForm.ts +++ b/libs/perun/openapi/src/lib/model/inputUpdateForm.ts @@ -11,11 +11,9 @@ */ import { ApplicationForm } from './applicationForm'; - /** * input to updateForm */ -export interface InputUpdateForm { - form?: ApplicationForm; +export interface InputUpdateForm { + form?: ApplicationForm; } - diff --git a/libs/perun/openapi/src/lib/model/inputUpdateFormItemsForGroup.ts b/libs/perun/openapi/src/lib/model/inputUpdateFormItemsForGroup.ts index e2c8fe45c..0104f6011 100644 --- a/libs/perun/openapi/src/lib/model/inputUpdateFormItemsForGroup.ts +++ b/libs/perun/openapi/src/lib/model/inputUpdateFormItemsForGroup.ts @@ -11,15 +11,13 @@ */ import { ApplicationFormItem } from './applicationFormItem'; - /** * input to updateFormItemsForGroup */ -export interface InputUpdateFormItemsForGroup { - /** - * group id - */ - group?: number; - items?: Array; +export interface InputUpdateFormItemsForGroup { + /** + * group id + */ + group?: number; + items?: Array; } - diff --git a/libs/perun/openapi/src/lib/model/inputUpdateFormItemsForVo.ts b/libs/perun/openapi/src/lib/model/inputUpdateFormItemsForVo.ts index 62c20c4d9..ee9d4f3a5 100644 --- a/libs/perun/openapi/src/lib/model/inputUpdateFormItemsForVo.ts +++ b/libs/perun/openapi/src/lib/model/inputUpdateFormItemsForVo.ts @@ -11,15 +11,13 @@ */ import { ApplicationFormItem } from './applicationFormItem'; - /** * input to updateFormItemsForVo */ -export interface InputUpdateFormItemsForVo { - /** - * vo id - */ - vo?: number; - items?: Array; +export interface InputUpdateFormItemsForVo { + /** + * vo id + */ + vo?: number; + items?: Array; } - diff --git a/libs/perun/openapi/src/lib/model/inputUpdateGroup.ts b/libs/perun/openapi/src/lib/model/inputUpdateGroup.ts index c9d9364cc..46df42302 100644 --- a/libs/perun/openapi/src/lib/model/inputUpdateGroup.ts +++ b/libs/perun/openapi/src/lib/model/inputUpdateGroup.ts @@ -11,11 +11,9 @@ */ import { Group } from './group'; - /** * input to updateGroup */ -export interface InputUpdateGroup { - group: Group; +export interface InputUpdateGroup { + group: Group; } - diff --git a/libs/perun/openapi/src/lib/model/inputUpdatePublication.ts b/libs/perun/openapi/src/lib/model/inputUpdatePublication.ts index e43ef62d2..9b90a41db 100644 --- a/libs/perun/openapi/src/lib/model/inputUpdatePublication.ts +++ b/libs/perun/openapi/src/lib/model/inputUpdatePublication.ts @@ -11,11 +11,9 @@ */ import { Publication } from './publication'; - /** * input to updatePublication */ -export interface InputUpdatePublication { - publication: Publication; +export interface InputUpdatePublication { + publication: Publication; } - diff --git a/libs/perun/openapi/src/lib/model/inputUpdatePublicationSystem.ts b/libs/perun/openapi/src/lib/model/inputUpdatePublicationSystem.ts index 6e4aaa3a6..ec23d78c4 100644 --- a/libs/perun/openapi/src/lib/model/inputUpdatePublicationSystem.ts +++ b/libs/perun/openapi/src/lib/model/inputUpdatePublicationSystem.ts @@ -11,11 +11,9 @@ */ import { PublicationSystem } from './publicationSystem'; - /** * input to updatePublicationSystem */ -export interface InputUpdatePublicationSystem { - pubsys: PublicationSystem; +export interface InputUpdatePublicationSystem { + pubsys: PublicationSystem; } - diff --git a/libs/perun/openapi/src/lib/model/inputUpdateResource.ts b/libs/perun/openapi/src/lib/model/inputUpdateResource.ts index c127b7da1..bcceacfdb 100644 --- a/libs/perun/openapi/src/lib/model/inputUpdateResource.ts +++ b/libs/perun/openapi/src/lib/model/inputUpdateResource.ts @@ -11,11 +11,9 @@ */ import { Resource } from './resource'; - /** * input to updateResource */ -export interface InputUpdateResource { - resource: Resource; +export interface InputUpdateResource { + resource: Resource; } - diff --git a/libs/perun/openapi/src/lib/model/inputUpdateResourceTag.ts b/libs/perun/openapi/src/lib/model/inputUpdateResourceTag.ts index 64287879f..c6c893159 100644 --- a/libs/perun/openapi/src/lib/model/inputUpdateResourceTag.ts +++ b/libs/perun/openapi/src/lib/model/inputUpdateResourceTag.ts @@ -11,11 +11,9 @@ */ import { ResourceTag } from './resourceTag'; - /** * input to updateResourceTag */ -export interface InputUpdateResourceTag { - resourceTag: ResourceTag; +export interface InputUpdateResourceTag { + resourceTag: ResourceTag; } - diff --git a/libs/perun/openapi/src/lib/model/inputUpdateService.ts b/libs/perun/openapi/src/lib/model/inputUpdateService.ts index 7e8007bd4..238ea79a6 100644 --- a/libs/perun/openapi/src/lib/model/inputUpdateService.ts +++ b/libs/perun/openapi/src/lib/model/inputUpdateService.ts @@ -11,11 +11,9 @@ */ import { Service } from './service'; - /** * input to updateService */ -export interface InputUpdateService { - service: Service; +export interface InputUpdateService { + service: Service; } - diff --git a/libs/perun/openapi/src/lib/model/inputUpdateServicesPackage.ts b/libs/perun/openapi/src/lib/model/inputUpdateServicesPackage.ts index f70f94deb..bbf03eda5 100644 --- a/libs/perun/openapi/src/lib/model/inputUpdateServicesPackage.ts +++ b/libs/perun/openapi/src/lib/model/inputUpdateServicesPackage.ts @@ -11,11 +11,9 @@ */ import { ServicesPackage } from './servicesPackage'; - /** * Input to updateServicesPackage */ -export interface InputUpdateServicesPackage { - servicesPackage: ServicesPackage; +export interface InputUpdateServicesPackage { + servicesPackage: ServicesPackage; } - diff --git a/libs/perun/openapi/src/lib/model/inputUpdateUser.ts b/libs/perun/openapi/src/lib/model/inputUpdateUser.ts index e9c51a232..5c9e5421b 100644 --- a/libs/perun/openapi/src/lib/model/inputUpdateUser.ts +++ b/libs/perun/openapi/src/lib/model/inputUpdateUser.ts @@ -11,11 +11,9 @@ */ import { User } from './user'; - /** * input to updateUser */ -export interface InputUpdateUser { - user: User; +export interface InputUpdateUser { + user: User; } - diff --git a/libs/perun/openapi/src/lib/model/inputUpdateVo.ts b/libs/perun/openapi/src/lib/model/inputUpdateVo.ts index 32ee5bf03..a40d155f9 100644 --- a/libs/perun/openapi/src/lib/model/inputUpdateVo.ts +++ b/libs/perun/openapi/src/lib/model/inputUpdateVo.ts @@ -11,11 +11,9 @@ */ import { Vo } from './vo'; - /** * input to updateVo */ -export interface InputUpdateVo { - vo: Vo; +export interface InputUpdateVo { + vo: Vo; } - diff --git a/libs/perun/openapi/src/lib/model/itemTexts.ts b/libs/perun/openapi/src/lib/model/itemTexts.ts index 92cc1e5d1..9b0d27041 100644 --- a/libs/perun/openapi/src/lib/model/itemTexts.ts +++ b/libs/perun/openapi/src/lib/model/itemTexts.ts @@ -10,12 +10,10 @@ * Do not edit the class manually. */ - -export interface ItemTexts { - locale?: string; - label?: string; - options?: string; - help?: string; - errorMessage?: string; +export interface ItemTexts { + locale?: string; + label?: string; + options?: string; + help?: string; + errorMessage?: string; } - diff --git a/libs/perun/openapi/src/lib/model/mailText.ts b/libs/perun/openapi/src/lib/model/mailText.ts index 2de30b5b7..84474f787 100644 --- a/libs/perun/openapi/src/lib/model/mailText.ts +++ b/libs/perun/openapi/src/lib/model/mailText.ts @@ -10,10 +10,8 @@ * Do not edit the class manually. */ - -export interface MailText { - locale?: string; - subject?: string; - text?: string; +export interface MailText { + locale?: string; + subject?: string; + text?: string; } - diff --git a/libs/perun/openapi/src/lib/model/mailType.ts b/libs/perun/openapi/src/lib/model/mailType.ts index 220053ffb..7ff132405 100644 --- a/libs/perun/openapi/src/lib/model/mailType.ts +++ b/libs/perun/openapi/src/lib/model/mailType.ts @@ -10,17 +10,23 @@ * Do not edit the class manually. */ - -export type MailType = 'APP_CREATED_USER' | 'APPROVABLE_GROUP_APP_USER' | 'APP_CREATED_VO_ADMIN' | 'MAIL_VALIDATION' | 'APP_APPROVED_USER' | 'APP_REJECTED_USER' | 'APP_ERROR_VO_ADMIN' | 'USER_INVITE'; +export type MailType = + | 'APP_CREATED_USER' + | 'APPROVABLE_GROUP_APP_USER' + | 'APP_CREATED_VO_ADMIN' + | 'MAIL_VALIDATION' + | 'APP_APPROVED_USER' + | 'APP_REJECTED_USER' + | 'APP_ERROR_VO_ADMIN' + | 'USER_INVITE'; export const MailType = { - APPCREATEDUSER: 'APP_CREATED_USER' as MailType, - APPROVABLEGROUPAPPUSER: 'APPROVABLE_GROUP_APP_USER' as MailType, - APPCREATEDVOADMIN: 'APP_CREATED_VO_ADMIN' as MailType, - MAILVALIDATION: 'MAIL_VALIDATION' as MailType, - APPAPPROVEDUSER: 'APP_APPROVED_USER' as MailType, - APPREJECTEDUSER: 'APP_REJECTED_USER' as MailType, - APPERRORVOADMIN: 'APP_ERROR_VO_ADMIN' as MailType, - USERINVITE: 'USER_INVITE' as MailType + APPCREATEDUSER: 'APP_CREATED_USER' as MailType, + APPROVABLEGROUPAPPUSER: 'APPROVABLE_GROUP_APP_USER' as MailType, + APPCREATEDVOADMIN: 'APP_CREATED_VO_ADMIN' as MailType, + MAILVALIDATION: 'MAIL_VALIDATION' as MailType, + APPAPPROVEDUSER: 'APP_APPROVED_USER' as MailType, + APPREJECTEDUSER: 'APP_REJECTED_USER' as MailType, + APPERRORVOADMIN: 'APP_ERROR_VO_ADMIN' as MailType, + USERINVITE: 'USER_INVITE' as MailType, }; - diff --git a/libs/perun/openapi/src/lib/model/member.ts b/libs/perun/openapi/src/lib/model/member.ts index 7475cbae8..fb431551a 100644 --- a/libs/perun/openapi/src/lib/model/member.ts +++ b/libs/perun/openapi/src/lib/model/member.ts @@ -11,15 +11,13 @@ */ import { Auditable } from './auditable'; - -export interface Member extends Auditable { - userId?: number; - voId?: number; - status?: string; - membershipType?: string; - sourceGroupId?: number | null; - sponsored?: boolean; - groupStatus?: string; - groupStatuses?: { [key: string]: string; }; +export interface Member extends Auditable { + userId?: number; + voId?: number; + status?: string; + membershipType?: string; + sourceGroupId?: number | null; + sponsored?: boolean; + groupStatus?: string; + groupStatuses?: { [key: string]: string }; } - diff --git a/libs/perun/openapi/src/lib/model/memberCandidate.ts b/libs/perun/openapi/src/lib/model/memberCandidate.ts index 0b6df396b..a1b911b83 100644 --- a/libs/perun/openapi/src/lib/model/memberCandidate.ts +++ b/libs/perun/openapi/src/lib/model/memberCandidate.ts @@ -13,10 +13,8 @@ import { Candidate } from './candidate'; import { RichUser } from './richUser'; import { Member } from './member'; - -export interface MemberCandidate { - candidate?: Candidate; - member?: Member; - richUser?: RichUser; +export interface MemberCandidate { + candidate?: Candidate; + member?: Member; + richUser?: RichUser; } - diff --git a/libs/perun/openapi/src/lib/model/memberGroupStatus.ts b/libs/perun/openapi/src/lib/model/memberGroupStatus.ts index 829617d4b..5bbe2784a 100644 --- a/libs/perun/openapi/src/lib/model/memberGroupStatus.ts +++ b/libs/perun/openapi/src/lib/model/memberGroupStatus.ts @@ -10,14 +10,12 @@ * Do not edit the class manually. */ - /** * statuses of a member in a group */ export type MemberGroupStatus = 'VALID' | 'EXPIRED'; export const MemberGroupStatus = { - VALID: 'VALID' as MemberGroupStatus, - EXPIRED: 'EXPIRED' as MemberGroupStatus + VALID: 'VALID' as MemberGroupStatus, + EXPIRED: 'EXPIRED' as MemberGroupStatus, }; - diff --git a/libs/perun/openapi/src/lib/model/memberWithSponsors.ts b/libs/perun/openapi/src/lib/model/memberWithSponsors.ts index dd5ccf7fc..95aa63e35 100644 --- a/libs/perun/openapi/src/lib/model/memberWithSponsors.ts +++ b/libs/perun/openapi/src/lib/model/memberWithSponsors.ts @@ -12,9 +12,7 @@ import { Sponsor } from './sponsor'; import { RichMember } from './richMember'; - -export interface MemberWithSponsors { - member?: RichMember; - sponsors?: Array; +export interface MemberWithSponsors { + member?: RichMember; + sponsors?: Array; } - diff --git a/libs/perun/openapi/src/lib/model/membersOrderColumn.ts b/libs/perun/openapi/src/lib/model/membersOrderColumn.ts index f0154783d..c6ba04e91 100644 --- a/libs/perun/openapi/src/lib/model/membersOrderColumn.ts +++ b/libs/perun/openapi/src/lib/model/membersOrderColumn.ts @@ -10,11 +10,9 @@ * Do not edit the class manually. */ - export type MembersOrderColumn = 'ID' | 'NAME'; export const MembersOrderColumn = { - ID: 'ID' as MembersOrderColumn, - NAME: 'NAME' as MembersOrderColumn + ID: 'ID' as MembersOrderColumn, + NAME: 'NAME' as MembersOrderColumn, }; - diff --git a/libs/perun/openapi/src/lib/model/membersPageQuery.ts b/libs/perun/openapi/src/lib/model/membersPageQuery.ts index 24c123fa4..2f9bb45d3 100644 --- a/libs/perun/openapi/src/lib/model/membersPageQuery.ts +++ b/libs/perun/openapi/src/lib/model/membersPageQuery.ts @@ -14,15 +14,13 @@ import { VoMemberStatuses } from './voMemberStatuses'; import { SortingOrder } from './sortingOrder'; import { MemberGroupStatus } from './memberGroupStatus'; - -export interface MembersPageQuery { - pageSize: number; - offset: number; - order: SortingOrder; - sortColumn: MembersOrderColumn; - searchString?: string; - statuses?: Array; - groupId?: number; - groupStatuses?: Array; +export interface MembersPageQuery { + pageSize: number; + offset: number; + order: SortingOrder; + sortColumn: MembersOrderColumn; + searchString?: string; + statuses?: Array; + groupId?: number; + groupStatuses?: Array; } - diff --git a/libs/perun/openapi/src/lib/model/namespaceRules.ts b/libs/perun/openapi/src/lib/model/namespaceRules.ts index 643074177..28668899d 100644 --- a/libs/perun/openapi/src/lib/model/namespaceRules.ts +++ b/libs/perun/openapi/src/lib/model/namespaceRules.ts @@ -10,14 +10,12 @@ * Do not edit the class manually. */ - -export interface NamespaceRules { - defaultEmail?: string; - csvGenHeader?: string; - csvGenPlaceholder?: string; - csvGenHeaderDescription?: string; - namespaceName: string; - requiredAttributes?: Array; - optionalAttributes?: Array; +export interface NamespaceRules { + defaultEmail?: string; + csvGenHeader?: string; + csvGenPlaceholder?: string; + csvGenHeaderDescription?: string; + namespaceName: string; + requiredAttributes?: Array; + optionalAttributes?: Array; } - diff --git a/libs/perun/openapi/src/lib/model/newApps.ts b/libs/perun/openapi/src/lib/model/newApps.ts index 961763e0c..cf4ed3c8f 100644 --- a/libs/perun/openapi/src/lib/model/newApps.ts +++ b/libs/perun/openapi/src/lib/model/newApps.ts @@ -10,11 +10,9 @@ * Do not edit the class manually. */ - -export interface NewApps { - admin?: string; - profile?: string; - pwdReset?: string; - publications?: string; +export interface NewApps { + admin?: string; + profile?: string; + pwdReset?: string; + publications?: string; } - diff --git a/libs/perun/openapi/src/lib/model/owner.ts b/libs/perun/openapi/src/lib/model/owner.ts index 84e5b8eee..4d203d1c9 100644 --- a/libs/perun/openapi/src/lib/model/owner.ts +++ b/libs/perun/openapi/src/lib/model/owner.ts @@ -11,18 +11,15 @@ */ import { Auditable } from './auditable'; - -export interface Owner extends Auditable { - name?: string; - contact?: string; - type?: Owner.TypeEnum; +export interface Owner extends Auditable { + name?: string; + contact?: string; + type?: Owner.TypeEnum; } export namespace Owner { - export type TypeEnum = 'technical' | 'administrative'; - export const TypeEnum = { - Technical: 'technical' as TypeEnum, - Administrative: 'administrative' as TypeEnum - }; + export type TypeEnum = 'technical' | 'administrative'; + export const TypeEnum = { + Technical: 'technical' as TypeEnum, + Administrative: 'administrative' as TypeEnum, + }; } - - diff --git a/libs/perun/openapi/src/lib/model/paginatedAuditMessages.ts b/libs/perun/openapi/src/lib/model/paginatedAuditMessages.ts index e82e0e44c..d0279a21e 100644 --- a/libs/perun/openapi/src/lib/model/paginatedAuditMessages.ts +++ b/libs/perun/openapi/src/lib/model/paginatedAuditMessages.ts @@ -11,11 +11,9 @@ */ import { AuditMessage } from './auditMessage'; - -export interface PaginatedAuditMessages { - offset: number; - pageSize: number; - totalCount: number; - data: Array; +export interface PaginatedAuditMessages { + offset: number; + pageSize: number; + totalCount: number; + data: Array; } - diff --git a/libs/perun/openapi/src/lib/model/paginatedRichApplications.ts b/libs/perun/openapi/src/lib/model/paginatedRichApplications.ts index ac89922b4..a6a1f7f13 100644 --- a/libs/perun/openapi/src/lib/model/paginatedRichApplications.ts +++ b/libs/perun/openapi/src/lib/model/paginatedRichApplications.ts @@ -11,11 +11,9 @@ */ import { RichApplication } from './richApplication'; - -export interface PaginatedRichApplications { - offset: number; - pageSize: number; - totalCount: number; - data: Array; +export interface PaginatedRichApplications { + offset: number; + pageSize: number; + totalCount: number; + data: Array; } - diff --git a/libs/perun/openapi/src/lib/model/paginatedRichGroups.ts b/libs/perun/openapi/src/lib/model/paginatedRichGroups.ts index a380f490f..c4b160ab7 100644 --- a/libs/perun/openapi/src/lib/model/paginatedRichGroups.ts +++ b/libs/perun/openapi/src/lib/model/paginatedRichGroups.ts @@ -11,11 +11,9 @@ */ import { RichGroup } from './richGroup'; - -export interface PaginatedRichGroups { - offset: number; - pageSize: number; - totalCount: number; - data: Array; +export interface PaginatedRichGroups { + offset: number; + pageSize: number; + totalCount: number; + data: Array; } - diff --git a/libs/perun/openapi/src/lib/model/paginatedRichMembers.ts b/libs/perun/openapi/src/lib/model/paginatedRichMembers.ts index 42c9e0557..fea0dfd26 100644 --- a/libs/perun/openapi/src/lib/model/paginatedRichMembers.ts +++ b/libs/perun/openapi/src/lib/model/paginatedRichMembers.ts @@ -11,11 +11,9 @@ */ import { RichMember } from './richMember'; - -export interface PaginatedRichMembers { - offset: number; - pageSize: number; - totalCount: number; - data: Array; +export interface PaginatedRichMembers { + offset: number; + pageSize: number; + totalCount: number; + data: Array; } - diff --git a/libs/perun/openapi/src/lib/model/paginatedRichUsers.ts b/libs/perun/openapi/src/lib/model/paginatedRichUsers.ts index 4b4819616..5b6e2d347 100644 --- a/libs/perun/openapi/src/lib/model/paginatedRichUsers.ts +++ b/libs/perun/openapi/src/lib/model/paginatedRichUsers.ts @@ -11,11 +11,9 @@ */ import { RichUser } from './richUser'; - -export interface PaginatedRichUsers { - offset: number; - pageSize: number; - totalCount: number; - data: Array; +export interface PaginatedRichUsers { + offset: number; + pageSize: number; + totalCount: number; + data: Array; } - diff --git a/libs/perun/openapi/src/lib/model/perunAppsConfig.ts b/libs/perun/openapi/src/lib/model/perunAppsConfig.ts index 5268f4645..fe513768a 100644 --- a/libs/perun/openapi/src/lib/model/perunAppsConfig.ts +++ b/libs/perun/openapi/src/lib/model/perunAppsConfig.ts @@ -11,8 +11,6 @@ */ import { Brand } from './brand'; - -export interface PerunAppsConfig { - brands?: Array; +export interface PerunAppsConfig { + brands?: Array; } - diff --git a/libs/perun/openapi/src/lib/model/perunBean.ts b/libs/perun/openapi/src/lib/model/perunBean.ts index ee2164e96..4931d80a3 100644 --- a/libs/perun/openapi/src/lib/model/perunBean.ts +++ b/libs/perun/openapi/src/lib/model/perunBean.ts @@ -10,9 +10,7 @@ * Do not edit the class manually. */ - -export interface PerunBean { - id: number; - beanName: string; +export interface PerunBean { + id: number; + beanName: string; } - diff --git a/libs/perun/openapi/src/lib/model/perunException.ts b/libs/perun/openapi/src/lib/model/perunException.ts index 2fa67c1c7..226297f68 100644 --- a/libs/perun/openapi/src/lib/model/perunException.ts +++ b/libs/perun/openapi/src/lib/model/perunException.ts @@ -10,10 +10,8 @@ * Do not edit the class manually. */ - -export interface PerunException { - errorId?: string; - name?: string; - message?: string; +export interface PerunException { + errorId?: string; + name?: string; + message?: string; } - diff --git a/libs/perun/openapi/src/lib/model/perunPolicy.ts b/libs/perun/openapi/src/lib/model/perunPolicy.ts index 6a3f7bdac..b8922a2bb 100644 --- a/libs/perun/openapi/src/lib/model/perunPolicy.ts +++ b/libs/perun/openapi/src/lib/model/perunPolicy.ts @@ -10,10 +10,8 @@ * Do not edit the class manually. */ - -export interface PerunPolicy { - policyName: string; - includePolicies: Array; - perunRoles: Array<{ [key: string]: string; }>; +export interface PerunPolicy { + policyName: string; + includePolicies: Array; + perunRoles: Array<{ [key: string]: string }>; } - diff --git a/libs/perun/openapi/src/lib/model/perunPrincipal.ts b/libs/perun/openapi/src/lib/model/perunPrincipal.ts index cd89b24ec..3293deb3b 100644 --- a/libs/perun/openapi/src/lib/model/perunPrincipal.ts +++ b/libs/perun/openapi/src/lib/model/perunPrincipal.ts @@ -11,16 +11,14 @@ */ import { User } from './user'; - -export interface PerunPrincipal { - actor?: string; - extSourceName?: string; - extSourceType?: string; - extSourceLoa?: number; - user: User; - authzInitialized?: boolean; - additionalInformations?: { [key: string]: string; }; - userId: number; - roles?: { [key: string]: { [key: string]: Array; }; }; +export interface PerunPrincipal { + actor?: string; + extSourceName?: string; + extSourceType?: string; + extSourceLoa?: number; + user: User; + authzInitialized?: boolean; + additionalInformations?: { [key: string]: string }; + userId: number; + roles?: { [key: string]: { [key: string]: Array } }; } - diff --git a/libs/perun/openapi/src/lib/model/publication.ts b/libs/perun/openapi/src/lib/model/publication.ts index 06a7958be..bbe13b517 100644 --- a/libs/perun/openapi/src/lib/model/publication.ts +++ b/libs/perun/openapi/src/lib/model/publication.ts @@ -12,21 +12,19 @@ import { PerunBean } from './perunBean'; import { Author } from './author'; - -export interface Publication extends PerunBean { - authors?: Array; - externalId?: number; - publicationSystemId?: number; - title?: string; - year?: number; - main?: string; - isbn?: string; - doi?: string; - categoryId?: number; - rank?: number; - locked?: boolean; - createdBy?: string; - createdByUid?: number; - createdDate?: string; +export interface Publication extends PerunBean { + authors?: Array; + externalId?: number; + publicationSystemId?: number; + title?: string; + year?: number; + main?: string; + isbn?: string; + doi?: string; + categoryId?: number; + rank?: number; + locked?: boolean; + createdBy?: string; + createdByUid?: number; + createdDate?: string; } - diff --git a/libs/perun/openapi/src/lib/model/publicationForGUI.ts b/libs/perun/openapi/src/lib/model/publicationForGUI.ts index 2d47f69e1..ff7c80636 100644 --- a/libs/perun/openapi/src/lib/model/publicationForGUI.ts +++ b/libs/perun/openapi/src/lib/model/publicationForGUI.ts @@ -13,10 +13,8 @@ import { ThanksForGUI } from './thanksForGUI'; import { Author } from './author'; import { Publication } from './publication'; - -export interface PublicationForGUI extends Publication { - pubSystemName?: string; - categoryName?: string; - thanks?: Array; +export interface PublicationForGUI extends Publication { + pubSystemName?: string; + categoryName?: string; + thanks?: Array; } - diff --git a/libs/perun/openapi/src/lib/model/publicationSystem.ts b/libs/perun/openapi/src/lib/model/publicationSystem.ts index 98619dceb..05d2ed4af 100644 --- a/libs/perun/openapi/src/lib/model/publicationSystem.ts +++ b/libs/perun/openapi/src/lib/model/publicationSystem.ts @@ -11,13 +11,11 @@ */ import { PerunBean } from './perunBean'; - -export interface PublicationSystem extends PerunBean { - friendlyName?: string; - url?: string; - username?: string; - password?: string; - loginNamespace?: string; - type?: string; +export interface PublicationSystem extends PerunBean { + friendlyName?: string; + url?: string; + username?: string; + password?: string; + loginNamespace?: string; + type?: string; } - diff --git a/libs/perun/openapi/src/lib/model/rTMessage.ts b/libs/perun/openapi/src/lib/model/rTMessage.ts index c8bf0762c..cdbe4c21d 100644 --- a/libs/perun/openapi/src/lib/model/rTMessage.ts +++ b/libs/perun/openapi/src/lib/model/rTMessage.ts @@ -10,9 +10,7 @@ * Do not edit the class manually. */ - -export interface RTMessage { - memberPreferredEmail?: string; - ticketNumber?: number; +export interface RTMessage { + memberPreferredEmail?: string; + ticketNumber?: number; } - diff --git a/libs/perun/openapi/src/lib/model/resource.ts b/libs/perun/openapi/src/lib/model/resource.ts index 5a9c58614..25fa2d792 100644 --- a/libs/perun/openapi/src/lib/model/resource.ts +++ b/libs/perun/openapi/src/lib/model/resource.ts @@ -11,12 +11,10 @@ */ import { Auditable } from './auditable'; - -export interface Resource extends Auditable { - name?: string; - description?: string; - voId?: number; - facilityId?: number; - uuid?: string; +export interface Resource extends Auditable { + name?: string; + description?: string; + voId?: number; + facilityId?: number; + uuid?: string; } - diff --git a/libs/perun/openapi/src/lib/model/resourceState.ts b/libs/perun/openapi/src/lib/model/resourceState.ts index adaf4e067..82684d868 100644 --- a/libs/perun/openapi/src/lib/model/resourceState.ts +++ b/libs/perun/openapi/src/lib/model/resourceState.ts @@ -12,9 +12,7 @@ import { Task } from './task'; import { Resource } from './resource'; - -export interface ResourceState { - resource?: Resource; - taskList?: Array; +export interface ResourceState { + resource?: Resource; + taskList?: Array; } - diff --git a/libs/perun/openapi/src/lib/model/resourceTag.ts b/libs/perun/openapi/src/lib/model/resourceTag.ts index 2a255d80f..d09307042 100644 --- a/libs/perun/openapi/src/lib/model/resourceTag.ts +++ b/libs/perun/openapi/src/lib/model/resourceTag.ts @@ -11,9 +11,7 @@ */ import { Auditable } from './auditable'; - -export interface ResourceTag extends Auditable { - tagName?: string; - voId?: number; +export interface ResourceTag extends Auditable { + tagName?: string; + voId?: number; } - diff --git a/libs/perun/openapi/src/lib/model/richApplication.ts b/libs/perun/openapi/src/lib/model/richApplication.ts index 59939b649..ae56dcb15 100644 --- a/libs/perun/openapi/src/lib/model/richApplication.ts +++ b/libs/perun/openapi/src/lib/model/richApplication.ts @@ -17,8 +17,6 @@ import { AppState } from './appState'; import { AppType } from './appType'; import { Application } from './application'; - -export interface RichApplication { - formData: Array; +export interface RichApplication { + formData: Array; } - diff --git a/libs/perun/openapi/src/lib/model/richDestination.ts b/libs/perun/openapi/src/lib/model/richDestination.ts index f68f700af..3bb709a30 100644 --- a/libs/perun/openapi/src/lib/model/richDestination.ts +++ b/libs/perun/openapi/src/lib/model/richDestination.ts @@ -15,10 +15,8 @@ import { Service } from './service'; import { Facility } from './facility'; import { DestinationType } from './destinationType'; - -export interface RichDestination extends Destination { - blocked?: boolean; - service?: Service; - facility?: Facility; +export interface RichDestination extends Destination { + blocked?: boolean; + service?: Service; + facility?: Facility; } - diff --git a/libs/perun/openapi/src/lib/model/richFacility.ts b/libs/perun/openapi/src/lib/model/richFacility.ts index a1705d372..3b58102de 100644 --- a/libs/perun/openapi/src/lib/model/richFacility.ts +++ b/libs/perun/openapi/src/lib/model/richFacility.ts @@ -12,8 +12,6 @@ import { Owner } from './owner'; import { Facility } from './facility'; - -export interface RichFacility extends Facility { - facilityOwners: Array; +export interface RichFacility extends Facility { + facilityOwners: Array; } - diff --git a/libs/perun/openapi/src/lib/model/richGroup.ts b/libs/perun/openapi/src/lib/model/richGroup.ts index 1eb746514..7432d0265 100644 --- a/libs/perun/openapi/src/lib/model/richGroup.ts +++ b/libs/perun/openapi/src/lib/model/richGroup.ts @@ -12,8 +12,6 @@ import { Group } from './group'; import { Attribute } from './attribute'; - -export interface RichGroup extends Group { - attributes?: Array; +export interface RichGroup extends Group { + attributes?: Array; } - diff --git a/libs/perun/openapi/src/lib/model/richMember.ts b/libs/perun/openapi/src/lib/model/richMember.ts index c300a4417..bede2ca79 100644 --- a/libs/perun/openapi/src/lib/model/richMember.ts +++ b/libs/perun/openapi/src/lib/model/richMember.ts @@ -14,11 +14,9 @@ import { Attribute } from './attribute'; import { UserExtSource } from './userExtSource'; import { Member } from './member'; - -export interface RichMember extends Member { - user: User; - userExtSources: Array; - userAttributes?: Array; - memberAttributes?: Array; +export interface RichMember extends Member { + user: User; + userExtSources: Array; + userAttributes?: Array; + memberAttributes?: Array; } - diff --git a/libs/perun/openapi/src/lib/model/richResource.ts b/libs/perun/openapi/src/lib/model/richResource.ts index f4ac308b3..2dfddc53c 100644 --- a/libs/perun/openapi/src/lib/model/richResource.ts +++ b/libs/perun/openapi/src/lib/model/richResource.ts @@ -14,10 +14,8 @@ import { Resource } from './resource'; import { Vo } from './vo'; import { Facility } from './facility'; - -export interface RichResource extends Resource { - vo?: Vo; - facility?: Facility; - resourceTags?: Array; +export interface RichResource extends Resource { + vo?: Vo; + facility?: Facility; + resourceTags?: Array; } - diff --git a/libs/perun/openapi/src/lib/model/richUser.ts b/libs/perun/openapi/src/lib/model/richUser.ts index c08708a04..e0041bc0a 100644 --- a/libs/perun/openapi/src/lib/model/richUser.ts +++ b/libs/perun/openapi/src/lib/model/richUser.ts @@ -13,9 +13,7 @@ import { User } from './user'; import { Attribute } from './attribute'; import { UserExtSource } from './userExtSource'; - -export interface RichUser extends User { - userExtSources: Array; - userAttributes: Array; +export interface RichUser extends User { + userExtSources: Array; + userAttributes: Array; } - diff --git a/libs/perun/openapi/src/lib/model/richUserExtSource.ts b/libs/perun/openapi/src/lib/model/richUserExtSource.ts index 686e66696..b1f86d156 100644 --- a/libs/perun/openapi/src/lib/model/richUserExtSource.ts +++ b/libs/perun/openapi/src/lib/model/richUserExtSource.ts @@ -12,9 +12,7 @@ import { Attribute } from './attribute'; import { UserExtSource } from './userExtSource'; - -export interface RichUserExtSource { - userExtSource: UserExtSource; - attributes: Array; +export interface RichUserExtSource { + userExtSource: UserExtSource; + attributes: Array; } - diff --git a/libs/perun/openapi/src/lib/model/roleManagementRules.ts b/libs/perun/openapi/src/lib/model/roleManagementRules.ts index 193428d6d..2e5ac2c94 100644 --- a/libs/perun/openapi/src/lib/model/roleManagementRules.ts +++ b/libs/perun/openapi/src/lib/model/roleManagementRules.ts @@ -10,13 +10,11 @@ * Do not edit the class manually. */ - -export interface RoleManagementRules { - roleName: string; - primaryObject: string | null; - privilegedRolesToManage: Array<{ [key: string]: string; }>; - privilegedRolesToRead: Array<{ [key: string]: string; }>; - entitiesToManage: { [key: string]: string; }; - assignedObjects: { [key: string]: string; }; +export interface RoleManagementRules { + roleName: string; + primaryObject: string | null; + privilegedRolesToManage: Array<{ [key: string]: string }>; + privilegedRolesToRead: Array<{ [key: string]: string }>; + entitiesToManage: { [key: string]: string }; + assignedObjects: { [key: string]: string }; } - diff --git a/libs/perun/openapi/src/lib/model/roleObject.ts b/libs/perun/openapi/src/lib/model/roleObject.ts index 4d5bcb345..3865cd8cd 100644 --- a/libs/perun/openapi/src/lib/model/roleObject.ts +++ b/libs/perun/openapi/src/lib/model/roleObject.ts @@ -10,19 +10,17 @@ * Do not edit the class manually. */ - /** * Represents objects, upon which Perun roles can be set, e.g. role RESOURCEADMIN can be set upon Resource, Vo, Facility or no object (None). */ export type RoleObject = 'None' | 'Group' | 'Vo' | 'Facility' | 'Resource' | 'User' | 'Member'; export const RoleObject = { - None: 'None' as RoleObject, - Group: 'Group' as RoleObject, - Vo: 'Vo' as RoleObject, - Facility: 'Facility' as RoleObject, - Resource: 'Resource' as RoleObject, - User: 'User' as RoleObject, - Member: 'Member' as RoleObject + None: 'None' as RoleObject, + Group: 'Group' as RoleObject, + Vo: 'Vo' as RoleObject, + Facility: 'Facility' as RoleObject, + Resource: 'Resource' as RoleObject, + User: 'User' as RoleObject, + Member: 'Member' as RoleObject, }; - diff --git a/libs/perun/openapi/src/lib/model/securityTeam.ts b/libs/perun/openapi/src/lib/model/securityTeam.ts index c3f96d65e..970b8d6eb 100644 --- a/libs/perun/openapi/src/lib/model/securityTeam.ts +++ b/libs/perun/openapi/src/lib/model/securityTeam.ts @@ -11,9 +11,7 @@ */ import { Auditable } from './auditable'; - -export interface SecurityTeam extends Auditable { - name?: string; - description?: string; +export interface SecurityTeam extends Auditable { + name?: string; + description?: string; } - diff --git a/libs/perun/openapi/src/lib/model/service.ts b/libs/perun/openapi/src/lib/model/service.ts index 45a09db3d..8c9b4248a 100644 --- a/libs/perun/openapi/src/lib/model/service.ts +++ b/libs/perun/openapi/src/lib/model/service.ts @@ -11,13 +11,11 @@ */ import { Auditable } from './auditable'; - -export interface Service extends Auditable { - name?: string; - description?: string; - delay?: number; - recurrence?: number; - enabled?: boolean; - script?: string; +export interface Service extends Auditable { + name?: string; + description?: string; + delay?: number; + recurrence?: number; + enabled?: boolean; + script?: string; } - diff --git a/libs/perun/openapi/src/lib/model/serviceAttributes.ts b/libs/perun/openapi/src/lib/model/serviceAttributes.ts index 39a0d1c5d..e841c32e9 100644 --- a/libs/perun/openapi/src/lib/model/serviceAttributes.ts +++ b/libs/perun/openapi/src/lib/model/serviceAttributes.ts @@ -11,9 +11,7 @@ */ import { Attribute } from './attribute'; - -export interface ServiceAttributes { - attributes?: Array; - childElements?: Array; +export interface ServiceAttributes { + attributes?: Array; + childElements?: Array; } - diff --git a/libs/perun/openapi/src/lib/model/serviceForGUI.ts b/libs/perun/openapi/src/lib/model/serviceForGUI.ts index fcd331b2a..508fa59ed 100644 --- a/libs/perun/openapi/src/lib/model/serviceForGUI.ts +++ b/libs/perun/openapi/src/lib/model/serviceForGUI.ts @@ -11,8 +11,6 @@ */ import { Service } from './service'; - -export interface ServiceForGUI extends Service { - allowedOnFacility?: boolean; +export interface ServiceForGUI extends Service { + allowedOnFacility?: boolean; } - diff --git a/libs/perun/openapi/src/lib/model/serviceState.ts b/libs/perun/openapi/src/lib/model/serviceState.ts index 0b68150fd..f5a6792e5 100644 --- a/libs/perun/openapi/src/lib/model/serviceState.ts +++ b/libs/perun/openapi/src/lib/model/serviceState.ts @@ -13,14 +13,12 @@ import { Task } from './task'; import { Service } from './service'; import { Facility } from './facility'; - -export interface ServiceState { - service?: Service; - facility?: Facility; - task?: Task; - status?: string; - blockedOnFacility?: boolean; - readonly blockedGlobally?: boolean; - hasDestinations?: boolean; +export interface ServiceState { + service?: Service; + facility?: Facility; + task?: Task; + status?: string; + blockedOnFacility?: boolean; + readonly blockedGlobally?: boolean; + hasDestinations?: boolean; } - diff --git a/libs/perun/openapi/src/lib/model/servicesPackage.ts b/libs/perun/openapi/src/lib/model/servicesPackage.ts index d48d9a27a..327a6484d 100644 --- a/libs/perun/openapi/src/lib/model/servicesPackage.ts +++ b/libs/perun/openapi/src/lib/model/servicesPackage.ts @@ -11,9 +11,7 @@ */ import { Auditable } from './auditable'; - -export interface ServicesPackage extends Auditable { - description?: string; - name?: string; +export interface ServicesPackage extends Auditable { + description?: string; + name?: string; } - diff --git a/libs/perun/openapi/src/lib/model/setRoleWithGroupComplementaryObject.ts b/libs/perun/openapi/src/lib/model/setRoleWithGroupComplementaryObject.ts index 972175335..3339ac187 100644 --- a/libs/perun/openapi/src/lib/model/setRoleWithGroupComplementaryObject.ts +++ b/libs/perun/openapi/src/lib/model/setRoleWithGroupComplementaryObject.ts @@ -11,16 +11,14 @@ */ import { PerunBean } from './perunBean'; - /** * input to unsetRoleWithUserComplementaryObject */ -export interface SetRoleWithGroupComplementaryObject { - role: string; - /** - * List of authorizedGroups ids - */ - authorizedGroups: Array; - complementaryObject?: PerunBean; +export interface SetRoleWithGroupComplementaryObject { + role: string; + /** + * List of authorizedGroups ids + */ + authorizedGroups: Array; + complementaryObject?: PerunBean; } - diff --git a/libs/perun/openapi/src/lib/model/setRoleWithUserComplementaryObject.ts b/libs/perun/openapi/src/lib/model/setRoleWithUserComplementaryObject.ts index 71833879d..1d8029ca7 100644 --- a/libs/perun/openapi/src/lib/model/setRoleWithUserComplementaryObject.ts +++ b/libs/perun/openapi/src/lib/model/setRoleWithUserComplementaryObject.ts @@ -11,16 +11,14 @@ */ import { PerunBean } from './perunBean'; - /** * input to setRoleWithUserComplementaryObject */ -export interface SetRoleWithUserComplementaryObject { - role: string; - /** - * List of user ids - */ - users: Array; - complementaryObject?: PerunBean; +export interface SetRoleWithUserComplementaryObject { + role: string; + /** + * List of user ids + */ + users: Array; + complementaryObject?: PerunBean; } - diff --git a/libs/perun/openapi/src/lib/model/simpleAttribute.ts b/libs/perun/openapi/src/lib/model/simpleAttribute.ts index 609095b3b..e003c57f4 100644 --- a/libs/perun/openapi/src/lib/model/simpleAttribute.ts +++ b/libs/perun/openapi/src/lib/model/simpleAttribute.ts @@ -10,14 +10,12 @@ * Do not edit the class manually. */ - /** * Attribute returned using the JsonSimple serializator */ -export interface SimpleAttribute { - friendlyName?: string; - namespace?: string; - unique?: boolean; - value?: object; +export interface SimpleAttribute { + friendlyName?: string; + namespace?: string; + unique?: boolean; + value?: object; } - diff --git a/libs/perun/openapi/src/lib/model/sortingOrder.ts b/libs/perun/openapi/src/lib/model/sortingOrder.ts index d09dd365a..5f623a69f 100644 --- a/libs/perun/openapi/src/lib/model/sortingOrder.ts +++ b/libs/perun/openapi/src/lib/model/sortingOrder.ts @@ -10,11 +10,9 @@ * Do not edit the class manually. */ - export type SortingOrder = 'ASCENDING' | 'DESCENDING'; export const SortingOrder = { - ASCENDING: 'ASCENDING' as SortingOrder, - DESCENDING: 'DESCENDING' as SortingOrder + ASCENDING: 'ASCENDING' as SortingOrder, + DESCENDING: 'DESCENDING' as SortingOrder, }; - diff --git a/libs/perun/openapi/src/lib/model/sponsor.ts b/libs/perun/openapi/src/lib/model/sponsor.ts index 26a462320..bd955124e 100644 --- a/libs/perun/openapi/src/lib/model/sponsor.ts +++ b/libs/perun/openapi/src/lib/model/sponsor.ts @@ -13,15 +13,13 @@ import { User } from './user'; import { Attribute } from './attribute'; import { UserExtSource } from './userExtSource'; - -export interface Sponsor { - user: User; - userExtSources: Array; - userAttributes: Array; - /** - * Date in format yyyy-MM-dd} - */ - validityTo: string; - active: boolean; +export interface Sponsor { + user: User; + userExtSources: Array; + userAttributes: Array; + /** + * Date in format yyyy-MM-dd} + */ + validityTo: string; + active: boolean; } - diff --git a/libs/perun/openapi/src/lib/model/sponsoredUserData.ts b/libs/perun/openapi/src/lib/model/sponsoredUserData.ts index 759b187bf..eda21c7d6 100644 --- a/libs/perun/openapi/src/lib/model/sponsoredUserData.ts +++ b/libs/perun/openapi/src/lib/model/sponsoredUserData.ts @@ -10,16 +10,14 @@ * Do not edit the class manually. */ - -export interface SponsoredUserData { - guestName?: string; - firstName?: string; - lastName?: string; - titleBefore?: string; - titleAfter?: string; - namespace?: string; - email?: string; - password?: string; - login?: string; +export interface SponsoredUserData { + guestName?: string; + firstName?: string; + lastName?: string; + titleBefore?: string; + titleAfter?: string; + namespace?: string; + email?: string; + password?: string; + login?: string; } - diff --git a/libs/perun/openapi/src/lib/model/task.ts b/libs/perun/openapi/src/lib/model/task.ts index 1359422d8..be496414c 100644 --- a/libs/perun/openapi/src/lib/model/task.ts +++ b/libs/perun/openapi/src/lib/model/task.ts @@ -14,24 +14,22 @@ import { Service } from './service'; import { Facility } from './facility'; import { TaskStatus } from './taskStatus'; - -export interface Task { - id?: number; - delay?: number; - recurrence?: number; - startTime?: string; - sentToEngine?: string; - sendStartTime?: string; - schedule?: string; - genStartTime?: string; - genEndTime?: string; - sendEndTime?: string; - endTime?: string; - service?: Service; - facility?: Facility; - destinations?: Array; - status?: TaskStatus; - sourceUpdated?: boolean; - propagationForced?: boolean; +export interface Task { + id?: number; + delay?: number; + recurrence?: number; + startTime?: string; + sentToEngine?: string; + sendStartTime?: string; + schedule?: string; + genStartTime?: string; + genEndTime?: string; + sendEndTime?: string; + endTime?: string; + service?: Service; + facility?: Facility; + destinations?: Array; + status?: TaskStatus; + sourceUpdated?: boolean; + propagationForced?: boolean; } - diff --git a/libs/perun/openapi/src/lib/model/taskAndDestinationIdObject.ts b/libs/perun/openapi/src/lib/model/taskAndDestinationIdObject.ts index e7f147b27..d509e18c9 100644 --- a/libs/perun/openapi/src/lib/model/taskAndDestinationIdObject.ts +++ b/libs/perun/openapi/src/lib/model/taskAndDestinationIdObject.ts @@ -10,18 +10,16 @@ * Do not edit the class manually. */ - /** * input to deleteTaskResultsIds */ -export interface TaskAndDestinationIdObject { - /** - * task id - */ - taskId: number; - /** - * destination id - */ - destinationId: number; +export interface TaskAndDestinationIdObject { + /** + * task id + */ + taskId: number; + /** + * destination id + */ + destinationId: number; } - diff --git a/libs/perun/openapi/src/lib/model/taskAndDestinationNameObject.ts b/libs/perun/openapi/src/lib/model/taskAndDestinationNameObject.ts index 297cdf47e..955836c73 100644 --- a/libs/perun/openapi/src/lib/model/taskAndDestinationNameObject.ts +++ b/libs/perun/openapi/src/lib/model/taskAndDestinationNameObject.ts @@ -10,22 +10,20 @@ * Do not edit the class manually. */ - /** * input to deleteTaskResultsNames */ -export interface TaskAndDestinationNameObject { - /** - * task id - */ - taskId: number; - /** - * destination name - */ - destinationName: string; - /** - * destination type - */ - destinationType: string; +export interface TaskAndDestinationNameObject { + /** + * task id + */ + taskId: number; + /** + * destination name + */ + destinationName: string; + /** + * destination type + */ + destinationType: string; } - diff --git a/libs/perun/openapi/src/lib/model/taskIdObject.ts b/libs/perun/openapi/src/lib/model/taskIdObject.ts index 2e5aace7b..79ecd8224 100644 --- a/libs/perun/openapi/src/lib/model/taskIdObject.ts +++ b/libs/perun/openapi/src/lib/model/taskIdObject.ts @@ -10,14 +10,12 @@ * Do not edit the class manually. */ - /** * input to deleteTaskObject */ -export interface TaskIdObject { - /** - * task id - */ - task: number; +export interface TaskIdObject { + /** + * task id + */ + task: number; } - diff --git a/libs/perun/openapi/src/lib/model/taskResult.ts b/libs/perun/openapi/src/lib/model/taskResult.ts index 2cf002b24..6eba29dcf 100644 --- a/libs/perun/openapi/src/lib/model/taskResult.ts +++ b/libs/perun/openapi/src/lib/model/taskResult.ts @@ -14,16 +14,14 @@ import { PerunBean } from './perunBean'; import { Service } from './service'; import { TaskResultStatus } from './taskResultStatus'; - -export interface TaskResult extends PerunBean { - taskId?: number; - destinationId?: number; - errorMessage?: string; - standardMessage?: string; - returnCode?: number; - timestamp?: string; - status?: TaskResultStatus; - destination?: Destination; - service?: Service; +export interface TaskResult extends PerunBean { + taskId?: number; + destinationId?: number; + errorMessage?: string; + standardMessage?: string; + returnCode?: number; + timestamp?: string; + status?: TaskResultStatus; + destination?: Destination; + service?: Service; } - diff --git a/libs/perun/openapi/src/lib/model/taskResultIdObject.ts b/libs/perun/openapi/src/lib/model/taskResultIdObject.ts index 0afacf112..8770b5e51 100644 --- a/libs/perun/openapi/src/lib/model/taskResultIdObject.ts +++ b/libs/perun/openapi/src/lib/model/taskResultIdObject.ts @@ -10,14 +10,12 @@ * Do not edit the class manually. */ - /** * input to deleteTaskResultObject */ -export interface TaskResultIdObject { - /** - * task result id - */ - taskResultId: number; +export interface TaskResultIdObject { + /** + * task result id + */ + taskResultId: number; } - diff --git a/libs/perun/openapi/src/lib/model/taskResultStatus.ts b/libs/perun/openapi/src/lib/model/taskResultStatus.ts index 6dccdb52d..0d279a859 100644 --- a/libs/perun/openapi/src/lib/model/taskResultStatus.ts +++ b/libs/perun/openapi/src/lib/model/taskResultStatus.ts @@ -10,13 +10,11 @@ * Do not edit the class manually. */ - export type TaskResultStatus = 'DONE' | 'ERROR' | 'DENIED' | 'WARNING'; export const TaskResultStatus = { - DONE: 'DONE' as TaskResultStatus, - ERROR: 'ERROR' as TaskResultStatus, - DENIED: 'DENIED' as TaskResultStatus, - WARNING: 'WARNING' as TaskResultStatus + DONE: 'DONE' as TaskResultStatus, + ERROR: 'ERROR' as TaskResultStatus, + DENIED: 'DENIED' as TaskResultStatus, + WARNING: 'WARNING' as TaskResultStatus, }; - diff --git a/libs/perun/openapi/src/lib/model/taskStatus.ts b/libs/perun/openapi/src/lib/model/taskStatus.ts index 3ba326adc..554a584e4 100644 --- a/libs/perun/openapi/src/lib/model/taskStatus.ts +++ b/libs/perun/openapi/src/lib/model/taskStatus.ts @@ -10,19 +10,27 @@ * Do not edit the class manually. */ - -export type TaskStatus = 'WAITING' | 'PLANNED' | 'GENERATING' | 'GENERROR' | 'GENERATED' | 'SENDING' | 'DONE' | 'SENDERROR' | 'ERROR' | 'WARNING'; +export type TaskStatus = + | 'WAITING' + | 'PLANNED' + | 'GENERATING' + | 'GENERROR' + | 'GENERATED' + | 'SENDING' + | 'DONE' + | 'SENDERROR' + | 'ERROR' + | 'WARNING'; export const TaskStatus = { - WAITING: 'WAITING' as TaskStatus, - PLANNED: 'PLANNED' as TaskStatus, - GENERATING: 'GENERATING' as TaskStatus, - GENERROR: 'GENERROR' as TaskStatus, - GENERATED: 'GENERATED' as TaskStatus, - SENDING: 'SENDING' as TaskStatus, - DONE: 'DONE' as TaskStatus, - SENDERROR: 'SENDERROR' as TaskStatus, - ERROR: 'ERROR' as TaskStatus, - WARNING: 'WARNING' as TaskStatus + WAITING: 'WAITING' as TaskStatus, + PLANNED: 'PLANNED' as TaskStatus, + GENERATING: 'GENERATING' as TaskStatus, + GENERROR: 'GENERROR' as TaskStatus, + GENERATED: 'GENERATED' as TaskStatus, + SENDING: 'SENDING' as TaskStatus, + DONE: 'DONE' as TaskStatus, + SENDERROR: 'SENDERROR' as TaskStatus, + ERROR: 'ERROR' as TaskStatus, + WARNING: 'WARNING' as TaskStatus, }; - diff --git a/libs/perun/openapi/src/lib/model/thanks.ts b/libs/perun/openapi/src/lib/model/thanks.ts index 368a6b3ea..0e075e191 100644 --- a/libs/perun/openapi/src/lib/model/thanks.ts +++ b/libs/perun/openapi/src/lib/model/thanks.ts @@ -11,12 +11,10 @@ */ import { PerunBean } from './perunBean'; - -export interface Thanks extends PerunBean { - publicationId?: number; - ownerId?: number; - createdBy?: string; - createdByUid?: number; - createdDate?: string; +export interface Thanks extends PerunBean { + publicationId?: number; + ownerId?: number; + createdBy?: string; + createdByUid?: number; + createdDate?: string; } - diff --git a/libs/perun/openapi/src/lib/model/thanksForGUI.ts b/libs/perun/openapi/src/lib/model/thanksForGUI.ts index 2d49af7fd..35c1351f1 100644 --- a/libs/perun/openapi/src/lib/model/thanksForGUI.ts +++ b/libs/perun/openapi/src/lib/model/thanksForGUI.ts @@ -11,8 +11,6 @@ */ import { Thanks } from './thanks'; - -export interface ThanksForGUI extends Thanks { - ownerName?: string; +export interface ThanksForGUI extends Thanks { + ownerName?: string; } - diff --git a/libs/perun/openapi/src/lib/model/type.ts b/libs/perun/openapi/src/lib/model/type.ts index f6b27d2fb..4ae867893 100644 --- a/libs/perun/openapi/src/lib/model/type.ts +++ b/libs/perun/openapi/src/lib/model/type.ts @@ -10,27 +10,40 @@ * Do not edit the class manually. */ - /** * type of application form items */ -export type Type = 'HTML_COMMENT' | 'SUBMIT_BUTTON' | 'AUTO_SUBMIT_BUTTON' | 'PASSWORD' | 'VALIDATED_EMAIL' | 'TEXTFIELD' | 'TEXTAREA' | 'CHECKBOX' | 'RADIO' | 'SELECTIONBOX' | 'COMBOBOX' | 'USERNAME' | 'HEADING' | 'TIMEZONE' | 'EMBEDDED_GROUP_APPLICATION'; +export type Type = + | 'HTML_COMMENT' + | 'SUBMIT_BUTTON' + | 'AUTO_SUBMIT_BUTTON' + | 'PASSWORD' + | 'VALIDATED_EMAIL' + | 'TEXTFIELD' + | 'TEXTAREA' + | 'CHECKBOX' + | 'RADIO' + | 'SELECTIONBOX' + | 'COMBOBOX' + | 'USERNAME' + | 'HEADING' + | 'TIMEZONE' + | 'EMBEDDED_GROUP_APPLICATION'; export const Type = { - HTMLCOMMENT: 'HTML_COMMENT' as Type, - SUBMITBUTTON: 'SUBMIT_BUTTON' as Type, - AUTOSUBMITBUTTON: 'AUTO_SUBMIT_BUTTON' as Type, - PASSWORD: 'PASSWORD' as Type, - VALIDATEDEMAIL: 'VALIDATED_EMAIL' as Type, - TEXTFIELD: 'TEXTFIELD' as Type, - TEXTAREA: 'TEXTAREA' as Type, - CHECKBOX: 'CHECKBOX' as Type, - RADIO: 'RADIO' as Type, - SELECTIONBOX: 'SELECTIONBOX' as Type, - COMBOBOX: 'COMBOBOX' as Type, - USERNAME: 'USERNAME' as Type, - HEADING: 'HEADING' as Type, - TIMEZONE: 'TIMEZONE' as Type, - EMBEDDEDGROUPAPPLICATION: 'EMBEDDED_GROUP_APPLICATION' as Type + HTMLCOMMENT: 'HTML_COMMENT' as Type, + SUBMITBUTTON: 'SUBMIT_BUTTON' as Type, + AUTOSUBMITBUTTON: 'AUTO_SUBMIT_BUTTON' as Type, + PASSWORD: 'PASSWORD' as Type, + VALIDATEDEMAIL: 'VALIDATED_EMAIL' as Type, + TEXTFIELD: 'TEXTFIELD' as Type, + TEXTAREA: 'TEXTAREA' as Type, + CHECKBOX: 'CHECKBOX' as Type, + RADIO: 'RADIO' as Type, + SELECTIONBOX: 'SELECTIONBOX' as Type, + COMBOBOX: 'COMBOBOX' as Type, + USERNAME: 'USERNAME' as Type, + HEADING: 'HEADING' as Type, + TIMEZONE: 'TIMEZONE' as Type, + EMBEDDEDGROUPAPPLICATION: 'EMBEDDED_GROUP_APPLICATION' as Type, }; - diff --git a/libs/perun/openapi/src/lib/model/unsetRoleWithGroupComplementaryObject.ts b/libs/perun/openapi/src/lib/model/unsetRoleWithGroupComplementaryObject.ts index 448519ec9..38bddf4bf 100644 --- a/libs/perun/openapi/src/lib/model/unsetRoleWithGroupComplementaryObject.ts +++ b/libs/perun/openapi/src/lib/model/unsetRoleWithGroupComplementaryObject.ts @@ -11,16 +11,14 @@ */ import { PerunBean } from './perunBean'; - /** * input to unsetRoleWithUserComplementaryObject */ -export interface UnsetRoleWithGroupComplementaryObject { - role: string; - /** - * List of authorizedGroups ids - */ - authorizedGroups: Array; - complementaryObject?: PerunBean; +export interface UnsetRoleWithGroupComplementaryObject { + role: string; + /** + * List of authorizedGroups ids + */ + authorizedGroups: Array; + complementaryObject?: PerunBean; } - diff --git a/libs/perun/openapi/src/lib/model/unsetRoleWithUserComplementaryObject.ts b/libs/perun/openapi/src/lib/model/unsetRoleWithUserComplementaryObject.ts index ead7a9b85..24b1dfc08 100644 --- a/libs/perun/openapi/src/lib/model/unsetRoleWithUserComplementaryObject.ts +++ b/libs/perun/openapi/src/lib/model/unsetRoleWithUserComplementaryObject.ts @@ -11,16 +11,14 @@ */ import { PerunBean } from './perunBean'; - /** * input to unsetRoleWithUserComplementaryObject */ -export interface UnsetRoleWithUserComplementaryObject { - role: string; - /** - * List of user ids - */ - users: Array; - complementaryObject?: PerunBean; +export interface UnsetRoleWithUserComplementaryObject { + role: string; + /** + * List of user ids + */ + users: Array; + complementaryObject?: PerunBean; } - diff --git a/libs/perun/openapi/src/lib/model/user.ts b/libs/perun/openapi/src/lib/model/user.ts index cd40a79d4..3b3d5aec3 100644 --- a/libs/perun/openapi/src/lib/model/user.ts +++ b/libs/perun/openapi/src/lib/model/user.ts @@ -11,17 +11,15 @@ */ import { Auditable } from './auditable'; - -export interface User extends Auditable { - firstName?: string | null; - lastName?: string | null; - middleName?: string | null; - titleBefore?: string | null; - titleAfter?: string | null; - serviceUser?: boolean; - sponsoredUser?: boolean; - uuid?: string; - specificUser?: boolean; - majorSpecificType?: string; +export interface User extends Auditable { + firstName?: string | null; + lastName?: string | null; + middleName?: string | null; + titleBefore?: string | null; + titleAfter?: string | null; + serviceUser?: boolean; + sponsoredUser?: boolean; + uuid?: string; + specificUser?: boolean; + majorSpecificType?: string; } - diff --git a/libs/perun/openapi/src/lib/model/userExtSource.ts b/libs/perun/openapi/src/lib/model/userExtSource.ts index f6c059216..561ca432c 100644 --- a/libs/perun/openapi/src/lib/model/userExtSource.ts +++ b/libs/perun/openapi/src/lib/model/userExtSource.ts @@ -12,16 +12,14 @@ import { Auditable } from './auditable'; import { ExtSource } from './extSource'; - -export interface UserExtSource extends Auditable { - login: string; - userId?: number; - loa?: number; - persistent?: boolean; - /** - * SQL timestamp - */ - lastAccess?: string; - extSource: ExtSource; +export interface UserExtSource extends Auditable { + login: string; + userId?: number; + loa?: number; + persistent?: boolean; + /** + * SQL timestamp + */ + lastAccess?: string; + extSource: ExtSource; } - diff --git a/libs/perun/openapi/src/lib/model/usersOrderColumn.ts b/libs/perun/openapi/src/lib/model/usersOrderColumn.ts index 703e40a50..010bdafe6 100644 --- a/libs/perun/openapi/src/lib/model/usersOrderColumn.ts +++ b/libs/perun/openapi/src/lib/model/usersOrderColumn.ts @@ -10,11 +10,9 @@ * Do not edit the class manually. */ - export type UsersOrderColumn = 'ID' | 'NAME'; export const UsersOrderColumn = { - ID: 'ID' as UsersOrderColumn, - NAME: 'NAME' as UsersOrderColumn + ID: 'ID' as UsersOrderColumn, + NAME: 'NAME' as UsersOrderColumn, }; - diff --git a/libs/perun/openapi/src/lib/model/usersPageQuery.ts b/libs/perun/openapi/src/lib/model/usersPageQuery.ts index e597aa0fc..68066cae7 100644 --- a/libs/perun/openapi/src/lib/model/usersPageQuery.ts +++ b/libs/perun/openapi/src/lib/model/usersPageQuery.ts @@ -12,18 +12,16 @@ import { UsersOrderColumn } from './usersOrderColumn'; import { SortingOrder } from './sortingOrder'; - -export interface UsersPageQuery { - pageSize: number; - offset: number; - order: SortingOrder; - sortColumn: UsersOrderColumn; - searchString?: string; - withoutVo?: boolean; - facilityId?: number; - voId?: number; - serviceId?: number; - resourceId?: number; - onlyAllowed?: boolean; +export interface UsersPageQuery { + pageSize: number; + offset: number; + order: SortingOrder; + sortColumn: UsersOrderColumn; + searchString?: string; + withoutVo?: boolean; + facilityId?: number; + voId?: number; + serviceId?: number; + resourceId?: number; + onlyAllowed?: boolean; } - diff --git a/libs/perun/openapi/src/lib/model/vo.ts b/libs/perun/openapi/src/lib/model/vo.ts index f887c1a83..8fa8a4896 100644 --- a/libs/perun/openapi/src/lib/model/vo.ts +++ b/libs/perun/openapi/src/lib/model/vo.ts @@ -11,9 +11,7 @@ */ import { Auditable } from './auditable'; - -export interface Vo extends Auditable { - name?: string; - shortName?: string; +export interface Vo extends Auditable { + name?: string; + shortName?: string; } - diff --git a/libs/perun/openapi/src/lib/model/voAdminRoles.ts b/libs/perun/openapi/src/lib/model/voAdminRoles.ts index 47dd7d3bd..1b3dec1d8 100644 --- a/libs/perun/openapi/src/lib/model/voAdminRoles.ts +++ b/libs/perun/openapi/src/lib/model/voAdminRoles.ts @@ -10,15 +10,13 @@ * Do not edit the class manually. */ - /** * admin roles for a Vo */ export type VoAdminRoles = 'VOOBSERVER' | 'TOPGROUPCREATOR' | 'VOADMIN'; export const VoAdminRoles = { - VOOBSERVER: 'VOOBSERVER' as VoAdminRoles, - TOPGROUPCREATOR: 'TOPGROUPCREATOR' as VoAdminRoles, - VOADMIN: 'VOADMIN' as VoAdminRoles + VOOBSERVER: 'VOOBSERVER' as VoAdminRoles, + TOPGROUPCREATOR: 'TOPGROUPCREATOR' as VoAdminRoles, + VOADMIN: 'VOADMIN' as VoAdminRoles, }; - diff --git a/libs/perun/openapi/src/lib/model/voMemberStatuses.ts b/libs/perun/openapi/src/lib/model/voMemberStatuses.ts index f1898d567..75d967293 100644 --- a/libs/perun/openapi/src/lib/model/voMemberStatuses.ts +++ b/libs/perun/openapi/src/lib/model/voMemberStatuses.ts @@ -10,16 +10,14 @@ * Do not edit the class manually. */ - /** * statuses of a member in a Vo */ export type VoMemberStatuses = 'VALID' | 'INVALID' | 'EXPIRED' | 'DISABLED'; export const VoMemberStatuses = { - VALID: 'VALID' as VoMemberStatuses, - INVALID: 'INVALID' as VoMemberStatuses, - EXPIRED: 'EXPIRED' as VoMemberStatuses, - DISABLED: 'DISABLED' as VoMemberStatuses + VALID: 'VALID' as VoMemberStatuses, + INVALID: 'INVALID' as VoMemberStatuses, + EXPIRED: 'EXPIRED' as VoMemberStatuses, + DISABLED: 'DISABLED' as VoMemberStatuses, }; - diff --git a/libs/perun/openapi/src/lib/variables.ts b/libs/perun/openapi/src/lib/variables.ts index 6fe58549f..2277a9cc3 100644 --- a/libs/perun/openapi/src/lib/variables.ts +++ b/libs/perun/openapi/src/lib/variables.ts @@ -2,8 +2,8 @@ import { InjectionToken } from '@angular/core'; export const BASE_PATH = new InjectionToken('basePath'); export const COLLECTION_FORMATS = { - 'csv': ',', - 'tsv': ' ', - 'ssv': ' ', - 'pipes': '|' -} + csv: ',', + tsv: ' ', + ssv: ' ', + pipes: '|', +}; diff --git a/libs/perun/services/src/lib/dynamicDataSource.ts b/libs/perun/services/src/lib/dynamicDataSource.ts index ab6935a1f..1b233ef62 100644 --- a/libs/perun/services/src/lib/dynamicDataSource.ts +++ b/libs/perun/services/src/lib/dynamicDataSource.ts @@ -170,7 +170,7 @@ export class DynamicDataSource implements DataSource { userId: number, groupId: number, voId: number, - details?:boolean + details?: boolean ) { this.loadingSubject.next(true); this.latestQueryTime = Date.now(); From 65588dc08eef473bad42fd3b3927b73ebdf23b2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Hako=C5=A1?= <36647232+mattjoke@users.noreply.github.com> Date: Sat, 12 Mar 2022 11:28:04 +0100 Subject: [PATCH 3/6] fix(admin): Fixed error message * fixed error when displaying table with group --- .../applications-dynamic-list.component.html | 14 ++++++-------- .../applications-dynamic-list.component.ts | 10 +++++----- libs/perun/services/src/lib/dynamicDataSource.ts | 1 - 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/apps/admin-gui/src/app/vos/components/applications-dynamic-list/applications-dynamic-list.component.html b/apps/admin-gui/src/app/vos/components/applications-dynamic-list/applications-dynamic-list.component.html index 6f98064be..6c21c11d3 100644 --- a/apps/admin-gui/src/app/vos/components/applications-dynamic-list/applications-dynamic-list.component.html +++ b/apps/admin-gui/src/app/vos/components/applications-dynamic-list/applications-dynamic-list.component.html @@ -11,7 +11,7 @@
{{'APPLICATIONS_LIST.FORM_DATA' | translate}} + + + {{getFormDataString(data)}} + + + + + {{getFormDataString(data).substring(0,70)}}... + + + +
{{application.fedInfo}} {{'APPLICATIONS_LIST.FORM_DATA' | translate}} - - - {{getFormDataString(data)}} - - - - - {{getFormDataString(data).substring(0,70)}}... - - - - {{col}} + {{getValue(application.formData, col)}} +
{{application.fedInfo}} - - - - - + + + diff --git a/apps/admin-gui/src/app/vos/components/applications-dynamic-list/applications-dynamic-list.component.ts b/apps/admin-gui/src/app/vos/components/applications-dynamic-list/applications-dynamic-list.component.ts index ec2e72579..b02ec6f55 100644 --- a/apps/admin-gui/src/app/vos/components/applications-dynamic-list/applications-dynamic-list.component.ts +++ b/apps/admin-gui/src/app/vos/components/applications-dynamic-list/applications-dynamic-list.component.ts @@ -120,11 +120,11 @@ export class ApplicationsDynamicListComponent implements OnInit, OnChanges, Afte ); this.dataSource.loading$.subscribe((val) => { - if (val) return; - if (!this.displayedColumns.includes('fedInfo')) { - this.parsedColumns = []; - return; - } + if (val || !this.displayedColumns.includes('fedInfo')) return; + + this.displayedColumns = this.displayedColumns.filter((v) => !this.parsedColumns.includes(v)); + this.parsedColumns = []; + const data = this.dataSource.getData()[0]; this.parseColumns(data.formData); }); diff --git a/libs/perun/services/src/lib/dynamicDataSource.ts b/libs/perun/services/src/lib/dynamicDataSource.ts index 1b233ef62..b99532a8b 100644 --- a/libs/perun/services/src/lib/dynamicDataSource.ts +++ b/libs/perun/services/src/lib/dynamicDataSource.ts @@ -15,7 +15,6 @@ import { SortingOrder, UsersOrderColumn, VoMemberStatuses, - RichApplication, } from '@perun-web-apps/perun/openapi'; import { BehaviorSubject, Observable, of } from 'rxjs'; import { catchError, finalize } from 'rxjs/operators'; From 879b32ceae96b12c8ac22a80438f64afedae1323 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Mar 2022 20:49:53 +0000 Subject: [PATCH 4/6] build(deps): bump lodash-es from 4.17.15 to 4.17.21 Bumps [lodash-es](https://github.com/lodash/lodash) from 4.17.15 to 4.17.21. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.21) --- updated-dependencies: - dependency-name: lodash-es dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2cb4bdf5c..b11eed273 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15066,9 +15066,9 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "node_modules/lodash-es": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.15.tgz", - "integrity": "sha512-rlrc3yU3+JNOpZ9zj5pQtxnx2THmvRykwL4Xlxoa8I9lHBlVbbyPhgyPMioxVZ4NqyxaVVtaJnzsyOidQIhyyQ==" + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", + "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==" }, "node_modules/lodash.assign": { "version": "4.2.0", @@ -35184,9 +35184,9 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "lodash-es": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.15.tgz", - "integrity": "sha512-rlrc3yU3+JNOpZ9zj5pQtxnx2THmvRykwL4Xlxoa8I9lHBlVbbyPhgyPMioxVZ4NqyxaVVtaJnzsyOidQIhyyQ==" + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", + "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==" }, "lodash.assign": { "version": "4.2.0", From 40cea53f71dabfe4f9a0340616abd6c4dc7adc20 Mon Sep 17 00:00:00 2001 From: xkostka2 Date: Tue, 8 Mar 2022 19:50:47 +0100 Subject: [PATCH 5/6] feat(profile): enforce MFA * added functionality to enforce MFA --- .../settings-authentication.component.html | 56 ++++--- .../settings-authentication.component.ts | 138 +++++++++++++++--- .../src/assets/config/defaultConfig.json | 1 + apps/user-profile/src/assets/i18n/cs.json | 4 +- apps/user-profile/src/assets/i18n/en.json | 4 +- libs/perun/services/src/lib/auth.service.ts | 6 +- 6 files changed, 164 insertions(+), 45 deletions(-) diff --git a/apps/user-profile/src/app/pages/settings-page/settings-authorization/settings-authentication.component.html b/apps/user-profile/src/app/pages/settings-page/settings-authorization/settings-authentication.component.html index 953f61533..a25a55649 100644 --- a/apps/user-profile/src/app/pages/settings-page/settings-authorization/settings-authentication.component.html +++ b/apps/user-profile/src/app/pages/settings-page/settings-authorization/settings-authentication.component.html @@ -1,23 +1,39 @@ -
-

{{'AUTHENTICATION.TITLE' | customTranslate | translate}}

-

{{'AUTHENTICATION.ANTI_PHISHING_INFO' | customTranslate | translate}}

-
- +
+
+

{{'AUTHENTICATION.TITLE' | customTranslate | translate}}

+

{{'AUTHENTICATION.ANTI_PHISHING_INFO' | customTranslate | translate}}

+
+ +
+ +
- -
- -

{{'AUTHENTICATION.MFA' | customTranslate | translate}}

-{{'AUTHENTICATION.MFA_INFO'|translate}}{{mfaUrl}} + diff --git a/apps/user-profile/src/app/pages/settings-page/settings-authorization/settings-authentication.component.ts b/apps/user-profile/src/app/pages/settings-page/settings-authorization/settings-authentication.component.ts index 3da975387..ca21cbf86 100644 --- a/apps/user-profile/src/app/pages/settings-page/settings-authorization/settings-authentication.component.ts +++ b/apps/user-profile/src/app/pages/settings-page/settings-authorization/settings-authentication.component.ts @@ -1,30 +1,40 @@ -import { Component, OnInit } from '@angular/core'; +import { AfterViewInit, Component, OnInit, ViewChild } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { getDefaultDialogConfig } from '@perun-web-apps/perun/utils'; import { AddAuthImgDialogComponent } from '../../../components/dialogs/add-auth-img-dialog/add-auth-img-dialog.component'; import { Attribute, AttributesManagerService } from '@perun-web-apps/perun/openapi'; -import { StoreService } from '@perun-web-apps/perun/services'; +import { AuthService, StoreService } from '@perun-web-apps/perun/services'; import { RemoveStringValueDialogComponent } from '../../../components/dialogs/remove-string-value-dialog/remove-string-value-dialog.component'; import { TranslateService } from '@ngx-translate/core'; +import { OAuthService } from 'angular-oauth2-oidc'; +import { MatSlideToggle } from '@angular/material/slide-toggle'; @Component({ selector: 'perun-web-apps-settings-authentication', templateUrl: './settings-authentication.component.html', styleUrls: ['./settings-authentication.component.scss'], }) -export class SettingsAuthenticationComponent implements OnInit { +export class SettingsAuthenticationComponent implements OnInit, AfterViewInit { + @ViewChild('toggle') toggle: MatSlideToggle; + removeDialogTitle: string; imgAtt: Attribute; imageSrc = ''; removeDialogDescription: string; mfaUrl = ''; displayImageBlock: boolean; + mfaAvailable = false; + mfaApiUrl = ''; + loadingMfa = false; + loadingImg = false; constructor( private dialog: MatDialog, private attributesManagerService: AttributesManagerService, private store: StoreService, - private translate: TranslateService + private translate: TranslateService, + private oauthService: OAuthService, + private authService: AuthService ) { translate .get('AUTHENTICATION.DELETE_IMG_DIALOG_TITLE') @@ -34,7 +44,15 @@ export class SettingsAuthenticationComponent implements OnInit { .subscribe((res) => (this.removeDialogDescription = res)); } + ngAfterViewInit(): void { + this.toggle.change.subscribe((change) => { + this.reAuthenticate(change.checked); + }); + } + ngOnInit(): void { + this.loadingMfa = true; + this.loadingImg = true; this.translate.onLangChange.subscribe(() => { this.translate .get('AUTHENTICATION.DELETE_IMG_DIALOG_TITLE') @@ -45,9 +63,58 @@ export class SettingsAuthenticationComponent implements OnInit { this.mfaUrl = this.store.get('mfa', 'url_' + this.translate.currentLang); }); this.mfaUrl = this.store.get('mfa', 'url_' + this.translate.currentLang); + this.mfaApiUrl = this.store.get('mfa', 'api_url'); + fetch(this.mfaApiUrl + 'mfaAvailable', { + method: 'GET', + headers: { Authorization: 'Bearer ' + this.oauthService.getIdToken() }, + }) + .then((response) => response.text()) + .then((responseText) => { + this.mfaAvailable = responseText === 'true'; + if (this.mfaAvailable) { + this.loadMfa(); + } + }) + .catch((e) => { + console.error(e); + this.loadingMfa = false; + }); + this.loadImage(); } + private loadMfa(): void { + const mfaRoute = sessionStorage.getItem('mfa_route'); + if (mfaRoute) { + const enforceMfa = sessionStorage.getItem('enforce_mfa'); + this.enableMfa(enforceMfa === 'true') + .then((res) => { + if (res.ok && enforceMfa === 'true') { + this.toggle.toggle(); + } + this.loadingMfa = false; + }) + .catch((e) => { + console.error(e); + this.loadingMfa = false; + }); + } else { + const enforceMfaAttributeName = this.store.get('mfa', 'enforce_mfa_attribute'); + this.attributesManagerService + .getUserAttributeByName(this.store.getPerunPrincipal().userId, enforceMfaAttributeName) + .subscribe((attr) => { + if (attr.value) { + this.toggle.toggle(); + } + this.loadingMfa = false; + }); + } + if (sessionStorage.getItem('mfa_route')) { + sessionStorage.removeItem('enforce_mfa'); + sessionStorage.removeItem('mfa_route'); + } + } + onAddImg() { const config = getDefaultDialogConfig(); config.width = '500px'; @@ -62,13 +129,29 @@ export class SettingsAuthenticationComponent implements OnInit { }); } - // private transformTextToImg(text: string) { - // const canvas = document.createElement('canvas'); - // const context = canvas.getContext('2d'); - // context.font = "100px Calibri"; - // context.fillText(text, 1, 70); - // return canvas.toDataURL('image/png'); - // } + reAuthenticate(enforceMfa: boolean): void { + sessionStorage.setItem('enforce_mfa', enforceMfa.toString()); + sessionStorage.setItem('mfa_route', '/profile/settings/auth'); + localStorage.removeItem('refresh_token'); + this.oauthService.logOut(true); + sessionStorage.setItem('auth:redirect', location.pathname); + sessionStorage.setItem('auth:queryParams', location.search.substring(1)); + this.authService.loadConfigData(); + this.oauthService.loadDiscoveryDocumentAndLogin(); + } + + enableMfa(value: boolean): Promise { + const idToken = this.oauthService.getIdToken(); + const path = `mfaEnforced`; + const url = `${this.mfaApiUrl}${path}`; + const body = `value=${value}`; + + return fetch(url, { + method: 'PUT', + body: body, + headers: { Authorization: `Bearer ${idToken}` }, + }); + } onDeleteImg() { const config = getDefaultDialogConfig(); @@ -95,17 +178,28 @@ export class SettingsAuthenticationComponent implements OnInit { this.displayImageBlock = this.store.get('mfa', 'enable_security_image'); this.attributesManagerService .getUserAttributeByName(this.store.getPerunPrincipal().userId, imgAttributeName) - .subscribe((attr) => { - if (!attr) { - this.attributesManagerService - .getAttributeDefinitionByName(imgAttributeName) - .subscribe((att) => { - this.imgAtt = att as Attribute; - }); - } else { - this.imgAtt = attr; - this.imageSrc = this.imgAtt.value as unknown as string; + .subscribe( + (attr) => { + if (!attr) { + this.attributesManagerService + .getAttributeDefinitionByName(imgAttributeName) + .subscribe((att) => { + this.imgAtt = att as Attribute; + }); + } else { + this.imgAtt = attr; + this.imageSrc = this.imgAtt.value as unknown as string; + } + this.loadingImg = false; + }, + (e) => { + console.error(e); + this.loadingImg = false; } - }); + ); + } + + redirectToMfa(): void { + window.open(this.mfaUrl, '_blank'); } } diff --git a/apps/user-profile/src/assets/config/defaultConfig.json b/apps/user-profile/src/assets/config/defaultConfig.json index ca208ecec..a9a2ac9c0 100644 --- a/apps/user-profile/src/assets/config/defaultConfig.json +++ b/apps/user-profile/src/assets/config/defaultConfig.json @@ -70,6 +70,7 @@ "api_url": "https://id.muni.cz/mfaapi/", "enable_security_image": true, "security_image_attribute": "urn:perun:user:attribute-def:def:securityImage:mu", + "enforce_mfa_attribute": "urn:perun:user:attribute-def:def:mfaEnforced:mu", "url_en": "https://mfa.aai.muni.cz/", "url_cs": "https://mfa.aai.muni.cz/" }, diff --git a/apps/user-profile/src/assets/i18n/cs.json b/apps/user-profile/src/assets/i18n/cs.json index ab6f4782a..868418a63 100644 --- a/apps/user-profile/src/assets/i18n/cs.json +++ b/apps/user-profile/src/assets/i18n/cs.json @@ -136,12 +136,14 @@ "AUTHENTICATION": { "TITLE": "Bezpečnostní obrázek", "MFA": "Vícefázové ověření", + "MFA_TOGGLE": "Zapnout vícefázové ověření pro všechny služby", + "MFA_DISABLED": "Potřebujete mít alespoň jeden aktivní MFA token.", "NEW_IMG": "Nový obrázek", "DELETE_IMG": "Vymazat obrázek", "ANTI_PHISHING_INFO": "Tento bezpečnostní obrázek se vám ukáže před tím, než zadáte heslo, ujistíte se tak, že se nepřihlašujete na podvrženou stránku", "DELETE_IMG_DIALOG_TITLE": "Vymazat proti-phishingový obrázek", "DELETE_IMG_DIALOG_DESC": "Váš bezpečnostní obrázek bude odstraněn a nebude použit během autentizace.", - "MFA_INFO": "Pro správu prostředků vícefázového ověření (MFA) navštivte " + "MFA_INFO": "Spravovat moje prostředky vícefázového ověření (MFA)" }, "DIALOGS": { "CHANGE_EMAIL": { diff --git a/apps/user-profile/src/assets/i18n/en.json b/apps/user-profile/src/assets/i18n/en.json index 7b9f1b733..6baffa08c 100644 --- a/apps/user-profile/src/assets/i18n/en.json +++ b/apps/user-profile/src/assets/i18n/en.json @@ -136,12 +136,14 @@ "AUTHENTICATION": { "TITLE": "Security image", "MFA": "Multi-factor authentication", + "MFA_TOGGLE": "Turn on multi-factor authentication for all services", + "MFA_DISABLED": "You need to have at least one active MFA token.", "NEW_IMG": "New image", "DELETE_IMG": "Delete image", "ANTI_PHISHING_INFO": "You will be shown this security image before you enter your password so you will know that you are visiting the right site", "DELETE_IMG_DIALOG_TITLE": "Delete anti-phishing image", "DELETE_IMG_DIALOG_DESC": "Your security image will be deleted and will not be used during authentication process.", - "MFA_INFO": "To manage MFA tokens go to " + "MFA_INFO": "Manage my MFA tokens" }, "DIALOGS": { "CHANGE_EMAIL": { diff --git a/libs/perun/services/src/lib/auth.service.ts b/libs/perun/services/src/lib/auth.service.ts index 220f1a9bb..73d5bf337 100644 --- a/libs/perun/services/src/lib/auth.service.ts +++ b/libs/perun/services/src/lib/auth.service.ts @@ -44,7 +44,11 @@ export class AuthService { ) { customQueryParams['prompt'] = 'consent'; } - + if (sessionStorage.getItem('mfa_route')) { + customQueryParams['acr_values'] = 'https://refeds.org/profile/mfa'; + customQueryParams['prompt'] = 'login'; + customQueryParams['max_age'] = '0'; + } return { requestAccessToken: true, issuer: this.store.get('oidc_client', 'oauth_authority'), From 96371ee9ac9ea783b72e614528a394ae108b9ca9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 24 Mar 2022 17:53:51 +0000 Subject: [PATCH 6/6] build(deps): bump minimist from 1.2.5 to 1.2.6 Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6. - [Release notes](https://github.com/substack/minimist/releases) - [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6) --- updated-dependencies: - dependency-name: minimist dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index b11eed273..53a57fd94 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15654,9 +15654,9 @@ } }, "node_modules/minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" }, "node_modules/minimist-options": { "version": "4.1.0", @@ -35622,9 +35622,9 @@ } }, "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" }, "minimist-options": { "version": "4.1.0",
{{col}} - {{getValue(application.formData, col)}} - {{col}} + {{getValue(application.formData, col)}} +